TCPSocket.open fails to connect (to SMTP server) on Windows (only) #1847

Open
rebelwarrior opened this Issue Jul 22, 2014 · 6 comments

Projects

None yet

2 participants

@rebelwarrior

I apologize if this a duplicate, but I thought I had already entered this but can't find it.
This is a bug in the JRuby - Java Code Implementation of the 'socket' library.

The following command fails in JRuby in windows:

require 'socket'; TCPSocket.open(ip_address, port)

The exact same command works both in MRI Ruby in Windows and JRuby in Linux connected to the same network.

Error:

SocketError: Network is unreachable: no further information
from org/jruby/ext/socket/RubyTCPSocket.java:140: in `initialize'

The error is likely due to JRuby (or Java) misinterpreting the reply back or parsing it wrong.

@rebelwarrior

I am using Jruby 1.7.13 on a Java (JDK) 7 u65

@rebelwarrior

Now I find the duplicate... 1820 closed that one.

@rebelwarrior

Verified that error still persists in 1.7.15. I'm sure it's an error in the Java code and how it parses the response. There is a nil or something that propagates a wrong value and causes the error. If I knew more Java I'm sure I could pin point it.

@rebelwarrior

The error occurs in all modes: 1.8.7, 1.9.3 and 2.0.0 from Windows. But works in all modes from a Ubuntu VM running inside the Windows computer. So the problem is isolated to the Windows code.

@neilma
neilma commented May 4, 2015

Is anyone working on this?

@rebelwarrior

I would love to but I no longer have access to the old windows set up to test anything and the issue is in Java code and I don't speak Java...

From the errors I got I can tell its a warning the SMTP server sends in text is not processed correctly. I'm suspecting an encoding issue.

Sent from my mobile.

On May 4, 2015, at 2:48 AM, Neil notifications@github.com wrote:

Is anyone working on this?


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment