Discussion:
Build not failed if node terminated
Viacheslav Dubrovskyi
2018-11-06 17:58:04 UTC
Permalink
Hi,

I use swarm plugin as slave agent. And use GCE for slaves. The problem,
that node termination, not lead to build fail. It waits manual
interruption and only after it stops.

In log I see:

Nov 06, 2018 7:29:56 PM jenkins.slaves.DefaultJnlpSlaveReceiver
channelClosed
WARNING: IOHub#1:
Worker[channel:java.nio.channels.SocketChannel[connected
local=/10.142.0.3:42295
remote=test-centos7-123.c.oro-product-development.internal/10.142.0.5:57866]]
/ Computer.threadPoolForRemoting [#8371] for test-centos7-123 terminated
java.nio.channels.ClosedChannelException
        at
org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
        at
org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)
        at
org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:795)
        at
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
        at
jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
        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)

In this time in build log I see
[Test] Cannot contact test-centos7-123:
hudson.remoting.ChannelClosedException: Channel "unknown": Remote call
on JNLP4-connect connection from
test-centos7-123.c.oro-product-development.internal/10.142.0.5:57866
failed. The channel is closing down or has closed down

And build not failed.

How to make build failed if it get such error?

How to reproduce: Run pipeline:

node ('test'){
     stage ("Test"){
           sh """
                    for i in 300; do
                    sleep 1
                    echo \$i
                    done
           """
     }
}

And during build working kill java on slave.
--
WBD,
Viacheslav Dubrovskyi
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8127db92-63b8-9657-c9cb-29e70e1d932e%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...