Issue with Jenkins Node Disconnection - ChannelClosedException on Windows 11

Hello Jenkins Community,

I’m experiencing an issue where my Jenkins node, running on Windows 11, disconnects unexpectedly with the following error logs:

Aug 19, 2024 2:13:28 PM hudson.remoting.Channel$1 handle
FINE: Received ProxyOutputStream.Ack(5989,24)
Aug 19, 2024 2:13:28 PM hudson.remoting.Channel$1 handle
FINE: Completed command ProxyOutputStream.Ack(5989,24). It took 1ms
Aug 19, 2024 2:13:38 PM io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.ClientFilter processError
SEVERE: Connection error has occurred
java.io.IOException: The I/O operation has been aborted because of either a thread exit or an application request.

	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:829)

Aug 19, 2024 2:13:38 PM hudson.remoting.Engine$1AgentEndpoint onClose
FINE: onClose: CloseReason[1006,Closed abnormally.]
Aug 19, 2024 2:13:38 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Read side closed
Aug 19, 2024 2:13:38 PM io.jenkins.remoting.shaded.org.glassfish.tyrus.core.TyrusRemoteEndpoint close
FINE: Close public void close(CloseReason cr): CloseReason[1000]
Aug 19, 2024 2:13:38 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
Aug 19, 2024 2:13:38 PM hudson.slaves.ChannelPinger$2 onClosed
FINE: Terminating ping thread for builder-2023
Aug 19, 2024 2:13:38 PM hudson.remoting.PingThread run
FINE: Ping thread for channel hudson.remoting.Channel@2d142701:builder-2023 is interrupted. Terminating
Aug 19, 2024 2:13:38 PM hudson.util.ProcessTree killAll
FINE: killAll: process=Process[pid=6584, exitValue="not exited"] and envs=
Aug 19, 2024 2:13:38 PM hudson.util.ProcessTree killAll
FINE: killAll: process=Process[pid=21316, exitValue="not exited"] and envs=
Aug 19, 2024 2:13:38 PM org.jvnet.winp.WinProcess sendCtrlC
FINE: Attempting to send CTRL+C to pid=21316 (cmd.exe /C "C:\v2023-Development\gradlew.bat && exit %%ERRORLEVEL%%")
Aug 19, 2024 2:13:38 PM org.jvnet.winp.WinProcess sendCtrlC
FINE: Attempting to send CTRL+C to pid=6584 (cmd.exe /C "C:\apps\apache-ant-1.7.1\bin\ant.bat -file build.xml -DBAR2=0.0000 -Dver=2023 && exit %%ERRORLEVEL%%")
Aug 19, 2024 2:13:38 PM org.jvnet.winp.WinProcess killRecursively
FINE: Attempting to recursively kill pid=21316 (cmd.exe /C "C:\apps\apache-ant-1.7.1\bin\ant.bat -file build.xml -DBAR2=0.0000 -Dver=2023 && exit %%ERRORLEVEL%%")
Aug 19, 2024 2:13:38 PM hudson.util.ProcessTree getKillers
WARNING: Failed to obtain killers
hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@2d142701:builder-2023": Remote call on builder-2023 failed. The channel is closing down or has closed down
	at hudson.remoting.Channel.call(Channel.java:996)
	at hudson.util.ProcessTree.getKillers(ProcessTree.java:196)
	at hudson.util.ProcessTree$OSProcess.killByKiller(ProcessTree.java:264)
	at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:570)
	at hudson.util.ProcessTree.killAll(ProcessTree.java:180)
	at hudson.Proc$LocalProc.destroy(Proc.java:388)
	at hudson.Proc$LocalProc.join(Proc.java:361)
	at hudson.Launcher$RemoteLaunchCallable$1.join(Launcher.java:1401)
	at jdk.internal.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:924)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:902)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:853)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:377)
	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:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@2d142701:builder-2023": channel is already closed
	at hudson.remoting.Engine$1AgentEndpoint.lambda$onClose$1(Engine.java:637)
	... 6 more

Aug 19, 2024 2:13:38 PM org.jvnet.winp.WinProcess killRecursively
FINE: Attempting to recursively kill pid=6584 (cmd.exe /C "C:\apps\apache-ant-1.7.1\bin\ant.bat -file build.xml -DBAR2=0.0000 -Dver=2023 && exit %%ERRORLEVEL%%")
Aug 19, 2024 2:13:38 PM hudson.util.ProcessTree getKillers
WARNING: Failed to obtain killers
hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@2d142701:builder-2023": Remote call on builder-2023 failed. The channel is closing down or has closed down
	at hudson.remoting.Channel.call(Channel.java:996)
	at hudson.util.ProcessTree.getKillers(ProcessTree.java:196)
	at hudson.util.ProcessTree$OSProcess.killByKiller(ProcessTree.java:264)
	at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:570)
	at hudson.util.ProcessTree.killAll(ProcessTree.java:180)
	at hudson.Proc$LocalProc.destroy(Proc.java:388)
	at hudson.Proc$LocalProc.join(Proc.java:361)
	at hudson.Launcher$RemoteLaunchCallable$1.join(Launcher.java:1401)
	at jdk.internal.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:924)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:902)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:853)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:377)
	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:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@2d142701:builder-2023": channel is already closed
	at hudson.remoting.Engine$1AgentEndpoint.lambda$onClose$1(Engine.java:637)
	... 6 more

