Can not connect slave to master

橙三吉。 提交于 2019-12-07 13:18:48

问题


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 :-)


回答1:


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




回答2:


If you're running jenkins through a HTTPS connection using a self signed certificate open jenkins-slave.xml and add -noCertificateCheck to the arguments list.




回答3:


Look in your $JENKINS_HOME folder for the slave logs, they might contain more information.



来源:https://stackoverflow.com/questions/9634760/can-not-connect-slave-to-master

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!