1

We've got a Linux Jenkins master node set up in AWS behind a load balancer and I'm attempting to connect to Windows slave nodes in private subnets. Is this possible? The Jenkins URL is accessible when I RDP into each server, but when I attempt to configure the node using "Launch agent from browser" an error occurs.

hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to <JenkinsURL>:39057 (retrying:4)
java.io.IOException: Failed to connect to gpa-jenkins- 
prod.aws.baxter.com:39057
    at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:242)
    at hudson.remoting.Engine.connect(Engine.java:686)
    at hudson.remoting.Engine.innerRun(Engine.java:547)
    at hudson.remoting.Engine.run(Engine.java:469)
Caused by: java.net.ConnectException: Connection refused: connect
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Unknown Source)
    at sun.nio.ch.Net.connect(Unknown Source)
    at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
    at java.nio.channels.SocketChannel.open(Unknown Source)
    at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:203)
    ... 3 more

What could be the source for this refusal?

  • Could you explain why the jenkins-master does not reside in the same private subnet as well? – 030 Nov 15 '19 at 9:11
1

As described in Jenkins documentation https://jenkins.io/doc/book/managing/security/#jnlp-tcp-port, you need to configure:

  1. Jenkins to use fixed TCP port for JNLP agent, for instance 39057
  2. AWS loadbalancer to listen on port 39057 and forward it to Jenkins on same port
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.