Can not connect slave to master

parvus picture parvus · Mar 9, 2012 · Viewed 10.9k times · Source

I set up Jenkins on a Windows 7 64 bit PC, and installed a Jenkins slave service on another Win7 64 PC. The master PC gives this error:

Connection was broken
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 java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at hudson.remoting.Channel$ReaderThread.run(Channel.java:1127)

What can I do to diagnose the problem?

[Update] The error is shown when I go to the Nodes page. The added slave is displayed as being disconnected. And when I click on the node Name, the above error is displayed.

[Update 2] When a job was forced to run on the slave, it just worked. And afterwards, the slave was displayed as being connected in the node page. Now I come to think of it, I did not try to queue multiple jobs. Perhaps that would have triggered the execution to the slave as well?

Anyway, I've got my CI farm up & running now :-)

Answer

nolith picture nolith · Mar 9, 2012

I suggest you to start the slave via browser, log as administrator to the slave machine and go to the node page on jenkins, if you are logged as jenkins admin you'll see a slave start icon, this will download and execute the slave process.

start slave screenshot

Once you get this working you can update it as a windows service via the slave java application menu “File->Install as Windows Service”.