jenkins cli命令给出错误java.io。streamtedexception:无效流标头:0A0A0A0A。

时间:2021-09-06 04:50:51

I am trying to execute jenkins cli command

我正在尝试执行jenkins命令。

java -jar /home/jenkins/jenkins-cli.jar -s http://jenkins.server.com/ version --username jenkins --password jenkins

Getting following error

得到以下错误

Aug 05, 2015 6:01:02 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run SEVERE: I/O error in channel Chunked connection to http://jenkins.server.com/cli java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java.io.ObjectInputStream.(ObjectInputStream.java:299) at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:40) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

2015年8月05日上午6点01分02分。同步命令传输$ReaderThread运行严重:在通道连接到http://jenkins.server.com/cli java.io时发生了I/O错误。(objectinputstream .), (objectinputstream .), (ObjectInputStream.java:299)在hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:40)在hudson.remoting. abstractsync bytearraycommandtransport .read(abstractsync bytearraycommandtransport .java:34),在hudson.remoting.同步命令传输$ReaderThread.run(同步命令传输。java:48)

hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException: invalid stream header: 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) at ......remote call to Chunked connection to http://jenkins.server.com/cli(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1361) at hudson.remoting.Request.call(Request.java:171) at hudson.remoting.Channel.call(Channel.java:752) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:179) at hudson.remoting.$Proxy1.waitForProperty(Unknown Source) at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1205) at hudson.cli.CLI.(CLI.java:147) at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72) at hudson.cli.CLI._main(CLI.java:479) at hudson.cli.CLI.main(CLI.java:390)

hudson.remoting。RequestAbortedException:io。streamtedexception:无效的流头:0a0a0a0a0a位于hudson.remoting. request . request .abort(Request.java:296)位于hudson.remoting. channel.channel.terminate (channel.815)位于hudson.remoting. synchronioustransport . synchronioustransport $ReaderThread.run(synchronous transport .java:69调用hudson.remoting. remoting. channel.attachcallsitestacktrace (Channel.java:1361)位于hudson.remoting.request . request (Request.java:171)witforproperty(未知来源)位于hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1205),位于hudson.cli.clil ._main(java:147)。

Caused by:

引起的:

java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java.io.ObjectInputStream.(ObjectInputStream.java:299) at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:40) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

. io .流标题命令:0A0A0A0A,在java.i . objectinputstream.readstreamheader (objectinputflow .java: tearectinputflow . 804)在java.io.ObjectInputStream. java。

3 个解决方案

#1


6  

Go to Configure Global Security > TCP port for JNLP agents and chose Random save and run your command again

转到为JNLP代理配置全局安全> TCP端口,并选择随机保存并再次运行命令

#2


4  

It seems this is a similar problem as: https://issues.jenkins-ci.org/browse/JENKINS-23232

这似乎是一个类似的问题:https://issues es.jenkins- ci.org/browse/jenkins-23232

It suggests that you can add in your Jenkins system config:

建议您添加Jenkins系统配置:

JAVA_ARGS="-Dhudson.diyChunking=false"

JAVA_ARGS = " -Dhudson.diyChunking = false "

(in /etc/sysconfig/jenkins for RHEL ; /etc/default/jenkins for Ubuntu/Debian)

(以/etc/sysconfig/jenkins为例;/etc/default/jenkins Ubuntu / Debian)

You will need to do a restart of the Jenkins server

您将需要重新启动Jenkins服务器

#3


0  

The only thing that worked for me was:

唯一对我起作用的是:

sudo apt-get install openjdk-7-jre

#1


6  

Go to Configure Global Security > TCP port for JNLP agents and chose Random save and run your command again

转到为JNLP代理配置全局安全> TCP端口,并选择随机保存并再次运行命令

#2


4  

It seems this is a similar problem as: https://issues.jenkins-ci.org/browse/JENKINS-23232

这似乎是一个类似的问题:https://issues es.jenkins- ci.org/browse/jenkins-23232

It suggests that you can add in your Jenkins system config:

建议您添加Jenkins系统配置:

JAVA_ARGS="-Dhudson.diyChunking=false"

JAVA_ARGS = " -Dhudson.diyChunking = false "

(in /etc/sysconfig/jenkins for RHEL ; /etc/default/jenkins for Ubuntu/Debian)

(以/etc/sysconfig/jenkins为例;/etc/default/jenkins Ubuntu / Debian)

You will need to do a restart of the Jenkins server

您将需要重新启动Jenkins服务器

#3


0  

The only thing that worked for me was:

唯一对我起作用的是:

sudo apt-get install openjdk-7-jre