The jenkins agent is starting as expected and everything works as expected
But after a while the jenkins agent is crushed white the following error: java.io.IOException: The specified network name is no longer available
log:
INFO: Using C:\jenkins\remoting as a remoting work directory Apr 12, 2022 2:48:21 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging INFO: Both error and output logs will be printed to C:\jenkins\remoting Apr 12, 2022 2:48:22 PM hudson.remoting.jnlp.Main createEngine INFO: Setting up agent: JavaSeleniumProd Apr 12, 2022 2:48:22 PM hudson.remoting.jnlp.Main$CuiListener <init> INFO: Jenkins agent is running in headless mode. Apr 12, 2022 2:48:22 PM hudson.remoting.Engine startEngine INFO: Using Remoting version: 4.13 Apr 12, 2022 2:48:22 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir INFO: Using C:\jenkins\remoting as a remoting work directory Apr 12, 2022 2:48:23 PM hudson.remoting.jnlp.Main$CuiListener status INFO: WebSocket connection open Apr 12, 2022 2:48:23 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Connected Apr 12, 2022 8:26:34 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Read side closed Apr 12, 2022 8:26:34 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Terminated Apr 12, 2022 8:26:34 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Performing onReconnect operation. Apr 12, 2022 8:26:34 PM hudson.remoting.jnlp.Main$CuiListener status INFO: onReconnect operation completed. Apr 12, 2022 8:26:35 PM hudson.remoting.jnlp.Main$CuiListener status INFO: WebSocket connection open Apr 12, 2022 8:26:35 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Connected Apr 12, 2022 10:14:41 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Read side closed Apr 12, 2022 10:14:41 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Terminated Apr 12, 2022 10:14:41 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Performing onReconnect operation. Apr 12, 2022 10:14:41 PM hudson.remoting.jnlp.Main$CuiListener status INFO: onReconnect operation completed. Apr 12, 2022 10:14:42 PM hudson.remoting.jnlp.Main$CuiListener status INFO: WebSocket connection open Apr 12, 2022 10:14:42 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Connected Apr 13, 2022 5:00:26 AM io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.ClientFilter processError SEVERE: Connection error has occurred java.io.IOException: The specified network name is no longer available at java.base/sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:299) at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:389) at java.base/java.lang.Thread.run(Thread.java:831)Apr 13, 2022 5:00:26 AM hudson.remoting.Request$2 run WARNING: Failed to send back a reply to the request UserRequest:net.bull.javamelody.RemoteCallHelper$DelegatingTask@32b86951 java.io.IOException: An existing connection was forcibly closed by the remote host at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.write0(Native Method) at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$WriteTask.run(WindowsAsynchronousSocketChannelImpl.java:776) at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.implWrite(WindowsAsynchronousSocketChannelImpl.java:912) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:399) at java.base/java.nio.channels.AsynchronousSocketChannel.write(AsynchronousSocketChannel.java:582) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TransportFilter.write(TransportFilter.java:121) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.SslFilter$WriteQueue$1.run(SslFilter.java:681) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.SslFilter$WriteQueue.write(SslFilter.java:708) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.SslFilter.handleWrite(SslFilter.java:210) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.SslFilter.write(SslFilter.java:162) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TaskQueueFilter$WriteTask.execute(TaskQueueFilter.java:136) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TaskQueueFilter.processTask(TaskQueueFilter.java:67) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TaskQueueFilter.write(TaskQueueFilter.java:57) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.ClientFilter$JdkWriter.write(ClientFilter.java:278) at io.jenkins.remoting.shaded.org.glassfish.tyrus.spi.Writer.write(Writer.java:62) at io.jenkins.remoting.shaded.org.glassfish.tyrus.core.ProtocolHandler.write(ProtocolHandler.java:496) at io.jenkins.remoting.shaded.org.glassfish.tyrus.core.ProtocolHandler.send(ProtocolHandler.java:251) at io.jenkins.remoting.shaded.org.glassfish.tyrus.core.ProtocolHandler.send(ProtocolHandler.java:246) at io.jenkins.remoting.shaded.org.glassfish.tyrus.core.ProtocolHandler.stream(ProtocolHandler.java:420) at io.jenkins.remoting.shaded.org.glassfish.tyrus.core.TyrusWebSocket.sendBinary(TyrusWebSocket.java:481) at io.jenkins.remoting.shaded.org.glassfish.tyrus.core.TyrusWebSocket.sendBinary(TyrusWebSocket.java:451) at io.jenkins.remoting.shaded.org.glassfish.tyrus.core.TyrusRemoteEndpoint$Basic.sendBinary(TyrusRemoteEndpoint.java:128) at hudson.remoting.Engine$1AgentEndpoint$Transport.write(Engine.java:634) at hudson.remoting.AbstractByteBufferCommandTransport.write(AbstractByteBufferCommandTransport.java:303) at hudson.remoting.Channel.send(Channel.java:765) at hudson.remoting.Request$2.run(Request.java:389) at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:121) at java.base/java.lang.Thread.run(Thread.java:831)Apr 13, 2022 5:00:26 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Read side closed Apr 13, 2022 5:00:26 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Terminated Apr 13, 2022 5:00:27 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Performing onReconnect operation. Apr 13, 2022 5:00:27 AM hudson.remoting.jnlp.Main$CuiListener status INFO: onReconnect operation completed. Apr 13, 2022 5:00:28 AM hudson.remoting.jnlp.Main$CuiListener error SEVERE: Handshake error. io.jenkins.remoting.shaded.javax.websocket.DeploymentException: Handshake error. at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:658) at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:696) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:849) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123) at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:493) at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:337) at hudson.remoting.Engine.runWebSocket(Engine.java:656) at hudson.remoting.Engine.run(Engine.java:495) Caused by: io.jenkins.remoting.shaded.org.glassfish.tyrus.core.HandshakeException: Response code was not 101: 500. at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:299) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.ClientFilter.processRead(ClientFilter.java:167) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.onRead(Filter.java:111) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.onRead(Filter.java:113) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.SslFilter.handleRead(SslFilter.java:384) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.SslFilter.processRead(SslFilter.java:347) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.onRead(Filter.java:111) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.onRead(Filter.java:113) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TransportFilter$4.completed(TransportFilter.java:294) at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TransportFilter$4.completed(TransportFilter.java:278) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:219) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:831)
I have tried to add the dns resolvers: 8.8.8.8 & 1.1.1.1 , But it didn't help and I got after a while the same error
Would like to have additional reconnect retries on this kind of issue