hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset

Jenkins JIRA | Ryan Croom | 3 years ago
  1. 0

    [JENKINS-22692] Jenkins Windows-Slave throwing exception on shutdown causes connection reset issues - Jenkins JIRA

    jenkins-ci.org | 4 months ago
    hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
  2. 0

    Using the most recent build of Jenkins I have been seeing connection issues after issuing reboot commands to targets. After looking at some logs it looks like the slave service on Windows may not be shutting down correctly and is not disconnecting from the Jenkins Server. I suspect that this is causing the reconnect issues that I'm seeing after the machine comes back online. Below is the failure as reported by the Jenkins server and excerpts from log files on the slave machine when the issue reproduced. Error as reported from Jenkins Server: FATAL: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:41) at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:34) at hudson.remoting.Request.call(Request.java:174) at hudson.remoting.Channel.call(Channel.java:722) at hudson.FilePath.act(FilePath.java:1009) at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvironmentVariablesNode(EnvironmentVariablesNodeLoader.java:44) at org.jenkinsci.plugins.envinject.EnvInjectListener.loadEnvironmentVariablesNode(EnvInjectListener.java:81) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:39) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:575) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:481) at hudson.model.Run.execute(Run.java:1700) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset at hudson.remoting.Request.abort(Request.java:299) at hudson.remoting.Channel.terminate(Channel.java:782) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:185) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:77) at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2265) at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2558) at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2568) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1314) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368) at hudson.remoting.Command.readFrom(Command.java:92) at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:71) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) From jenkins-slave.err.log: Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main createEngine INFO: Setting up slave: <Slave Machine> Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener <init> INFO: Jenkins agent is running in headless mode. Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Locating server among [http://<Jenkins Server>/] Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Connecting to <Jenkins Server> Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Handshaking Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener error SEVERE: The server rejected the connection: <Slave Machine> is already connected to this master. Rejecting this connection. java.lang.Exception: The server rejected the connection: <Slave Machine> is already connected to this master. Rejecting this connection. at hudson.remoting.Engine.onConnectionRejected(Engine.java:303) at hudson.remoting.Engine.run(Engine.java:276) From jenkins-slave.wrapper.log: 2014-04-19 23:52:14 - Stopping jenkinsslave-C__Jenkins 2014-04-19 23:52:14 - ProcessKill 3088 2014-04-19 23:52:15 - Shutdown exception Message:A system shutdown is in progress. (Exception from HRESULT: 0x8007045B) Stacktrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at System.Management.ManagementObjectSearcher.Initialize() at System.Management.ManagementObjectSearcher.Get() at winsw.WrapperService.StopProcessAndChildren(Int32 pid) at winsw.WrapperService.StopIt() at winsw.WrapperService.OnShutdown()

    Jenkins JIRA | 3 years ago | Ryan Croom
    hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
  3. 0

    Using the most recent build of Jenkins I have been seeing connection issues after issuing reboot commands to targets. After looking at some logs it looks like the slave service on Windows may not be shutting down correctly and is not disconnecting from the Jenkins Server. I suspect that this is causing the reconnect issues that I'm seeing after the machine comes back online. Below is the failure as reported by the Jenkins server and excerpts from log files on the slave machine when the issue reproduced. Error as reported from Jenkins Server: FATAL: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:41) at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:34) at hudson.remoting.Request.call(Request.java:174) at hudson.remoting.Channel.call(Channel.java:722) at hudson.FilePath.act(FilePath.java:1009) at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvironmentVariablesNode(EnvironmentVariablesNodeLoader.java:44) at org.jenkinsci.plugins.envinject.EnvInjectListener.loadEnvironmentVariablesNode(EnvInjectListener.java:81) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:39) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:575) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:481) at hudson.model.Run.execute(Run.java:1700) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset at hudson.remoting.Request.abort(Request.java:299) at hudson.remoting.Channel.terminate(Channel.java:782) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:185) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:77) at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2265) at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2558) at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2568) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1314) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368) at hudson.remoting.Command.readFrom(Command.java:92) at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:71) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) From jenkins-slave.err.log: Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main createEngine INFO: Setting up slave: <Slave Machine> Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener <init> INFO: Jenkins agent is running in headless mode. Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Locating server among [http://<Jenkins Server>/] Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Connecting to <Jenkins Server> Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Handshaking Apr 19, 2014 11:52:09 PM hudson.remoting.jnlp.Main$CuiListener error SEVERE: The server rejected the connection: <Slave Machine> is already connected to this master. Rejecting this connection. java.lang.Exception: The server rejected the connection: <Slave Machine> is already connected to this master. Rejecting this connection. at hudson.remoting.Engine.onConnectionRejected(Engine.java:303) at hudson.remoting.Engine.run(Engine.java:276) From jenkins-slave.wrapper.log: 2014-04-19 23:52:14 - Stopping jenkinsslave-C__Jenkins 2014-04-19 23:52:14 - ProcessKill 3088 2014-04-19 23:52:15 - Shutdown exception Message:A system shutdown is in progress. (Exception from HRESULT: 0x8007045B) Stacktrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at System.Management.ManagementObjectSearcher.Initialize() at System.Management.ManagementObjectSearcher.Get() at winsw.WrapperService.StopProcessAndChildren(Int32 pid) at winsw.WrapperService.StopIt() at winsw.WrapperService.OnShutdown()

    Jenkins JIRA | 3 years ago | Ryan Croom
    hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jenkins Node faild in startup

    Google Groups | 3 years ago | Андрей Семенов
    java.net.SocketException: Connection reset

  1. Andreas Häber 4 times, last 2 months ago
  2. sriharshakiran 1 times, last 7 months ago
14 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.SocketException

    Connection reset

    at java.net.SocketInputStream.read()
  2. Java RT
    BufferedInputStream.read
    1. java.net.SocketInputStream.read(SocketInputStream.java:185)
    2. java.io.FilterInputStream.read(FilterInputStream.java:133)
    3. java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    4. java.io.BufferedInputStream.read(BufferedInputStream.java:254)
    4 frames
  3. Hudson :: Remoting Layer
    FlightRecorderInputStream.read
    1. hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:77)
    1 frame
  4. Java RT
    ObjectInputStream.readObject
    1. java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2265)
    2. java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2558)
    3. java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2568)
    4. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1314)
    5. java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
    5 frames
  5. Hudson :: Remoting Layer
    SynchronousCommandTransport$ReaderThread.run
    1. hudson.remoting.Command.readFrom(Command.java:92)
    2. hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:71)
    3. hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
    3 frames