Exception in thread "main" java.io.IOException: No X-Jenkins-CLI2-Port among [null, Vary, Date, Content-Length, Keep-Alive, Set-Cookie, Connection, Content-Type, X-Powered-By, Server]
at hudson.cli.CLI.getCliTcpPort(CLI.java:281)
at hudson.cli.CLI.<init>(CLI.java:128)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:449)
at hudson.cli.CLI.main(CLI.java:378)
Suppressed: java.io.EOFException: unexpected stream termination
at hudson.remoting.ClassicCommandTransport.create(ClassicCommandTransport.java:100)
at hudson.remoting.Channel.<init>(Channel.java:392)
at hudson.remoting.Channel.<init>(Channel.java:388)
at hudson.remoting.Channel.<init>(Channel.java:349)
at hudson.remoting.Channel.<init>(Channel.java:345)
at hudson.remoting.Channel.<init>(Channel.java:333)
at hudson.cli.CLI.connectViaHttp(CLI.java:159)
at hudson.cli.CLI.<init>(CLI.java:132)
... 3 more
Solution: check the port which Jenkins is running on, put 8080 on URL should fix, just as:
1
$ java -jar jenkins-cli.jar -s http://jenkins:8080/ help
2. Description:
12345678910111213141516171819202122232425
Failed to authenticate with your SSH keys.
hudson.security.AccessDeniedException2: anonymous is missing the ExtendedRead permission
at hudson.security.ACL.checkPermission(ACL.java:54)
at hudson.model.AbstractItem.checkPermission(AbstractItem.java:441)
at hudson.cli.GetJobCommand.run(GetJobCommand.java:46)
at hudson.cli.CLICommand.main(CLICommand.java:229)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Solution: add client public ssh key to the Jenkins server at: http://jenkins/user/USERNAME/configure | SSH Public Keys.
3. Description:
123456789101112131415161718192021222324
hudson.security.AccessDeniedException2: <USERNAME> is missing the Job/ExtendedRead permission
at hudson.security.ACL.checkPermission(ACL.java:54)
at hudson.model.AbstractItem.checkPermission(AbstractItem.java:446)
at hudson.cli.GetJobCommand.run(GetJobCommand.java:46)
at hudson.cli.CLICommand.main(CLICommand.java:234)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:300)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:281)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:240)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Solution: Jenkins server –> Manage Jenkins –> Configure Global Security to add related permissions.