0
votes

I'm trying to configure the Jenkins Master/Slave on our AWS windows server. I looked at other posts and researched online and followed the steps. I installed Jenkins on the server, and changed the jenkins url to the ip address of the server by command ipconfig: http://x.x.x.x:8080/. On the Jenkins xml file, I added the line to the argument: --httpListenAddress=0.0.0.0.

I followed the online tutorial step by step guide to set up master and agent. On the agent computer, when i try to access the url, it shows This site can’t be reached. I added the port 8080 to the firewall. I also tried to ping from the agent to the master and it failed, said lost 4 100%. I am not sure how can I access jenkins master url outside of the server. Any help is appreciated.

1
What tutorial did you follow and why do you need to access the jenkins URL from the slave node? If master can access slave, that's all you need. Slave can be in the private subnet, without access to the internet (or access internet via NAT so you can install updates). Can you access the the jenkins URL from your browser? That's what matter the most I believe.Petr Hecko
@PetrHecko So i followed this tutorial: wiki.jenkins.io/display/JENKINS/… plus google some other. I'm not able to access the jenkins URL from the browser on my slave computer which is my laptop. I'm able to access the jenkins URL on our server.bubbles2189
I thought I needed to access the jenkins URL from the slave node so that I can launch the agent. Maybe I'm not understanding how the process worksbubbles2189
Fair enough, there are more ways how to setup master/slave on jenkins looks like, I've never done it for windows nodes. I would suggest checking if you can access the jenkins URL from different IP, like your mobile phone (not on wifi) for example. If you are saying the port 8080 is open and the server accepts traffic from 0.0.0.0, then you should be able to see the UI from your phone. that http://... is a public IP of the server, right? If it's public IP with open ports, I would suggest start checking AWS networking - start with security groups and then VPC networking etc.Petr Hecko
The http://... was not the public IP, it was the private IP of the server. I'll change it to the public IP and see if that works. Also if you know a different way of setting up master/slave, can you send me a link. Thanksbubbles2189

1 Answers

1
votes

The root cause is hidden in the comments, so for clarity posting it as an answer - looks like the problem was that the agent is running on a users laptop and it's trying to connect on a private IP of the jenkins server running in AWS. Things should hopefully work after connecting the agent on a public IP of the master instead.