Jenkins Windows slave connection getting terminated with java.nio.channels.ClosedChannelException

前端 未结 9 1519
别跟我提以往
别跟我提以往 2021-01-04 09:32

While connecting to windows machine as slave, i am getting following error i think its some network related issue, but need some help where to start looking or what is a pos

相关标签:
9条回答
  • 2021-01-04 09:55
    • I observed the same error after our jenkins master was updated. It is likely due to incompatibility between Java 7 (v80) and latest Java 8.
    • Check the java version being used by your master, and the java version of your slave.
    • In my case, I am running swarm-client-2.0-jar-with-dependencies.jar on a linux host, and it was using Java 7.

      java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

    • Our jenkins master was upgraded and is now running Java 8

      java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

    • When the java on the slave was updated to Java 8, the connection issues disappeared.
    0 讨论(0)
  • 2021-01-04 10:01

    Well... for me it worked the following solution:

    mark the node "temporary offline" and put it back "online" again

    reconnect

    0 讨论(0)
  • 2021-01-04 10:02

    The user2015131 suggestion inspired me to find my solution for this issue.

    The problem

    I explain my case, it may work for some people:

    1. I installed Jenkins as a service a long time before on my slave machines.
    2. I updated Java on the Jenkins' master computer.

    So the Jenkins service's code stored on the slave is outdated.

    The solution

    Follow the next steps on every slave machine:

    1. Update Java version.

      Be sure the Java version is the same or compatible with the one installed on the master computer.

    2. Remove the old slave code. It's located inside the folder specified in the Remote Root Directory field under the node's configuration.

      I removed every jenkins-slave.* file, leaving only the jenkins_agent.pid file and the folders "remoting" and "workspace".

    3. Go to the slave node interface on Jenkins from the web browser and click on the button.

      You will download a new JNLP file to install a new (updated) Jenkins service on the slave machine.

    4. Run the downloaded file, go to menu and click on "Install as a service".

    Hope it helps!

    0 讨论(0)
提交回复
热议问题