It's telling you the Java version is not correct. What version of Java
are you using? Needs to be 1.8 for current Jenkins.
On 6/25/2019 11:27 AM, Eric Fetzer wrote:
OK, that was a flop. I downloaded the correct jenkins-cli.jar from :
http://myJenkinsServer:8080
<http://myjenkinsserver:8080/>/jnlpJars/jenkins-cli.jar
<https://jenkins.example.com/jnlpJars/jenkins-cli.jar>, and now I get:
Exception in thread "main" java.lang.UnsupportedClassVersionError:
hudson/cli/CLI : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:648)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:272)
at java.net.URLClassLoader.access$000(URLClassLoader.java:68)
at java.net.URLClassLoader$1.run(URLClassLoader.java:207)
at java.net.URLClassLoader$1.run(URLClassLoader.java:201)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:200)
at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:270)
at
sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:406)
On Tuesday, June 25, 2019 at 8:12:58 AM UTC-6, Eric Fetzer wrote:
This makes no sense. When I run the command:
java -cp /my/path/to/jar/jenkins-cli.jar -s
http://myJenkinsServer:8080 -i /my/key/id_rsa help
I get:
Neither -s nor the JENKINS_URL env var is specified.
Jenkins CLI
Usage: java -jar jenkins-cli.jar [-s URL] command [opts...]
args...
Options:
-s URL : the server URL (defaults to the JENKINS_URL env
var)
-i KEY : SSH private key file used for authentication
-p HOST:PORT : HTTP proxy host and port for HTTPS proxy
tunneling. See http://jenkins-ci.org/https-proxy-tunnel
<http://jenkins-ci.org/https-proxy-tunnel>
-noCertificateCheck : bypass HTTPS certificate check entirely.
Use with caution
-noKeyAuth : dont try to load the SSH authentication private
key. Conflicts with -i
The available commands depend on the server. Run the help
command to
see the list.
So I figure I'll play, and set the env variable even though the -s
was in there plain as day. So I do:
export JENKINS_URL='http://my.JenkinsServer:8080
<http://my.JenkinsServer:8080>'
java -cp /my/path/to/jar/jenkins-cli.jar -jar
/my/path/to/jar/jenkins-cli.jar -i /my/key/id_rsa help
I get:
Exception in thread "main" java.io.IOException: Failed to
connect to http://my.JenkinsServer:8080/
at hudson.cli.CLI.getCliTcpPort(CLI.java:271)
at hudson.cli.CLI.<init>(CLI.java:126)
at
hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:471)
at hudson.cli.CLI.main(CLI.java:387)
Caused by: java.net.UnknownHostException: my.JenkinsServer
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
at
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:543)
at java.net.Socket.connect(Socket.java:492)
at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
at
sun.net.www.http.HttpClient.openServer(HttpClient.java:417)
at
sun.net.www.http.HttpClient.openServer(HttpClient.java:519)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
at sun.net.www.http.HttpClient.New(HttpClient.java:296)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1004)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:940)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:858)
at hudson.cli.CLI.getCliTcpPort(CLI.java:269)
... 4 more
A week ago I had no issues whatsoever. Both of these servers were
patched since then. Both servers are RHEL 6.10. Jenkins version
2.176.1. Any ideas of what my sudden issue could be or where to
start trouble shooting this?
Thanks,
Eric
--
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-users+unsubscr...@googlegroups.com
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/6eef6538-ad55-49e9-8ae0-ed2c727509de%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/6eef6538-ad55-49e9-8ae0-ed2c727509de%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Eric Pyle
Siemens PLM Software
Lebanon, NH
+1 603-277-3060
eric.p...@siemens.com
http://www.siemens.com/plm
--
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/10c7f203-ddb4-7807-ac7e-3d518d58431b%40siemens.com.
For more options, visit https://groups.google.com/d/optout.