Aug 19, 2024 2:13:38 PM org.jvnet.winp.WinProcess sendCtrlC
FINE: Attempting to send CTRL+C to pid=2100 ("C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\ServiceHub\controller\Microsoft.ServiceHub.Controller.exe")
Aug 19, 2024 2:13:38 PM hudson.util.ProcessTree$WindowsOSProcess killSoftly
FINE: Failed to send CTRL+C to pid=2100
org.jvnet.winp.WinpException: Failed to send Ctrl+C, sendctrlc.x64.B37C5E935F3DA60B2940592241F826DA.exe terminated with exit code 6, output: 
	at org.jvnet.winp.CtrlCSender.sendCtrlC(CtrlCSender.java:38)
	at org.jvnet.winp.Native.sendCtrlC(Native.java:95)
	at org.jvnet.winp.WinProcess.sendCtrlC(WinProcess.java:86)
	at hudson.util.ProcessTree$WindowsOSProcess.killSoftly(ProcessTree.java:589)
	at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:568)
	at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:717)
	at hudson.util.ProcessTree.killAll(ProcessTree.java:184)
	at hudson.Proc$LocalProc.destroy(Proc.java:388)
	at hudson.Proc$LocalProc.join(Proc.java:361)
	at hudson.Launcher$RemoteLaunchCallable$1.join(Launcher.java:1401)
	at jdk.internal.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:924)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:902)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:853)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:377)
	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:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
	at java.base/java.lang.Thread.run(Thread.java:829)

Aug 19, 2024 2:13:38 PM org.jvnet.winp.WinProcess killRecursively
FINE: Attempting to recursively kill pid=2100 ("C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\ServiceHub\controller\Microsoft.ServiceHub.Controller.exe" )
Aug 19, 2024 2:13:39 PM org.jvnet.winp.WinProcess sendCtrlC
FINE: Attempting to send CTRL+C to pid=1616 ("C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\MSBuild.exe" /nologo /nodemode:1 /nodeReuse:true /low:false)
Aug 19, 2024 2:13:39 PM org.jvnet.winp.WinProcess sendCtrlC
FINE: Attempting to send CTRL+C to pid=19868 (C:\apps\jdk21.0.4_7\bin\java.exe --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xms2g -Xmx2g -Dfile.encoding=windows-1252 -Duser.country=UK -Duser.language=en -Duser.variant -cp C:\g\wrapper\dists\gradle-8.6-bin\afr5mpiioh2wthjmwnkmdsd5w\gradle-8.6\lib\gradle-launcher-8.6.jar -javaagent:C:\g\wrapper\dists\gradle-8.6-bin\afr5mpiioh2wthjmwnkmdsd5w\gradle-8.6\lib\agents\gradle-instrumentation-agent-8.6.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.6)
Aug 19, 2024 2:13:39 PM hudson.util.ProcessTree$WindowsOSProcess killSoftly
FINE: Failed to send CTRL+C to pid=19868
org.jvnet.winp.WinpException: Failed to send Ctrl+C, sendctrlc.x64.B37C5E935F3DA60B2940592241F826DA.exe terminated with exit code 6, output: 
	at org.jvnet.winp.CtrlCSender.sendCtrlC(CtrlCSender.java:38)
	at org.jvnet.winp.Native.sendCtrlC(Native.java:95)
	at org.jvnet.winp.WinProcess.sendCtrlC(WinProcess.java:86)
	at hudson.util.ProcessTree$WindowsOSProcess.killSoftly(ProcessTree.java:589)
	at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:568)
	at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:717)
	at hudson.util.ProcessTree.killAll(ProcessTree.java:184)
	at hudson.Proc$LocalProc.destroy(Proc.java:388)
	at hudson.Proc$LocalProc.join(Proc.java:361)
	at hudson.Launcher$RemoteLaunchCallable$1.join(Launcher.java:1401)
	at jdk.internal.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:924)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:902)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:853)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:377)
	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:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
	at java.base/java.lang.Thread.run(Thread.java:829)
Aug 19, 2024 2:13:44 PM org.jvnet.winp.WinProcess killRecursively
FINE: Attempting to recursively kill pid=1616 ("C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\MSBuild.exe" /nologo /nodemode:1 /nodeReuse:true /low:false)
Aug 19, 2024 2:13:44 PM org.jvnet.winp.WinProcess sendCtrlC
FINE: Attempting to send CTRL+C to pid=1664 ("C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\MSBuild.exe" /nologo /nodemode:1 /nodeReuse:true /low:false)
Aug 19, 2024 2:13:48 PM sun.net.www.protocol.http.HttpURLConnection plainConnect0
FINEST: ProxySelector Request for http://builder/login
Aug 19, 2024 2:13:48 PM sun.net.www.protocol.http.HttpURLConnection plainConnect0
FINEST: Proxy used: DIRECT
Aug 19, 2024 2:13:48 PM sun.net.www.protocol.http.HttpURLConnection writeRequests
FINE: sun.net.www.MessageHeader@17597ae15 pairs: {GET /login HTTP/1.1: null}{User-Agent: Java/11.0.21}{Host: builder}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
Aug 19, 2024 2:13:48 PM sun.net.www.http.HttpClient logFinest
FINEST: KeepAlive stream used: http://builder/login
Aug 19, 2024 2:13:48 PM sun.net.www.protocol.http.HttpURLConnection getInputStream0
ERROR: builder-2023 is offline; cannot locate JDK_21.0.2_14

Additional details:

  • OS: Windows 11
  • Jenkins Version: 2.426.3
  • Running Jenkins as a Windows Service: WinSW

I have a similar setup on Windows 10, and there are no issues with that node. This problem appears only on the Windows 11 node and occurs intermittently.

Has anyone else encountered similar issues? Any suggestions on how to troubleshoot or resolve this would be greatly appreciated.

Thank you!