Connection issue with Jenkins slave on Windows Azure

后端 未结 2 1313
盖世英雄少女心
盖世英雄少女心 2021-01-18 05:41

I\'ve set up a Jenkins slave node on a Windows Azure VM. When building on that node the project runs smoothly for about 20-30 minutes after which the connection gets dropped

相关标签:
2条回答
  • 2021-01-18 06:15

    I am also setting up Jenkins CI in Azure and was getting this same problem. Specifically, I would see this error in the Jenkins slave error log:

    SEVERE: I/O error in channel channel
    java.net.SocketException: Connection reset
    

    To work around it, you need to increase the frequency with which the slave pings the master. You can do this by adding the Dhudson.slaves.ChannelPinger.pingInterval system property to your master jenkins.xml file.

    I modified it to ping every 2 minutes and the channel was able to mantain the connection without dropping it. XML looks like this:

    <arguments>
      -Xrs -Xmx256m -Dhudson.slaves.ChannelPinger.pingInterval=2 
      -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle 
      -jar "%BASE%\jenkins.war" 
      --httpPort=8080
    </arguments>
    

    For more information you can see the related ticket.

    0 讨论(0)
  • 2021-01-18 06:27

    If you have a newer version of Jenkins (ours is 1.584), you can go to the nodes configure page for the slave, click on the Advanced button under Launch Method, and add -Dhudson.slaves.ChannelPinger.pingInterval=2 to the JVM Options field.

    That did the trick for us!

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