macosjenkinswindows-server-2016jenkins-agent

Jenkins - slave mac - unable to connect


I have a Jenkins build server (v2.77) installed on a windows server 2016 and I'd like to add a mac as a slave node. I set the node to run via "Java Web Start". On the mac side I downloaded the slave-agent.jnlp file from jenkins, but it doesn't connects to the server.

This is the exception:

java.io.IOException: Failed to connect to 37.210.56.16:49693
  at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:243)
  at hudson.remoting.Engine.connect(Engine.java:660)
  at hudson.remoting.Engine.innerRun(Engine.java:524)
  at hudson.remoting.Engine.run(Engine.java:447)
Caused by: java.net.ConnectException: Operation timed out
  at java.base/sun.nio.ch.Net.connect0(Native Method)
  ...

I tried to turn off the windows firewall, to change the TCP port for JNLP agents option in jenkins to fixed/random, but they didn't connected.


Solution

  • Finally I found the solution. I rent the server from the google, and in the google cloud console I had to define for this VM instance a firewall rule to accept a specific port number for this JNLP agent connection. Now it's working well.