[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby on Win32: strange socket problems

Dido Sevilla

6/23/2005 2:12:00 AM

I've written a fairly large Ruby program that is, among other things,
a Jabber client, and as far as I've been able to test it, it works
reliably under GNU/Linux. It also appears to work reliably under
Windows with no changes, using the Windows XP SP2 install that we are
using for test. However, it doesn't seem to work on some other
installations of Windows XP that the client for whom the program was
written has available. When the program connects to the Jabber server
that we've set up, we performed a dump of the packets being exchanged
between the client and server and noted that it is trying to connect,
but eventually the exchange stops and the Ruby program freezes in the
middle of the TCP connection establishment phase after sending a final
ACK. Oddly enough, our local Windows test box doesn't suffer from this
problem, and certain client machines also do not suffer from this
problem. It seems that Ruby is unable to use network sockets at all on
these machines, as a simple TCP client stub program connecting to a
netcat instance exhibits the same behavior on these machines. We
cannot determine what, if anything, is different about the
configurations of the non-working Windows boxes that causes them to
behave as they do.

What could be going on here? All of these Windows boxes are either XP
SP1 or SP2 (with both types represented in functioning and
non-functioning machines), and are using the one-click Ruby installer
version 1.8.2-15. Has anyone else observed this mystifying behavior?
Any hints on what could be causing it and how to fix it?


2 Answers

Paul Hanchett

6/23/2005 3:33:00 AM

0

I have found it's relatively easy to run out of available sockets on XP
(even pro!) Netstat should show you a bunch of closed but unavailable
sockets if this is the problem.

Dido Sevilla wrote:
> I've written a fairly large Ruby program that is, among other things,
> a Jabber client, and as far as I've been able to test it, it works
> reliably under GNU/Linux. It also appears to work reliably under
> Windows with no changes, using the Windows XP SP2 install that we are
> using for test. However, it doesn't seem to work on some other
> installations of Windows XP that the client for whom the program was
> written has available. When the program connects to the Jabber server
> that we've set up, we performed a dump of the packets being exchanged
> between the client and server and noted that it is trying to connect,
> but eventually the exchange stops and the Ruby program freezes in the
> middle of the TCP connection establishment phase after sending a final
> ACK. Oddly enough, our local Windows test box doesn't suffer from this
> problem, and certain client machines also do not suffer from this
> problem. It seems that Ruby is unable to use network sockets at all on
> these machines, as a simple TCP client stub program connecting to a
> netcat instance exhibits the same behavior on these machines. We
> cannot determine what, if anything, is different about the
> configurations of the non-working Windows boxes that causes them to
> behave as they do.
>
> What could be going on here? All of these Windows boxes are either XP
> SP1 or SP2 (with both types represented in functioning and
> non-functioning machines), and are using the one-click Ruby installer
> version 1.8.2-15. Has anyone else observed this mystifying behavior?
> Any hints on what could be causing it and how to fix it?
>
>

Michael Weller

6/23/2005 12:31:00 PM

0

Dido Sevilla wrote:
> I've written a fairly large Ruby program that is, among other things,
> a Jabber client, and as far as I've been able to test it, it works
> reliably under GNU/Linux. It also appears to work reliably under
> Windows with no changes, using the Windows XP SP2 install that we are
> using for test. However, it doesn't seem to work on some other
> installations of Windows XP that the client for whom the program was
> written has available. When the program connects to the Jabber server
> that we've set up, we performed a dump of the packets being exchanged
> between the client and server and noted that it is trying to connect,
> but eventually the exchange stops and the Ruby program freezes in the
> middle of the TCP connection establishment phase after sending a final
> ACK. Oddly enough, our local Windows test box doesn't suffer from this
> problem, and certain client machines also do not suffer from this
> problem. It seems that Ruby is unable to use network sockets at all on
> these machines, as a simple TCP client stub program connecting to a
> netcat instance exhibits the same behavior on these machines. We
> cannot determine what, if anything, is different about the
> configurations of the non-working Windows boxes that causes them to
> behave as they do.
>
> What could be going on here? All of these Windows boxes are either XP
> SP1 or SP2 (with both types represented in functioning and
> non-functioning machines), and are using the one-click Ruby installer
> version 1.8.2-15. Has anyone else observed this mystifying behavior?
> Any hints on what could be causing it and how to fix it?
>
>

Maybe they're running ZoneAlarm Firewall? I once had the problem that
ruby couldn't connect to any network while ZoneAlarm was installed (it
even blocked ruby when shutdown!) though ruby was "thrusted process"..

hth!

Michael