我正在尝试执行jenkins cli命令
java -jar /home/jenkins/jenkins-cli.jar -s http://jenkins.server.com/ version --username jenkins --password jenkins
获得以下错误
2015年8月5日上午6:01:02 hudson.remoting.SynchronousCommandTransport $ ReaderThread运行SEVERE: 通道中的I / O错误Chunked连接到 http://jenkins.server.com/cli java.io.StreamCorruptedException: 无效的流标题:0A0A0A0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) 在java.io.ObjectInputStream。(ObjectInputStream.java:299)at hudson.remoting.ObjectInputStreamEx。(ObjectInputStreamEx.java:40) 在 hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) 在 hudson.remoting.SynchronousCommandTransport $ ReaderThread.run(SynchronousCommandTransport.java:48)
hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException:无效的流标题:0A0A0A0A at hudson.remoting.Request.abort(Request.java:296)at hudson.remoting.Channel.terminate(Channel.java:815)at hudson.remoting.SynchronousCommandTransport $ ReaderThread.run(SynchronousCommandTransport.java:69) 在...远程调用Chunked连接到 http://jenkins.server.com/cli(Native方法)at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1361) 在hudson.remoting.Request.call(Request.java:171)at hudson.remoting.Channel.call(Channel.java:752)at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:179) 在hudson.remoting。$ Proxy1.waitForProperty(未知来源)at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1205)at at hudson.cli.CLI。(CLI.java:147)at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72) 在hudson.cli.CLI._main(CLI.java:479)at hudson.cli.CLI.main(CLI.java:390)
引起:
java.io.StreamCorruptedException:无效的流标题:0A0A0A0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) 在java.io.ObjectInputStream。(ObjectInputStream.java:299)at hudson.remoting.ObjectInputStreamEx。(ObjectInputStreamEx.java:40) 在 hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) 在 hudson.remoting.SynchronousCommandTransport $ ReaderThread.run(SynchronousCommandTransport.java:48)
答案 0 :(得分:6)
转到配置全局安全> JNLP代理的TCP端口,并选择了Random 再次保存并运行命令
答案 1 :(得分:4)
这似乎是一个类似的问题: https://issues.jenkins-ci.org/browse/JENKINS-23232
它表明您可以添加Jenkins系统配置:
<强> JAVA_ARGS =&#34; -Dhudson.diyChunking =假&#34; 强>
(在/ etc / sysconfig / jenkins中 RHEL ; / etc / default / jenkins Ubuntu / Debian )
您需要重新启动Jenkins服务器
答案 2 :(得分:0)
唯一对我有用的是:
sudo apt-get install openjdk-7-jre