http://my_jenkins_server/cli returns 404?

304 views
Skip to first unread message

Bob Hansen

unread,
Sep 16, 2016, 2:50:28 PM9/16/16
to Jenkins Users
Been trying use the jenkins cli to programmatically set builds to unstable from failed based on conditions that I will find in various log files related to the project I'm working on.

One of the recommendations is to use the jenkkns_cli to set it via the jenkins_cli, however if I do this:

 java -jar jenkins-cli.jar -noCertificateCheck  https://my_jenkins_server help

What gets returned is a FileNotFoundException:

 Suppressed: java.io.FileNotFoundException: https://zvm-os-jenkins.pokprv.stglabs.ibm.com/cli/
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
                at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
                at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:78)
                at hudson.cli.CLI.connectViaHttp(CLI.java:158)
                at hudson.cli.CLI.<init>(CLI.java:132)

If I use manage jenkins from the jenkins dashboard and click jenkins cli, I get a simliar thing;

HTTP ERROR 404 Problem accessing /cli/. Reason: Not Found

What am I missing? I have this issue with two jenkins servers. Is there something I need to install/enable that I'm missing? Searches find nothing.

Server 1: Ubuntu 14.04,3 Jenkins version 1.642.1
Server 2: Ubuntu: 14.04.5 Jenkins Version: 1.651.2

Bob Hansen

Daniel Beck

unread,
Sep 16, 2016, 10:12:25 PM9/16/16
to jenkins...@googlegroups.com
Make sure you don't have an init.groovy[.d] in JENKINS_HOME that disables the CLI; we recommended doing that last November as workaround for a 0-day vulnerability.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/42cfa22e-7971-45d8-9976-2202bc6f5a38%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Bob Hansen

unread,
Sep 19, 2016, 11:33:53 AM9/19/16
to Jenkins Users, m...@beckweb.net
That was it. I'm using an automated install of jenkins and it was installing a groovy script where you described. Remaned the script, restarted the service and I can now get to the CLI from the dashboard.

Thanks!
Reply all
Reply to author
Forward
0 new messages