Slave cannot connect to Master

旧巷老猫 提交于 2019-12-10 10:25:13

问题


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?


回答1:


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.




回答2:


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.




回答3:


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


来源:https://stackoverflow.com/questions/32393711/slave-cannot-connect-to-master

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!