简体   繁体   English

詹金斯奴隶“拒绝联系”

[英]Jenkins Slave “Connection Refused”

I'm trying to set up a Master Slave system with Jenkins. 我正在尝试与Jenkins建立Master Slave系统。 I created a new node on Jenkins and set it up. 我在Jenkins上创建了一个新节点并进行了设置。 However, when I try to start the Slave Agent on the slave computer, it always throws an error, regardless of the method I use (web start or command line): 但是,当我尝试在从属计算机上启动从属代理时,无论我使用哪种方法(Web启动或命令行),它总是会引发错误:

java.io.IOException: Failed to connect to (myurl):(port)

(myurl) and (port) are placeholders. (myurl)和(port)是占位符。

... ...

Caused  by: java.net.ConnectException: Connection refused

There is no firewall running, the port is open, and the master is indeed functioning properly. 没有防火墙在运行,端口处于打开状态,主服务器确实正常运行。 Any help will be greatly appreciated! 任何帮助将不胜感激!

Thank you! 谢谢!

I encountered the same error message and in my case the ssh server on the slave was just stopped. 我遇到了同样的错误消息,在我的情况下,从站上的ssh服务器刚刚停止。

I went on the slave server and checked the ssh status: 我在从属服务器上检查了ssh状态:

service ssh status
 * sshd is not running

I started ssh: 我开始ssh:

/etc/init.d/ssh start
service ssh status
 * sshd is running

Then I was able to restart the connection to the slave with jenkins. 然后,我可以使用jenkins重新启动与从站的连接。

You can also check the following point: the public key of your jenkins server ( /var/jenkins_home/.ssh/id_rsa.pub ) should be listed among the authorized keys of your slave server ( /root/.ssh/authorized_keys ). 您还可以检查以下几点:jenkins服务器的公共密钥(/var/jenkins_home/.ssh/id_rsa.pub)应该列在从属服务器的授权密钥(/root/.ssh/authorized_keys)中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM