Slave Handshaking issues

86 views
Skip to first unread message

DannyT

unread,
Oct 3, 2011, 10:21:23 AM10/3/11
to jenkins...@googlegroups.com
I'm having an issue getting slaves to connect to the master (windows service on win2k8) consistently on the same port:

Jenkins Master has security enabled with "TCP port for JNLP slave agents" set to 2000.

SlaveA can connect without issue

SlaveB fails as follows: -
03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Hudson agent is running in headless mode.
03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://myserver:8080/]
03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to myserver:2000
03-Oct-2011 15:07:22 hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
03-Oct-2011 15:08:23 hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Connection reset
java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at hudson.remoting.Engine.readLine(Engine.java:279)
        at hudson.remoting.Engine.run(Engine.java:211)


If I change the port to something else SlaveB will connect without issue, however SlaveA can ONLY use port 2000 (due to restrictions of the host).
Using TcpView.exe I can see there is nothing using port 2000 on SlaveB until the slave tries to connect.
Server hosts on both ends claim there to be nothing firewall related blocking the ports.

My assumption is there is something running on SlaveB which is prohibiting comms over port 2000 but I have no idea how to identify what that is.

Any help much appreciated :(

Dan

DannyT

unread,
Oct 3, 2011, 12:47:11 PM10/3/11
to jenkins...@googlegroups.com
So it would seem the remote server accepts the connection as in the master log I see this:

INFO: Accepted connection #13 from /MY.SLAVE.IP.ADDRESS:58545
Oct 3, 2011 5:38:09 PM hudson.TcpSlaveAgentListener$ConnectionHandler run
WARNING: Connection #13 failed
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.DataInputStream.readUnsignedShort(Unknown Source)
at java.io.DataInputStream.readUTF(Unknown Source)
at java.io.DataInputStream.readUTF(Unknown Source)
at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:178)


Still none the wiser as to how to resolve the issue though?

Sami Tikka

unread,
Oct 3, 2011, 2:22:31 PM10/3/11
to jenkins...@googlegroups.com
I'm pretty sure the port 2000 means port 2000 on the master. It does not fix the port on the slave. 

-- Sami

DannyT

unread,
Oct 4, 2011, 3:17:56 AM10/4/11
to jenkins...@googlegroups.com
Sure but I have setup the slaves firewall to allow the CI master unrestriceted access by it's IP address.

Is there anything I can run on the slave to determine what (if anything) is blocking it?

DannyT

unread,
Oct 4, 2011, 3:59:13 AM10/4/11
to jenkins...@googlegroups.com
Looking into this further:- 
 I've noticed, by monitoring via TCPView, that on the Master it receives the connection from the slave and then tries to communicate back to the slave HOWEVER, it is using the slaves local computer name rather than public IP address which would indicate why the handshaking does not continue.

Does anyone know where I can specify the slave should send it's public address?

DannyT

unread,
Oct 4, 2011, 4:12:10 AM10/4/11
to jenkins...@googlegroups.com
hmm that might be a red herring and it just uses the machine name in tcpview, obviously in the log i posted previously it's getting the correct slave IP address.

So I can see it connecting on both ends but no idea why the java.net.SocketException: Connection reset

Have spent an entire day trying to fix this so far, if anyone has any suggestions to help get some more useful info I'd be extremely grateful.

David Hoffman

unread,
Jan 28, 2013, 7:13:10 PM1/28/13
to jenkins...@googlegroups.com
Hello... Did you ever get anywhere with this?  I am struggling with this exact situation right now on v1.500
Reply all
Reply to author
Forward
0 new messages