Forum: Ruby App fails on Windows, but works on OS X.

Abec6d6e44dbcd49bd56fe17ffee7f77?d=identicon&s=25 Randy Waxler (qimbz)
on 2009-07-07 15:54
I've been working on a query app for Battlefield 2142 servers, and the
following app always fails on some IPs in Windows:

http://pastie.org/537069.txt

The IPs it works on, it will always work on; the IPs it fails on, it
will always fail on. I've left two sample IPs in the application. The IP
that does not work on Windows has not ever worked, but I tried it on OS
X and it worked flawlessly there despite both the mac and the windows
machines being on the same network. I've tried it on three separate
Windows machines (two on the same network, one in a data centre) with
Windows Vista Ultimate 64 bit, Windows Vista 32 bit, Windows Server 2003
32 bit. It failed on all three of those Windows systems.

Both the mac and the Windows machine are running Ruby 1.8.6. Anyone able
to help me understand what might account for the problems in Windows?

Thanks for any assistance!
4a9cd711ccb80f1ab3ce17450c2857e4?d=identicon&s=25 Greg Willits (-gw-)
on 2009-07-07 19:44
Randy General wrote:
> I've been working on a query app for Battlefield 2142 servers, and the
> following app always fails on some IPs in Windows:

Sounds suspiciously like a networking issue -- firewall, port conflict,
something of that nature where the machines that fail, have different
settings or environment. Maybe the internal software firewall of those
machines?

-- gw
Abec6d6e44dbcd49bd56fe17ffee7f77?d=identicon&s=25 Randy Waxler (qimbz)
on 2009-07-07 19:54
Greg Willits wrote:
> Randy General wrote:
>> I've been working on a query app for Battlefield 2142 servers, and the
>> following app always fails on some IPs in Windows:
>
> Sounds suspiciously like a networking issue -- firewall, port conflict,
> something of that nature where the machines that fail, have different
> settings or environment. Maybe the internal software firewall of those
> machines?
>
> -- gw

Hi Greg,
Thanks for responding.

The systems I tried were all on separate networks, two of them were on
residential ISP networks (but different networks) and the last one was
in a data centre. I don't believe there's any software firewalls on the
machines that would block it, and the mac that was able to connect was
behind the same network as one of those Windows machines that could not
connect.

To add something even more peculiar, I have another app that sends out
the exact same packets to 2142 servers (a windows based app coded in
C++) and it has no problem receiving a response.
3b162dc6e59ca1dc86d35a3803a53523?d=identicon&s=25 Garry Freemyer (Guest)
on 2009-07-07 20:00
(Received via mailing list)
I wonder if it's possible that there is a permissions issue where
scripts don't have sufficient permissions. I think windows makes a
distinction between scripts and executables, and ruby is a script
language.

I wonder what happens if you run a tool to convert the ruby app to an
exe if it would still fail or maybe fail with some error message that
might give a better clue about what is wrong

PS: I top post so folks don't have to scroll through all the already
read stuff, to see the reply.




________________________________
From: Randy General <randygeneral@gmail.com>
To: ruby-talk ML <ruby-talk@ruby-lang.org>
Sent: Tuesday, July 7, 2009 10:54:41 AM
Subject: Re: App fails on Windows, but works on OS X.

Greg Willits wrote:
> Randy General wrote:
>> I've been working on a query app for Battlefield 2142 servers, and the
>> following app always fails on some IPs in Windows:
>
> Sounds suspiciously like a networking issue -- firewall, port conflict,
> something of that nature where the machines that fail, have different
> settings or environment. Maybe the internal software firewall of those
> machines?
>
> -- gw

Hi Greg,
Thanks for responding.

The systems I tried were all on separate networks, two of them were on
residential ISP networks (but different networks) and the last one was
in a data centre. I don't believe there's any software firewalls on the
machines that would block it, and the mac that was able to connect was
behind the same network as one of those Windows machines that could not
connect.

To add something even more peculiar, I have another app that sends out
the exact same packets to 2142 servers (a windows based app coded in
C++) and it has no problem receiving a response.
Abec6d6e44dbcd49bd56fe17ffee7f77?d=identicon&s=25 Randy Waxler (qimbz)
on 2009-07-07 20:53
I gave that a shot after compiling the script using OCRA. Unfortunately
it behaved he exact same way.
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-07-07 21:51
Randy General wrote:
> I've been working on a query app for Battlefield 2142 servers, and the
> following app always fails on some IPs in Windows:
>
> http://pastie.org/537069.txt

I assume flipping the order doesn't help? I would probably next make
sure ping works between the machines, if it does then try wire sharking
to see what is happening.  Maybe
BasicSocket.do_not_reverse_lookup = true

http://rubydoc.ruby-forum.com/doc/ruby-1.9.1-p129/...

=r
Abec6d6e44dbcd49bd56fe17ffee7f77?d=identicon&s=25 Randy Waxler (qimbz)
on 2009-07-08 07:44
Thank you so much, Roger! Setting Basic_Socket.do_not_reverse_lookup to
true fixed the issue.

Can't thank you enough, this problem was driving me absolutely mad!


Roger Pack wrote:
> Randy General wrote:
>> I've been working on a query app for Battlefield 2142 servers, and the
>> following app always fails on some IPs in Windows:
>>
>> http://pastie.org/537069.txt
>
> I assume flipping the order doesn't help? I would probably next make
> sure ping works between the machines, if it does then try wire sharking
> to see what is happening.  Maybe
> BasicSocket.do_not_reverse_lookup = true
>
> http://rubydoc.ruby-forum.com/doc/ruby-1.9.1-p129/...
>
> =r
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.