Build not failed if node terminated

39 views
Skip to first unread message

Viacheslav Dubrovskyi

unread,
Nov 6, 2018, 12:58:15 PM11/6/18
to Jenkins Users
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

Reply all
Reply to author
Forward
0 new messages