[ts-general] CentOS 6, Additional database build issue

Harry Balzer harry.balzer at yahoo.com
Fri Aug 31 09:02:35 EDT 2012

paul, your solution worked for me.  thanks again.

the shim connection doesn't fail with client{1} which is why i found it odd that it attempted with client{2}.

i'd love to use the tool, but can't until the problem is fixed (i'm not knowledgeable enough to do
this myself) or i find an old tws / gateway tarball that works.

 From: Paul <paul.analytic at gmail.com>
To: Harry Balzer <harry.balzer at yahoo.com>; trading shim general list <ts-general at mail.trading-shim.org> 
Sent: Thursday, August 30, 2012 3:56 AM
Subject: Re: [ts-general] CentOS 6, Additional database build issue
However, this approach seems to work without modifying/removing the IPv6 entries from
1. Add a 'twshost' entry to the line in /etc/hosts:       localhost twshost .....
2. Modify ~/.shimrc accordingly:
      let DbmsHost = localhost,                      
          FeedHost = twshost,         # <----
          ApiLevel = 47; 
3. Specify in the Trusted IP Address section on the TWS API configuration

I suspect the pop-up problem arose because 'localhost' appears in both the entry and the IPv6 ::1 entry (in your /etc/hosts), and for some
reason the latter always gets used. Giving the shim another name to use (e.g.
'twshost') results in the standard IPv4 being sent to the TWS.
(Alternatively, maybe just remove 'localhost' from the ::1 line.) Works for me

> post fix and tws try, i tried the gateway as well.  some interesting things
> happen when i "show api messages".
> first, tws socket server version is 65, client version is 39.  second,
> EServerSocket terminates conversation with
> client {1}, but for some reason, the api also responds to another attempted
> conversation with client {2} -- also
> terminates.
> i doubt it's as simple as changing the version number somewhere and am not sure
> why the shim tries again after first failing.

The TWS allows multiple clients to connect, including multiple shims (in --data
mode anyway). It seems to try the client ID's in turn until it can connect.
Presumably the shim doesn't know why it's connection attempt failed, so it
tries another client ID (etc, until killed). 

I was looking at src/apis.c and version.h to see if there is a simple change to
make (version numbers etc) but haven't managed to get it working.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.trading-shim.org/pipermail/ts-general/attachments/20120831/86170690/attachment.html 

More information about the ts-general mailing list