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
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.
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!