shabiel / fis-gtm

FIS/GT.M Repository to mirror the source code drops on http://sourceforge.net/projects/fis-gtm/
Other
11 stars 6 forks source link

TCP socket device not working on Cygwin #10

Closed gjsjohnmurray closed 8 years ago

gjsjohnmurray commented 8 years ago

I installed your Cygwin build on a test machine (64-bit Windows 10) and am trying unsuccessfully to run an application that makes use of TCP socket devices. I also want to get our Serenji debugger/editor working with this GT.M instance, and that uses TCP socket devices to communicate with its client UI.

So I consulted http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/ch09s08.html#socket_device_examples, downloaded sockexamplemulti31.m from http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/sockexamplemulti31.m and tried running it:

$ $gtm_dist/mumps -r sockexamplemulti31
At MAY 16, 2016 13:37:55 waiting for server job 7116 & client job 6312
At MAY 16, 2016 13:37:58 waiting for server job 7116 & client job 6312
At MAY 16, 2016 13:38:01 waiting for server job 7116 & client job 6312
...

Unlike in the comments at the top of the routine (where there were only 12 "waiting" lines over a period of 33 seconds) this continued until I aborted the server job:

$ $gtm_dist/mupip stop 7116
STOP issued to process 7116

Then the output completed:

At MAY 16, 2016 13:40:48 waiting for server job 7116 & client job 6312

Server stderr:
%GTM-F-FORCEDHALT, Image HALTed by MUPIP STOP

Server stdout:
** tcpserver is getting ready to start.**
MAY 16, 2016 13:37:55 Open serverport 2615 successful, $key=LISTENING|server|261
5

Client stderr:

Client stdout:
MAY 16, 2016 13:38:02 At client+13^sockexamplemulti31 connection failure port 26
15
ioerrio=0
ioerrdev=""
ioerrkey=""
ioerrzeof=0
0 OPEN RMS STREAM NOWRAP
0-out OPEN RMS STREAM NOWRAP

Am I doing something wrong, or isn't the TCP socket device stuff working in the Cygwin port yet?

ChristopherEdwards commented 8 years ago

I had the TCP stuff working on cygwin/windows 10 using VistA's RPC broker. i'll see if i can dig up the examples i used

shabiel commented 8 years ago

It works, but GT.M uses IPv6 by default. But somehow we can't convince Windows applications to talk to IPV6.

Set gtm_ipv4_only=1 in env before starting the sockets. That will fix it.

On Monday, May 16, 2016, Christopher Edwards notifications@github.com wrote:

I had the TCP stuff working on cygwin/windows 10 using VistA's RPC broker. i'll see if i can dig up the examples i used

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/shabiel/fis-gtm/issues/10#issuecomment-219419739

Sam Habiel, Pharm.D. VISTA Expertise Network

ChristopherEdwards commented 8 years ago

how could i forget this (headbang), Sam is correct, windows always uses ipv6 by default.

gjsjohnmurray commented 8 years ago

That was the trick I needed. Thanks! Closing this issue.