3
votes

I'm trying to configure my laptop as a slave, my master would be a server where Jenkins is installed. I've followed these instructions.

However, when it comes to access http://master:8080/ from my slave's browser, internet cannot display the webpage.

So I tried the second way, by writing javaws http://master:8080/computer/Slave/slave-agent.jnlp in the cmd prompt and this time I have this error:

Could not load file/URL specified: http://master:8080/computer/Slave/slave-agent.jnlp

I am new to stuff with network etc so can you enlighten me?

EDIT: I manage to reach the page, instead of user master:8080, I tried with the IP of the server and it worked!

But now when I launch the agent, I have an error saying:

java.net.ConnectException: Connection refused:

Where does the problem come from?

3
Can you post the full text of the "connection refused" error ? I think it may be due to the port used by Jenkins for slave communication being blocked by a firewall, so I'd like to see some more details.gareth_bowles
I found the problem : in Jenkins Master Configuration, in jenkins URL, instead of "localhost:8080", i put the IP of the server (http://[ip_server:8080/) and now i can connect my slave to my master by using one of the three ways!Denis

3 Answers

8
votes

I found the problem: in Jenkins Master Configuration, in Jenkins URL, instead of "localhost:8080", I put the IP of the server (http://[ip_server]:8080/) and now I can connect my slave to my master by using each way.

3
votes

More specifically to Denis's answer, go to Manage Jenkins->Configure Systems->Jenkins Location : "Jenkins URL" and change "localhost:8080" to your Master's ip and port. (If you happened to change the port number).

Then we picked the choice of downloading the slave.jar and using the command prompt to connect the agent.

0
votes

After installing the Jenkins slave. If your unable to load the Jenkins in the brwoser or not getting the jenkins start page follow these steps , directly paste this in your terminal.

firewall-cmd --permanent --new-service=jenkins

firewall-cmd --permanent --service=jenkins --set-short="Jenkins Service Ports"

firewall-cmd --permanent --service=jenkins --set-description="Jenkins service firewalld port exceptions"

firewall-cmd --permanent --service=jenkins --add-port=8080/tcp

firewall-cmd --permanent --add-service=jenkins

firewall-cmd --zone=public --add-service=http --permanent

firewall-cmd --reload

firewall-cmd --list-all