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

前端 未结 9 1524
别跟我提以往
别跟我提以往 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:52

    in addition to the error log in the post, I got also the error log under the jenkins directory in the slave (for me it was C:\jenkins\jenkins-slave.err.log):

    JNLP file http://jenkins.domain.com/computer/my_slave_name/slave-agent.jnlp?encrypt=true has invalid arguments: [#####################################, my_slave_name, -workDir, c:\jenkins, -internalDir, remoting, -url, http://jenkins.domain.com/, -headless, -jar-cache, C:\Users\Administrator.jenkins\cache\jars] Most likely a configuration error in the master "-workDir" is not a valid option

    my solution:

    1)windows slave level: close the services console in the GUI for all users - this is must. from some reason Microsoft is locking installation/removal of windows services

    2)windows slave level: kill all java and jenkins-slave processes (if exist)

    3)windows slave level: delete the jenkins slave service (if exist) from cmd: sc delete jenkinsslave-c__jenkins /force (in my case)

    4)windows slave level: verify that you have java 8 installed: i'm using jdk1.8.0_151 . uninstall all old java version

    5)jenkins master ui level: Change the way the Jenkins is connect to the slave under slave configure --> Launch method: Let Jenkins control this Windows slave as a Windows service (instead of Launch agent via Java Web Start)

    6) aws level: Increase the aws elb Idle timeout to 600 (from 60) - like @njtman suggested

    7)jenkins master ui level: relaunch the agent in jenkins and wait several minutes.

    my environment:

    jenkins: 2.89.2 , os: windows 2012 R2, java: jdk1.8.0_151

提交回复
热议问题