Jenkins Slave Agent - Ubuntu:端口范围:-1

时间:2017-09-22 11:07:51

标签: linux ubuntu jenkins

我正在尝试让Jenkins slave代理在VM中运行。我有Windows和Ubuntu VM,Windows运行正常。但是当Slave Agent在Ubuntu上启动时出现错误:

启动命令:

java -jar slave.jar -jnlpUrl
https://SERVER/ci/computer/MACHINE/slave-agent.jnlp -secret XXX

错误:

Skipping HTTPS certificate checks altogether. Note that this is not secure at all.
Sep 22, 2017 12:57:58 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: MACHINE
Sep 22, 2017 12:57:58 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Sep 22, 2017 12:57:58 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating SERVER among [https://SERVER/ci/]
Sep 22, 2017 12:57:59 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting SERVER accepts the following protocols: [JNLP4-connect, JNLP-connect, Ping, JNLP2-connect]
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
  Agent address: SERVER
  Agent port:    51967
  Identity:      XXX
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to SERVER:51967
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: port out of range:-1
java.lang.IllegalArgumentException: port out of range:-1
    at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
    at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
    at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.getResolvedHttpProxyAddress(JnlpAgentEndpointResolver.java:359)
    at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:193)
    at hudson.remoting.Engine.connect(Engine.java:500)
    at hudson.remoting.Engine.innerRun(Engine.java:364)
    at hudson.remoting.Engine.run(Engine.java:287)

错误:

严重:端口超出范围:-1 java.lang.IllegalArgumentException:port超出范围:-1

任何想法?

1 个答案:

答案 0 :(得分:1)

与我相同,这是由代理设置引起的,我解决了添加具有适当主机名的NO_PROXY环境变量的问题