[ts-gen] getting started question

R P Herrold herrold at owlriver.com
Sat Dec 29 11:37:02 EST 2007


On Fri, 28 Dec 2007, Ron Hinchley wrote:

> I have my SQL on 64-bit CENTOS machine and my IB socket on a 32-bit
> FC5.  I have compiled the shim on both systems (thanks for the help).
> After changing the .shimrc for each I get different results when I run
> regress. It does not look like they are working. I did a port scan to
> make sure ports 3306 and 7496 were open from both sides.

That would indicate both running MySQL and TWS proceses, 
respectively; so you do not have an iptables socket connection 
blockage in play; great!  I use a similar process in my 
testing harness.

> When I run thej regress test on the FC5 which also runs tws 
I notice a
> pop-up dialog which I do not get when I run from the CENTOS which runs
> the SQL. I want to run from CENTOS and have the IB socket on FC5.

You do not quote the text of the popup box, but I think it is 
the one from the TWS side, to the effect:
     Accept incoming connection from (IP number)?

which is the TWS' "wrappers" (that is, its mechanism to permit 
socket based connections only from specified sources).  see:
 	man 8 tcpd
for a discussion of the mechanism in a Unix context.

The first and second screenshots at:
     http://www.trading-shim.org/faq/?setup
should look familiar;  you have probably already enabled 
Socket Clients (which causes the port to be listened to, as 
you saw in the portscan);  Now you need to add the IP of each 
of the client from which the connection are permitted to 
occur.  Also add:  127.0.0.1  while you are there, as that is 
the 'lo' IP of the host on which the TWS is actually running.

This makes sense as a restriction mechanism, as one may want 
the analysis farm computers in an office to be able to query 
for data, and the traders of an office to be able to trade 
through the socket interface with an automated or assistive 
interface {based on the shim!!}, but not have the mailclerk 
able to access the TWS, even though all are in the same 
logical subnet.  By permitting just those who wanted, and not 
adding those not to use it, we can attain this goal.

In the second screenshot, our logical subnet is:
    10.16.1.0/24
but only computers at IP's:
    127.0.0.1
    10.16.1.101
    10.16.1.64
    10.16.1.112
    10.16.1.103
    10.16.1.105
    10.16.1.65
    10.16.1.102
may access the TWS.  Some others are also permitted, as you 
can see from the scroll bar on the 'Trusted IP Addresses' 
listbox, but this is sufficient for our example.

-----  side matter -------

There is no 64 v 32 bit issue in play, as network sockets have 
a machanism to sort that out, separate from 'wrappers'.  As 
these byte order resolution mechanisms are rather involved, 
see:
    RFC 2553,
    man 3 getaddrinfo, and
    Stevens, mentioned (and formerly linked at page 4, PDF page 
20) of
    http://www.trading-shim.org/pdfs/manual.pdf

hmmm ... Something seems to have gone wrong in the manual PDF 
build in Bill's release process, when last done.  As a matter 
of trying to spot errors hidden by build processes, Bill and I 
have development process diversity here, to uncover and 
isolate issues in pre-release candidates, in addition to the 
release tests we perform.

This is not overly surprising, as we were discussing some 
extensions in the Appendix just last evening in our planning 
meeting;  we continue to work on Nil's order progress open 
item, and the type hierarchy refactoring is proving well worth 
the effort.

Thanks again, Nils -- we think about and are working toward 
your fix daily -- about 20 hours by Bill, and 14 by me in this 
shortened work week.  Nil's feedback has proved VERY valuable 
to us.  This area (the type hierarchy) is THE largest figure 
in the manual.pdf -- see PDF page 76 -- DO NOT ** STUDY ** THE 
FIGURE, as it has been enormously clarified since that figure 
was last revised in the manual.  We knew this rafactoring 
would be needed as we moved from the Beta stage, to the first 
stable release stage, and it has yielded fixes in news, info, 
and more as we have done it.

It also looks as though Bill drilled in the 'wild' [card] 
(request abstract contract query) command after I posted a 
071228 release notice to Freshmeat;  I get a build failure of 
the documentation as well here, and it looks like something in 
a new appendix section is not finding some figures (generated 
by graphviz) it wants.  I'll run this down next week.

I have a couple of test candidates from earlier in the week on 
the workstation I am at:

[herrold at couch shim]$ find -name manual.pdf
./shim_071126/doc/manual.pdf
./shim_071127/doc/manual.pdf
./shim-builder/shim-071228/pdf/manual.pdf
./temp/doc/manual.pdf
[herrold at couch shim]$

and I will push yesterday's internal over top of the one 
(which is exploded in our release process out of the most 
recent tarball) in a moment. .... done.

In that earlier version, the bibliograpy footnote links are 
live, and it is link 8.

[8] W. Richard Stevens and Stephen A. Rago.  Advanced 
Programming in a Unix Environment.  Addison-Wesley, second 
edition, 2005.
           The publisher's page is currently
http://www.aw-bc.com/catalog/academic/product/0,1144,0201433079,00.html.

My copy is at the office, but let me warn -- I would reserve a 
semester's study for that book and for working examples for an 
intermediate level C programmer.  It is deep stuff, and we 
strive to completely hide that complexity from you the end 
user with the shim.

-- Russ Herrold


More information about the ts-general mailing list