您好我有以下错误,但我的节点已启动并且在jenkins日志中一切正常但是在我的一些工作正在节点上我遇到了以下问题
12:59:29 [EnvInject] - Loading node environment variables.
12:59:29 ERROR: SEVERE ERROR occurs
12:59:29 org.jenkinsci.lib.envinject.EnvInjectException: hudson.remoting.ChannelClosedException: channel is already closed
12:59:29 at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvironmentVariablesNode(EnvironmentVariablesNodeLoader.java:75)
12:59:29 at org.jenkinsci.plugins.envinject.EnvInjectListener.loadEnvironmentVariablesNode(EnvInjectListener.java:81)
12:59:29 at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:39)
12:59:29 at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:637)
12:59:29 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:543)
12:59:29 at hudson.model.Run.execute(Run.java:1676)
12:59:29 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
12:59:29 at hudson.model.ResourceController.execute(ResourceController.java:88)
12:59:29 at hudson.model.Executor.run(Executor.java:231)
12:59:29 Caused by: hudson.remoting.ChannelClosedException: channel is already closed
12:59:29 at hudson.remoting.Channel.send(Channel.java:524)
12:59:29 at hudson.remoting.Request.call(Request.java:129)
12:59:29 at hudson.remoting.Channel.call(Channel.java:722)
12:59:29 at hudson.FilePath.act(FilePath.java:1003)
12:59:29 at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvironmentVariablesNode(EnvironmentVariablesNodeLoader.java:44)
12:59:29 ... 8 more
12:59:29 Caused by: java.io.IOException
12:59:29 at hudson.remoting.Channel.close(Channel.java:1007)
12:59:29 at hudson.slaves.ChannelPinger$1.onDead(ChannelPinger.java:110)
12:59:29 at hudson.remoting.PingThread.ping(PingThread.java:120)
12:59:29 at hudson.remoting.PingThread.run(PingThread.java:81)
12:59:29 Caused by: java.util.concurrent.TimeoutException: Ping started on 1401694124050 hasn't completed at 1401694364050
12:59:29 ... 2 more
12:59:29 Archiving artifacts
12:59:29 Email was triggered for: Failure
12:59:29 Sending email for trigger: Failure
12:59:29 ERROR: Error: No workspace found!
12:59:29 Error retrieving environment vars: channel is already closed
12:59:29 Sending email to: $EMAIL_USERS
12:59:49 Error sending to the following INVALID addresses: $EMAIL_USERS
12:59:49 [EnvInject] - [ERROR] - SEVERE ERROR occurs: channel is already closed
12:59:49 Finished: FAILURE
答案 0 :(得分:44)
我不知道原因,但是在重启奴隶机器或机器丢失连接后(很长一段时间内)都会发生这种情况。
问题(在我的情况下)是java -jar slave.jar进程没有在slave中运行。 要解决此问题,请尝试重新连接Jenkins菜单中的节点,因此请转到:
管理Jenkins - >管理节点 - > YOUR_NODE - >断开
管理Jenkins - >管理节点 - > YOUR_NODE - >启动奴隶代理
答案 1 :(得分:2)
这对我有用:
在我的情况下,它自动重新连接,我从那里开始。
答案 2 :(得分:1)
如果您没有配置DNS,并且从属IP地址在作业之间突然改变,也可能发生这种情况。断开/重新启动从属代理与适当的IP地址也有帮助。
答案 3 :(得分:0)
在我的情况下,詹金斯奴隶挂了。我无法ssh和检查。虽然从节点在线显示。但是在尝试断开连接并重新连接时无法连接。
在我的情况下,我重新启动了我的从属节点,然后它工作正常。
答案 4 :(得分:0)
清洁工作区。许多已保存和缓存的内容都可能导致此类错误