java.io.IOException:意外的EOF当Jenkins slave尝试SVN签出时

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java.io.IOException:意外的EOF当Jenkins slave尝试SVN签出时相关的知识,希望对你有一定的参考价值。

我正在尝试在单独的Windows 10计算机上设置Jenkins从站。主程序在Windows 8.1上运行。 slave.jar正在主服务器上执行命令。我是用winrs做的:winrs -r:192.168.xxx.xxx -u:MyUserName -p:MyPassword java -jar C:JenkinsAgentslave.jar

我正在执行一个单独运行echo Hello World作为批处理命令的测试作业成功。

当我从Subversion服务器添加要检出的模块时,测试作业失败了。我在测试作业的日志中看到以下两个错误之一,当任何一个弹出时,它似乎相当随机。

错误1:

Building remotely on Robot Framework Test Slave (RobotFrameworkTestSlave) in workspace C:JenkinsAgentagentRootworkspaceTestJobRFTestingSlave
FATAL: java.io.IOException: Unexpected EOF
java.io.IOException: Unexpected EOF
    at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:99)
    at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
Caused: hudson.remoting.RequestAbortedException
    at hudson.remoting.Request.abort(Request.java:331)
    at hudson.remoting.Channel.terminate(Channel.java:989)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:92)
    at ......remote call to Robot Framework Test Slave(Native Method)
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1654)
    at hudson.remoting.Request.call(Request.java:194)
    at hudson.remoting.Channel.call(Channel.java:904)
    at hudson.FilePath.act(FilePath.java:987)
    at hudson.FilePath.act(FilePath.java:976)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:902)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:838)
    at hudson.scm.SCM.checkout(SCM.java:495)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:566)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:491)
    at hudson.model.Run.execute(Run.java:1737)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:421)
Finished: FAILURE

对应的从机日志:

<===[JENKINS REMOTING CAPACITY]===>   channel started
Slave.jar version: 3.10.2
This is a Windows agent
Agent successfully connected and online
Dec 14, 2017 12:46:03 PM hudson.slaves.ChannelPinger$1 onDead
INFO: Ping failed. Terminating the channel channel.
java.util.concurrent.TimeoutException: Ping started at 1513255323111 hasn't completed by 1513255563116
    at hudson.remoting.PingThread.ping(PingThread.java:130)
    at hudson.remoting.PingThread.run(PingThread.java:86)

channel stopped
ERROR: Connection terminated
[8mha:////4KowEmRObna4QTvhMtPiadKMjrmmt7iuHVG7T5pbYTL2AAAAVx+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0mV3NWzufebKBsTA0NFEYMUmgZnCA1SyAABjCCFBQC2xNaiYAAAAA==[0mjava.io.IOException: Unexpected EOF
    at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:99)
    at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
ERROR: Process terminated with exit code 0
[8mha:////4KowEmRObna4QTvhMtPiadKMjrmmt7iuHVG7T5pbYTL2AAAAVx+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0mV3NWzufebKBsTA0NFEYMUmgZnCA1SyAABjCCFBQC2xNaiYAAAAA==[0m

错误2:

java.io.StreamCorruptedException: invalid stream header: ED000573
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)

对应的从机日志:

<===[JENKINS REMOTING CAPACITY]===>   channel started
Slave.jar version: 3.10.2
This is a Windows agent
Agent successfully connected and online


Winrs error:ERROR: Connection terminated
The pipe has been ended.
[8mha:////4KowEmRObna4QTvhMtPiadKMjrmmt7iuHVG7T5pbYTL2AAAAVx+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0mV3NWzufebKBsTA0NFEYMUmgZnCA1SyAABjCCFBQC2xNaiYAAAAA==[0mjava.io.StreamCorruptedException: invalid stream header: ED000573
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)

所以这只发生在我尝试对奴隶进行结账时,因为只需运行echo Hello World就行了。手动检查我想要从从机检出的存储库也可以。

我一直坚持这个问题,因为谷歌搜索所有我已经空了的信息,我不知道任何其他方式来收集有关实际发生的事情的更多信息。

Update1:​​在一般Jenkins日志中(在管理Jenkins->系统日志 - >所有Jenkins日志中)我看到出现此错误消息:

Failed to monitor Robot Framework Test Slave for Free Swap Space
java.util.concurrent.TimeoutException
    at hudson.remoting.Request$1.get(Request.java:307)
    at hudson.remoting.Request$1.get(Request.java:231)
    at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
    at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:96)
    at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:305)

谷歌搜索指向我https://issues.jenkins-ci.org/browse/JENKINS-19445https://issues.jenkins-ci.org/browse/JENKINS-48309。我不确定这是否与我的问题有关,但人们正在经历与我相同的事情。后者正在审查中,并可能在稍后的版本中解决此问题,但这只是猜测。

答案

我已经通过使用Java Web Start而不是Windows远程管理来连接到从服务器来解决我的问题。我之前试过这个但是它也有一些问题,但我设法解决了这些问题。

以上是关于java.io.IOException:意外的EOF当Jenkins slave尝试SVN签出时的主要内容,如果未能解决你的问题,请参考以下文章

抛出 java.io.IOException: 当我尝试从服务器下载 txt 文件时,http:/ 上的流意外结束

java.io.IOException:意外的EOF当Jenkins slave尝试SVN签出时

Android Studio 意外的内容存储修改

解决Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory

java.io.IOException:系统找不到指定的路径

React Native:错误:[消息/未知] java.io.IOException:java.util.concurrent.ExecutionException:java.io.IOExcept