我在通过JNLP将Windows Jenkins从属服务器连接到Linux Jenkins主服务器时遇到了一些问题。
当我在Windows机器上通过以下命令启动Jenkins从站时:
javaws.exe http://MYSERVER:8080/computer/MYSLAVE/slave-agent.jnlp
或类似命令:
java -jar slave.jar -jnlpUrl http://MYSERVER:8080/computer/MYSLAVE/slave-agent.jnlp
......我明白了:
[... several retries before...]
mai 14, 2013 11:21:26 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Failed to connect to MYSERVER:51130
java.io.IOException: Failed to connect to MYSERVER:51130
at hudson.remoting.Engine.connect(Engine.java:316)
at hudson.remoting.Engine.run(Engine.java:194)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at hudson.remoting.Engine.connect(Engine.java:305)
... 1 more
如果我在Linux计算机上运行tcpdump
,我会看到从站和主站之间的通信,端口51130 ......
有关如何解决此问题的任何想法?