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

Jenkins windows agent fails to start after update to 2.318

      After upgrading Jenkins from 2.3.16 to 2.3.18 on 1st November 2021, we started facing issue with Windows Agent unable to start. If we try to manually start them, it use to start and then immediately show as terminated. After trying lot of fixes, we had to rollback the version to 2.316 and that seems to have fixed the issue.

      So wanted to know, if this a known bug in this release.

          [JENKINS-67069] Jenkins windows agent fails to start after update to 2.318

          In your production environment, it would be safer to run only LTS releases of Jenkins.

          Between 2.316 and 2.318, Remoting was upgraded to address JENKINS-61212 and JENKINS-64831. That might be related.

          Anyway, the log files of the agents may indicate what the problem is.

          Kalle Niemitalo added a comment - In your production environment, it would be safer to run only LTS releases of Jenkins. Between 2.316 and 2.318, Remoting was upgraded to address JENKINS-61212 and JENKINS-64831 . That might be related. Anyway, the log files of the agents may indicate what the problem is.

          Mark Waite added a comment -

          We've received other reports that 2.318 was unable to connect Windows agents, but the submitter did not provide enough information so that others could duplicate the problem. Can you share more details that describe the issue in enough detail so that others can duplicate your configuration?

          • Where is the controller running (operating system, Java version)?
          • Where is the agent running (operating system, Java version)?
          • How is the agent launched (batch file, web start, some other method)?
          • What plugins are installed on the controller (precise versions)?
          • Are there any special details about network configuration that might cause you to see this issue but prevent others from seeing it?
          • Are there other details that might make your Jenkins installation different from other Jenkins installations?

          Mark Waite added a comment - We've received other reports that 2.318 was unable to connect Windows agents, but the submitter did not provide enough information so that others could duplicate the problem. Can you share more details that describe the issue in enough detail so that others can duplicate your configuration? Where is the controller running (operating system, Java version)? Where is the agent running (operating system, Java version)? How is the agent launched (batch file, web start, some other method)? What plugins are installed on the controller (precise versions)? Are there any special details about network configuration that might cause you to see this issue but prevent others from seeing it? Are there other details that might make your Jenkins installation different from other Jenkins installations?

           

          2022-02-04 04:58:25.594+0000 [id=381] INFO h.TcpSlaveAgentListener$ConnectionHandler#run: Connection #13 failed: java.io.EOFException
          2022-02-04 04:58:25.631+0000 [id=382] INFO h.TcpSlaveAgentListener$ConnectionHandler#run: Accepted JNLP4-connect connection #14 from /****:13848
          2022-02-04 04:58:26.710+0000 [id=336] INFO j.s.DefaultJnlpSlaveReceiver#channelClosed: Computer.threadPoolForRemoting [#181] for buildserver_59 terminated: java.nio.channels.ClosedChannelException
          2022-02-04 04:58:26.712+0000 [id=332] INFO hudson.remoting.Request$2#run: Failed to send back a reply to the request UserRequest:UserRPCRequest:hudson.remoting.JarLoader.writeJarTo[long,long,java.io.OutputStream](3): hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@44b318c9:JNLP4-connect connection from ****/****:13848": channel is already closed
          

          This error message is shown in jenkins.err.log when I try to connect with .jnlp file.

           

          I'm using JDK 1.8.0_202 on windows for both jenkins master(controller) and slave agent.

          Connection is stable when agent is started as service, but it is terminated immediately after connected if I start agent by running .jnlp file.

          As the log shows, I believe this error is about remoting 4.11 update included in jenkins 2.317.

          Hope this bug is fixed soon

          SeungWook Yoon added a comment -   2022-02-04 04:58:25.594+0000 [id=381] INFO h.TcpSlaveAgentListener$ConnectionHandler#run: Connection #13 failed: java.io.EOFException 2022-02-04 04:58:25.631+0000 [id=382] INFO h.TcpSlaveAgentListener$ConnectionHandler#run: Accepted JNLP4-connect connection #14 from /****:13848 2022-02-04 04:58:26.710+0000 [id=336] INFO j.s.DefaultJnlpSlaveReceiver#channelClosed: Computer.threadPoolForRemoting [#181] for buildserver_59 terminated: java.nio.channels.ClosedChannelException 2022-02-04 04:58:26.712+0000 [id=332] INFO hudson.remoting.Request$2#run: Failed to send back a reply to the request UserRequest:UserRPCRequest:hudson.remoting.JarLoader.writeJarTo[ long , long ,java.io.OutputStream](3): hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@44b318c9:JNLP4-connect connection from ****/****:13848" : channel is already closed This error message is shown in jenkins.err.log when I try to connect with .jnlp file.   I'm using JDK 1.8.0_202 on windows for both jenkins master(controller) and slave agent. Connection is stable when agent is started as service, but it is terminated immediately after connected if I start agent by running .jnlp file. As the log shows, I believe this error is about remoting 4.11 update included in jenkins 2.317. Hope this bug is fixed soon

          Mark Waite added a comment -

          mudwiz JDK 1.8.0_202 is badly out of date. The most current release with current security fixes is 1.8.0_322. You should consider updating to a newer version of Java from one of the many open source Java distributions. The Jenkins project includes Eclipse Temurin in our Docker images. You could also choose the Red Hat OpenJDK distribution, the Amazon Corretto distribution, or the Azul distribution. I'm sure others are available as well.

          Launching agents with the .jnlp file usually means that you are using "Java Web Start". Java Web Start has been removed from Java releases during the later releases of Java 8. It is not included in Java 9 and later. The Jenkins project is unlikely to spend effort resolving issues that are discovered in agents launched with Java Web Start unless the same issues are visible without using Java Web Start. Switch to launch the agent from a batch file if you need to use an inbound agent or install Microsoft's OpenSSH server on the Windows agent and configure the Jenkins controller to launch the agent with SSH.

          Mark Waite added a comment - mudwiz JDK 1.8.0_202 is badly out of date. The most current release with current security fixes is 1.8.0_322. You should consider updating to a newer version of Java from one of the many open source Java distributions. The Jenkins project includes Eclipse Temurin in our Docker images. You could also choose the Red Hat OpenJDK distribution, the Amazon Corretto distribution, or the Azul distribution. I'm sure others are available as well. Launching agents with the .jnlp file usually means that you are using "Java Web Start". Java Web Start has been removed from Java releases during the later releases of Java 8. It is not included in Java 9 and later. The Jenkins project is unlikely to spend effort resolving issues that are discovered in agents launched with Java Web Start unless the same issues are visible without using Java Web Start. Switch to launch the agent from a batch file if you need to use an inbound agent or install Microsoft's OpenSSH server on the Windows agent and configure the Jenkins controller to launch the agent with SSH.

          Mark Waite added a comment -

          Closing after a month without more information that would allow others to duplicate the problem

          Mark Waite added a comment - Closing after a month without more information that would allow others to duplicate the problem

            bluersw Sun WeiSheng
            nshinde_cc Nikit Shinde
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: