jenkinssvnjenkins-pluginssvnkitwinrs

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


I am trying to setup a Jenkins slave on a separate Windows 10 machine. The master runs on windows 8.1. slave.jar is being executed with a command on the master. I do this using winrs: winrs -r:192.168.xxx.xxx -u:MyUserName -p:MyPassword java -jar C:\JenkinsAgent\slave.jar

I am at the point where executing a test job that solely runs echo Hello World as a batch command succeeds.

When I add modules to be checked out from an Subversion server the test job fails however. I see either one of the following two errors in the log of the test job and it seems rather random when either one pops up.

Error 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

Corresponding slave log:

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

Error 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)

Corresponding slave log:

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

So this only happens when I try to do a checkout on the slave since simply running echo Hello World works. Manually checking out the repository that I want to check out from the slave machine also works.

I am stuck with this problem since googling on all the info I have turned up empty and I don't know any other way to gather more information about what's actually happening.

Update1: In the general Jenkins log (at Manage Jenkins->System Log->All Jenkins Logs) I'm seeing this error message appearing:

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)

A google search pointed me to https://issues.jenkins-ci.org/browse/JENKINS-19445 and https://issues.jenkins-ci.org/browse/JENKINS-48309. I am not sure if this has anything to do with my problem but people are experiencing partly the same things as I do. The latter is in review and might fix this problem in some later release but that is just a guess.


Solution

  • I have solved my problem by using Java Web Start instead of Windows Remote Management to connect to the slave. I tried this before but it had some problems as well but I managed to solve those.