Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24895

An existing connection was forcibly closed by the remote host

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: core, remoting
    • Environment:
      Master: Widows Server 2008 R2, Jenkins 1.565.1
      Slave: See this issue on Win 7/ Windows Server 2008R2 slave.
    • Similar Issues:

      Description

      We have a testing which will run for several hours. We meet intermittent failure like below which terminated the testing and the job just failed.

      12:42:10 FATAL: hudson.remoting.RequestAbortedException: java.io.IOException: An existing connection was forcibly closed by the remote host
      12:42:10 hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.IOException: An existing connection was forcibly closed by the remote host
      12:42:10 at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:41)
      12:42:10 at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:34)
      12:42:10 at hudson.remoting.Request.call(Request.java:174)
      12:42:10 at hudson.remoting.Channel.call(Channel.java:739)
      12:42:10 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:168)
      12:42:10 at com.sun.proxy.$Proxy61.join(Unknown Source)
      12:42:10 at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:956)
      12:42:10 at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:137)
      12:42:10 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:97)
      12:42:10 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
      12:42:10 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      12:42:10 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
      12:42:10 at hudson.model.Build$BuildExecution.build(Build.java:198)
      12:42:10 at hudson.model.Build$BuildExecution.doRun(Build.java:159)
      12:42:10 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      12:42:10 at hudson.model.Run.execute(Run.java:1706)
      12:42:10 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      12:42:10 at hudson.model.ResourceController.execute(ResourceController.java:88)
      12:42:10 at hudson.model.Executor.run(Executor.java:232)
      12:42:10 Caused by: hudson.remoting.RequestAbortedException: java.io.IOException: An existing connection was forcibly closed by the remote host
      12:42:10 at hudson.remoting.Request.abort(Request.java:299)
      12:42:10 at hudson.remoting.Channel.terminate(Channel.java:802)
      12:42:10 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69)
      12:42:10 Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
      12:42:10 at sun.nio.ch.SocketDispatcher.read0(Native Method)
      12:42:10 at sun.nio.ch.SocketDispatcher.read(Unknown Source)
      12:42:10 at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
      12:42:10 at sun.nio.ch.IOUtil.read(Unknown Source)
      12:42:10 at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
      12:42:10 at hudson.remoting.SocketChannelStream$1.read(SocketChannelStream.java:33)
      12:42:10 at sun.nio.ch.ChannelInputStream.read(Unknown Source)
      12:42:10 at sun.nio.ch.ChannelInputStream.read(Unknown Source)
      12:42:10 at sun.nio.ch.ChannelInputStream.read(Unknown Source)
      12:42:10 at java.io.InputStream.read(Unknown Source)
      12:42:10 at sun.nio.ch.ChannelInputStream.read(Unknown Source)
      12:42:10 at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:82)
      12:42:10 at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
      12:42:10 at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
      12:42:10 at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
      12:42:10 at java.io.ObjectInputStream.readObject0(Unknown Source)
      12:42:10 at java.io.ObjectInputStream.readObject(Unknown Source)
      12:42:10 at hudson.remoting.Command.readFrom(Command.java:92)
      12:42:10 at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:70)
      12:42:10 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

        Attachments

          Issue Links

            Activity

            Hide
            graz G. Ancona added a comment -

            Hi Anuvrath,
            we had the same error randomly using the windows services, since we launched Jenkins via batch we don't have it anymore.

            Show
            graz G. Ancona added a comment - Hi Anuvrath, we had the same error randomly using the windows services, since we launched Jenkins via batch we don't have it anymore.
            Hide
            anuvrath Anuvrath Joshi added a comment -

            Hello Graziano,

            Thanks for your suggestion. But one more question, are you talking about launching the slave nodes using batch or Main Jenkins itself?

            Show
            anuvrath Anuvrath Joshi added a comment - Hello Graziano, Thanks for your suggestion. But one more question, are you talking about launching the slave nodes using batch or Main Jenkins itself?
            Hide
            ikey Leslie Klein added a comment -

            Hi Graziano/anynoe, can you contribute some insight to our findings?
            1. We run the Jenkins job after the slave has been activated as a slave-agent launched from browser - result, the job runs to completion with successful termination.
            2.We run the slave using the batch command that you attached above - result, the job runs for 7 minutes and then terminates on the server with the "SocketException: connection reset" error below (the actual job on the slave continues to run and completes successfully after about another 3 minutes).
            3.If we run the slave as a Service, we receive the connection reset error after about 2-3 minutes.
            4.There are no error messages in the Jenkins Server Event Viewer coinciding with the connection reset error under any of the above cases.
            5.We did notice a peak on Jenkins CPU usage when the connection was reset.

            Error trace
            -----------
            FATAL: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
            hudson.remoting.RequestAbortedExcepton: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset
            at hudson.remoting.RequestAbortedExcepton.wrapForRethrow(RequestAbortedException.java:41)
            at hudson.remoting.RequestAbortedExcepton.wrapForRethrow(RequestAbortedException.java:34)
            at hudson.remoting.Request.call(Request.java:174)
            at hudson.remoting.Request.call(Request.java:722)

            and so on

            Show
            ikey Leslie Klein added a comment - Hi Graziano/anynoe, can you contribute some insight to our findings? 1. We run the Jenkins job after the slave has been activated as a slave-agent launched from browser - result, the job runs to completion with successful termination. 2.We run the slave using the batch command that you attached above - result, the job runs for 7 minutes and then terminates on the server with the "SocketException: connection reset" error below (the actual job on the slave continues to run and completes successfully after about another 3 minutes). 3.If we run the slave as a Service, we receive the connection reset error after about 2-3 minutes. 4.There are no error messages in the Jenkins Server Event Viewer coinciding with the connection reset error under any of the above cases. 5.We did notice a peak on Jenkins CPU usage when the connection was reset. Error trace ----------- FATAL: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset hudson.remoting.RequestAbortedExcepton: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection reset at hudson.remoting.RequestAbortedExcepton.wrapForRethrow(RequestAbortedException.java:41) at hudson.remoting.RequestAbortedExcepton.wrapForRethrow(RequestAbortedException.java:34) at hudson.remoting.Request.call(Request.java:174) at hudson.remoting.Request.call(Request.java:722) and so on
            Hide
            graz G. Ancona added a comment -

            Hi
            @Anuvrath: I launched only the slaves via batch, the server is still running as a service
            @Leslie: Seems more this problem: https://issues.jenkins-ci.org/browse/JENKINS-18781

            Show
            graz G. Ancona added a comment - Hi @Anuvrath: I launched only the slaves via batch, the server is still running as a service @Leslie: Seems more this problem: https://issues.jenkins-ci.org/browse/JENKINS-18781
            Hide
            anuvrath Anuvrath Joshi added a comment -

            Hello @Graziano,

            Am already running them as just an application using slave-agent instead of Widows service due network issues. But Master is running as Windows service.

            Show
            anuvrath Anuvrath Joshi added a comment - Hello @Graziano, Am already running them as just an application using slave-agent instead of Widows service due network issues. But Master is running as Windows service.

              People

              • Assignee:
                Unassigned
                Reporter:
                sharon_xia sharon xia
              • Votes:
                8 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: