I'm trying to invoke Jenkins hosted on AWS machine using Jenkins-cli.jar. Both Jenkins and CLI jar version same ( 2.7.3)
but i'm getting below error and i could not have an idea of how to solve it.
java.io.IOException: No X-Jenkins-CLI2-Port among [null, X-Jenkins, Age, X-Hudson, Content-Length, Expires, Set-Cookie, Connection, X-SSH-Endpoint, Server, X-Content-Type-Options, Cache-Control, X-Frame-Options, X-Hudson-Theme, Date, X-Instance-Identity, X-Jenkins-Session, Content-Type]
at hudson.cli.CLI.getCliTcpPort(CLI.java:284)
at hudson.cli.CLI.<init>(CLI.java:128)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:473)
at hudson.cli.CLI.main(CLI.java:384)
Suppressed: java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:
365)
at hudson.remoting.Channel.<init>(Channel.java:437)
at hudson.remoting.Channel.<init>(Channel.java:415)
at hudson.remoting.Channel.<init>(Channel.java:411)
at hudson.remoting.Channel.<init>(Channel.java:399)
at hudson.remoting.Channel.<init>(Channel.java:390)
at hudson.remoting.Channel.<init>(Channel.java:363)
at hudson.cli.CLI.connectViaHttp(CLI.java:153)
at hudson.cli.CLI.<init>(CLI.java:132)
... 3 more