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

java.io.IOException: Unexpected EOF When Jenkins slave tries an SVN checkout

我正在尝试在单独的 Windows 10 机器上设置 Jenkins 从站。主人在 windows 8.1 上运行。 slave.jar 正在主服务器上执行命令。我使用 winrs 执行此操作:winrs -r:192.168.xxx.xxx -u:MyUserName -p:MyPassword java -jar C:\JenkinsAgent\slave.jar

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

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

错误 1:

Building remotely on Robot Framework Test Slave (RobotFrameworkTestSlave) in workspace C:\JenkinsAgent\agentRoot\workspace\TestJobRFTestingSlave
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

对应slave日志:

<===[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 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)

对应slave日志:

<===[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.get(Request.java:307)
    at hudson.remoting.Request.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)

google 搜索将我指向 https://issues.jenkins-ci.org/browse/JENKINS-19445 and https://issues.jenkins-ci.org/browse/JENKINS-48309。我不确定这是否与我的问题有关,但人们正在经历与我部分相同的事情。后者正在审查中,可能会在以后的某个版本中解决这个问题,但这只是一个猜测。

我已经通过使用 Java Web Start 而不是 Windows Remote Management 连接到从站来解决了我的问题。我以前试过这个,但它也有一些问题,但我设法解决了这些问题。