Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not connect Jenkins agent to controller

I set up Jenkins on a Windows 7 64 bit PC, and installed a Jenkins agent service on another Win7 64 PC. The controller 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 agent 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 agent, it just worked. And afterwards, the agent 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 agent as well?

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

like image 311
parvus Avatar asked Jan 19 '26 07:01

parvus


1 Answers

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”.

like image 117
nolith Avatar answered Jan 22 '26 05:01

nolith