Jenkins Slave无法连接到在Openshift实例上托管的master

时间:2018-04-03 10:47:55

标签: jenkins openshift

无法连接在Openshift Cluster上托管的jenkins master。握手后终止以下错误:

Apr 03, 2018 4:37:17 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Apr 03, 2018 4:37:17 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to 172.30.211.41:30863
Apr 03, 2018 4:37:48 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to 172.30.211.41:30863 (retrying:2)
java.io.IOException: Failed to connect to 172.30.211.41:30863
        at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoin
t.java:242)
        at hudson.remoting.Engine.connect(Engine.java:671)
        at hudson.remoting.Engine.innerRun(Engine.java:532)
        at hudson.remoting.Engine.run(Engine.java:455)
Caused by: java.net.ConnectException: Connection timed out: connect
        at sun.nio.ch.Net.connect0(Native Method)
        at sun.nio.ch.Net.connect(Unknown Source)
        at sun.nio.ch.Net.connect(Unknown Source)
        at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
        at java.nio.channels.SocketChannel.open(Unknown Source)
        at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoin
t.java:203)
        ... 3 more

我将Windows机器(VM)连接为从属设备。有什么建议? TIA。

2 个答案:

答案 0 :(得分:0)

实例无法连接。

INFO: Connecting to 172.30.211.41:30863 (retrying:2)
java.io.IOException: Failed to connect to 172.30.211.41:30863
...
Caused by: java.net.ConnectException: Connection timed out: connect

openshift中服务的IP地址,对吗?此IP仅可在OpenShift集群中访问。如果从属设备在群集外部运行,请尝试使用路由。

答案 1 :(得分:0)

我使用NodePort连接奴隶。并在jenkins下的slave配置中配置主机名:隧道选项下的端口。有用!