我已经将Jenkins更新到最新版本(Jenkins版本2.164.1),并且Selenium Grid版本是:3.12.0。主服务器(在其中运行集线器)上的Java版本是:openjdk版本“ 1.8.0_191”,从服务器上是:Java版本“ 1.8.0_191”和SSH Slave插件版本1.11。当点头试图连接到奴隶时会抛出错误:
[04/02/19 09:29:28] [SSH] Starting sftp client. [04/02/19 09:29:28] [SSH] Copying latest slave.jar... [04/02/19 09:29:28] [SSH] Copied 789,283 bytes. Expanded the channel window size to 4MB [04/02/19 09:29:28] [SSH] Starting slave process: cd "/var/jenkins" && /usr/lib/jvm/jdk1.8.0_191/bin/java -Xmx128m -Xms128m -jar slave.jar channel started Remoting version: 3.29 This is a Unix agent Evacuated stdout Starting Selenium nodes on automation-jenkins-node Apr 02, 2019 9:29:30 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de-)serialize anonymous class hudson.plugins.selenium.configuration.DirectJsonInputConfiguration$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ hudson.util.IOException2: Slave JVM has not reported exit code. Is it still running? at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:984) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:137) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:725) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Failed to copy /var/lib/jenkins/plugins/selenium/WEB-INF/lib/selenium-server-standalone-3.12.0.jar to /var/jenkins/selenium-server-standalone-3.12.0.jar at hudson.FilePath.copyTo(FilePath.java:2191) at hudson.plugins.selenium.callables.SeleniumCallable.invoke(SeleniumCallable.java:76) at hudson.plugins.selenium.callables.SeleniumCallable.invoke(SeleniumCallable.java:23) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3041) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) ... 4 more Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to automation-jenkins-node
使用SSH Slave插件1.29版会引发不同的错误:
[04/02/19 13:52:10] [SSH] Starting sftp client. [04/02/19 13:52:10] [SSH] Copying latest remoting.jar... [04/02/19 13:52:10] [SSH] Copied 789,283 bytes. Expanded the channel window size to 4MB [04/02/19 13:52:10] [SSH] Starting agent process: cd "/var/jenkins" && /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx128m -Xms128m -jar remoting.jar -workDir /var/jenkins Apr 02, 2019 1:52:10 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir INFO: Using /var/jenkins/remoting as a remoting work directory Both error and output logs will be printed to /var/jenkins/remoting channel started Remoting version: 3.29 This is a Unix agent Evacuated stdout Starting Selenium nodes on automation-jenkins-node Apr 02, 2019 1:52:13 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de-)serialize anonymous class hudson.plugins.selenium.configuration.DirectJsonInputConfiguration$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ Slave JVM has not reported exit code. Is it still running? [04/02/19 13:52:18] Launch failed - cleaning up connection [04/02/19 13:52:18] [SSH] Connection closed. ERROR: Connection terminated java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2681) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3156) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:862) at java.io.ObjectInputStream.(ObjectInputStream.java:358) at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:49) at hudson.remoting.Command.readFrom(Command.java:140) at hudson.remoting.Command.readFrom(Command.java:126) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63) Caused: java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)