我正在尝试在单独的 Windows 10 机器上设置 Jenkins 从站。主程序在 Windows 8.1 上运行。slave.jar 正在使用 master 上的命令执行。我使用 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$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)
对应的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 日志中(在 Manage Jenkins->System Log->All Jenkins Logs)我看到出现以下错误消息:
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-19445和https://issues.jenkins-ci.org/browse/JENKINS-48309。我不确定这是否与我的问题有关,但人们正在经历部分与我相同的事情。后者正在审查中,可能会在以后的某个版本中解决这个问题,但这只是一个猜测。