Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (From IRC)
- Is anyone around that can tell me about how Jenkins jobs can persist around the restart of a master server?
- I've read about this mostly in the context of last year or so in pipelines' evolution... but somehow got an understanding that standalone agents (swarm, jnlp... those that are not child processes of master JVM, not launched over SSH from it, etc.) whose JVMs keep running regardless of master restart - jobs running in them would also survive and resume reporting their logs when the master comes back alive and the agent is reconnected.
- So I tried with a swarm client, hoping to put our longest-running jobs like stress/survivability/etc. tests there, jobs which run for hours and block opportunities for master (or plugin) updates
- But when the master was restarted (deliberately not very gracefully first, as "systemctl restart jenkins"), then upon restart the job log contained a few new lines - a stacktrace about lost remoting channel (possibly closed still as part of master teardown) :
- FATAL: command execution failed
- java.io.IOException
- at hudson.remoting.Channel.close(Channel.java:1428)
- at hudson.remoting.Channel.close(Channel.java:1405)
- at hudson.slaves.SlaveComputer.closeChannel(SlaveComputer.java:844)
- at hudson.slaves.SlaveComputer.kill(SlaveComputer.java:811)
- at hudson.model.AbstractCIBase.killComputer(AbstractCIBase.java:89)
- at jenkins.model.Jenkins.access$2100(Jenkins.java:312)
- at jenkins.model.Jenkins$19.run(Jenkins.java:3464)
- at hudson.model.Queue._withLock(Queue.java:1379)
- at hudson.model.Queue.withLock(Queue.java:1256)
- at jenkins.model.Jenkins._cleanUpDisconnectComputers(Jenkins.java:3458)
- at jenkins.model.Jenkins.cleanUp(Jenkins.java:3336)
- at hudson.WebAppMain.contextDestroyed(WebAppMain.java:379)
- at org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:965)
- at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:566)
- at org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:942)
- at org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:376)
- at org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1503)
- at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1467)
- at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:1009)
- at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:288)
- at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
- at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
- at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:178)
- at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:199)
- at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
- at org.eclipse.jetty.server.Server.doStop(Server.java:464)
- at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
- at winstone.Launcher.shutdown(Launcher.java:313)
- at winstone.ShutdownHook.run(ShutdownHook.java:25)
- Caused: hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from webproxy.localdomain/10.0.0.2:48049 failed. The channel is closing down or has closed down
- at hudson.remoting.Channel.call(Channel.java:950)
- at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:283)
- at com.sun.proxy.$Proxy105.isAlive(Unknown Source)
- at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1150)
- at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1142)
- at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)
- at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
- at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
- at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
- at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
- at hudson.model.Build$BuildExecution.build(Build.java:206)
- at hudson.model.Build$BuildExecution.doRun(Build.java:163)
- at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
- at hudson.model.Run.execute(Run.java:1815)
- at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
- at hudson.model.ResourceController.execute(ResourceController.java:97)
- at hudson.model.Executor.run(Executor.java:429)
- FATAL: Unable to delete script file /tmp/jenkins3171735084038584934.sh
- java.nio.channels.ClosedChannelException
- at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:209)
- at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
- at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816)
- at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
- at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:181)
- at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283)
- at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503)
- at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248)
- at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200)
- at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213)
- at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:784)
- at org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:173)
- at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:314)
- at hudson.remoting.Channel.close(Channel.java:1452)
- at hudson.remoting.Channel.close(Channel.java:1405)
- at hudson.slaves.SlaveComputer.closeChannel(SlaveComputer.java:844)
- at hudson.slaves.SlaveComputer.kill(SlaveComputer.java:811)
- at hudson.model.AbstractCIBase.killComputer(AbstractCIBase.java:89)
- at jenkins.model.Jenkins.access$2100(Jenkins.java:312)
- at jenkins.model.Jenkins$19.run(Jenkins.java:3464)
- at hudson.model.Queue._withLock(Queue.java:1379)
- at hudson.model.Queue.withLock(Queue.java:1256)
- at jenkins.model.Jenkins._cleanUpDisconnectComputers(Jenkins.java:3458)
- at jenkins.model.Jenkins.cleanUp(Jenkins.java:3336)
- at hudson.WebAppMain.contextDestroyed(WebAppMain.java:379)
- at org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:965)
- at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:566)
- at org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:942)
- at org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:376)
- at org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1503)
- at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1467)
- at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:1009)
- at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:288)
- at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
- at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
- at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:178)
- at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:199)
- at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
- at org.eclipse.jetty.server.Server.doStop(Server.java:464)
- at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
- at winstone.Launcher.shutdown(Launcher.java:313)
- at winstone.ShutdownHook.run(ShutdownHook.java:25)
- Caused: hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from webproxy.localdomain/10.0.0.2:48049 failed. The channel is closing down or has closed down
- at hudson.remoting.Channel.call(Channel.java:950)
- at hudson.FilePath.act(FilePath.java:1072)
- at hudson.FilePath.act(FilePath.java:1061)
- at hudson.FilePath.delete(FilePath.java:1542)
- at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:123)
- at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
- at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
- at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
- at hudson.model.Build$BuildExecution.build(Build.java:206)
- at hudson.model.Build$BuildExecution.doRun(Build.java:163)
- at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
- at hudson.model.Run.execute(Run.java:1815)
- at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
- at hudson.model.ResourceController.execute(ResourceController.java:97)
- at hudson.model.Executor.run(Executor.java:429)
- Build step 'Execute shell' marked build as failure
- [BFA] Scanning build for known causes...
- [BFA] No failure causes found
- [BFA] Done. 0s
- Collecting metadata...
- Metadata collection done.
- Finished: FAILURE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement