执行时
java -jar jenkins-cli.jar -s https://jenkins_url help
我因某种原因拒绝连接. Jenkins版本是1580.3,用户拥有Jenkins服务器的权限,cli jar是最新的,ssh公钥配置正确.知道可能导致这种情况的原因吗?如果有帮助,这是堆栈跟踪:
Exception in thread "main" java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at hudson.cli.CLI.connectViaCliPort(CLI.java:203)
at hudson.cli.CLI.(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.(Channel.java:421)
at hudson.remoting.Channel.(Channel.java:400)
at hudson.remoting.Channel.(Channel.java:396)
at hudson.remoting.Channel.(Channel.java:385)
at hudson.remoting.Channel.(Channel.java:377)
at hudson.remoting.Channel.(Channel.java:353)
at hudson.cli.CLI.connectViaHttp(CLI.java:157)
at hudson.cli.CLI.(CLI.java:130)
... 3 more