ssl - Jenkins CLI with HTTPS -


my jenkins server switched using https. however, when trying run jenkins-cli.jar, following error:

exception in thread "main" java.io.ioexception: failed connect https://ncs-jenkins.cisco.com/     @ hudson.cli.cli.getclitcpport(cli.java:266)     @ hudson.cli.cli.<init>(cli.java:126)     @ hudson.cli.cliconnectionfactory.connect(cliconnectionfactory.java:72)     @ hudson.cli.cli._main(cli.java:466)     @ hudson.cli.cli.main(cli.java:382) caused by: javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake     @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:902)     @ sun.security.ssl.sslsocketimpl.performinitialhandshake(sslsocketimpl.java:1208)     @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1235)     @ sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl.java:1219)     @ sun.net.www.protocol.https.httpsclient.afterconnect(httpsclient.java:440)     @ sun.net.www.protocol.https.abstractdelegatehttpsurlconnection.connect(abstractdelegatehttpsurlconnection.java:185)     @ sun.net.www.protocol.https.httpsurlconnectionimpl.connect(httpsurlconnectionimpl.java:153)     @ hudson.cli.cli.getclitcpport(cli.java:264)     ... 4 more caused by: java.io.eofexception: ssl peer shut down incorrectly     @ sun.security.ssl.inputrecord.read(inputrecord.java:482)     @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:883)     ... 11 more 

is there way use jenkins cli on https?

this happens, example when try run command:

java -jar jenkins-cli.jar -nocertificatecheck -s https://ncs-jenkins.cisco.com:8443/ -i /home/auto/.ssh/id_rsa 

i encountered same problem on 1 of jenkins slaves. since slaves supposed identical, started investigating slightest differences between machines. turns out, java version different:

java-1.7.0-openjdk-1.7.0.75.x86_64 - on working machine

java-1.7.0-openjdk-1.7.0.85.x86_64 - on failing one.

i reverted earlier openjdk version , problem fixed. since asked question few days ago, suspect we've encountered same problem.

to check version:

java -showversion -verbose 2>&1 | head -1 

to install previous openjdk version (on centos):

yum install java-1.7.0-openjdk-devel-1:1.7.0.75-2.5.4.0.el6_6.x86_64 

Comments