对此jenkins-cli错误有任何建议/解决方法吗?
我有一个部署作业,它是参数化的(test,stage,prod)。因此,每当有一个部署到" staging"环境,我试图让Jenkins 奴隶执行一个groovy脚本。试图测试jenkins-cli.jar,我收到了这个错误:
[jenkins@ip-10-0-0-92 scripts]$ java -jar jenkins-cli.jar -s https://my_jenkins_URL/ help
Exception in thread "main" java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at hudson.cli.CLI.connectViaCliPort(CLI.java:203)
at hudson.cli.CLI.<init>(CLI.java:126)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:466)
at hudson.cli.CLI.main(CLI.java:382)
Suppressed: java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:331)
at hudson.remoting.Channel.<init>(Channel.java:421)
at hudson.remoting.Channel.<init>(Channel.java:400)
at hudson.remoting.Channel.<init>(Channel.java:396)
at hudson.remoting.Channel.<init>(Channel.java:385)
at hudson.remoting.Channel.<init>(Channel.java:377)
at hudson.remoting.Channel.<init>(Channel.java:353)
at hudson.cli.CLI.connectViaHttp(CLI.java:157)
at hudson.cli.CLI.<init>(CLI.java:130)
... 3 more
我做了:
我正在使用具有有效SSL证书的nginx。
PS:我遇到了以下两个问题。它们很接近但没有一个解决方案,问题本身就是独一无二的。How to have jenkins-cli.jar work with Jenkins running https? Jenkins CLI with HTTPS
答案 0 :(得分:0)
我得到了同样的错误并通过在/ etc / hosts文件中添加一个新条目来修复它。
我添加的行是:
10.0.0.11 jenkins.xxxxx.com
问题是奴隶无法解决詹金斯大师。自从我为Jenkins master设置新服务器以来,这种情况一直在发生。