通过主服务器上的war软件包安装jenkins时,无法从从机打开JenkinsUI [英] Not able to open JenkinsUI from slave machine when jenkins is installed via war package on master
问题描述
我在詹金斯(Jenkins)上没有太多经验,并且面临着一个奇怪的问题,这使我感到困惑.
I do not have much experience with Jenkins and am facing a weird issue which has got me puzzled.
我在同一网络上有两台机器,分别说M1(主Windows 10)和M2(从Windows 10).我可以从M2 ping M1,反之亦然.
I have 2 machines say M1(master-Windows 10) and M2(slave-Windows 10) on the same network. I am able to ping M1 from M2 and vice-versa.
在M1上,当我:
- 将Jenkins作为Windows服务安装,然后从M2 ,我可以访问JenkinsUI(通过 http://MachineName:8080 )
- 使用通用war软件包安装Jenkins,然后从M2 安装,我无法访问JenkinsUI(通过
- install Jenkins as a Windows service, then from M2, I am able to access the JenkinsUI(via http://MachineName:8080)
- install Jenkins using the generic war package, then from M2, I am not able to access the JenkinsUI(via http://MachineName:8080)
为什么即使通过ping测试成功,通过war软件包安装Jenkins时,也无法从从属机器(M2)访问JenkinsUI?有什么我想念的吗?以前有没有人遇到过这样的问题?
Why I am not able to access the JenkinsUI from slave machine(M2) when I install Jenkins via war package even when the ping test is successful? Is there something I am missing? Has anyone ever faced such an issue before?
背景: 我想使用war软件包而不是Windows服务在M1上安装Jenkins的原因是,我需要在从属计算机M2上触发我的UI测试自动化脚本,当Jenkins作为服务安装时,不会触发M2. 如此处评论部分所述)
Background: The reason I want to install Jenkins on M1 using the war package and not as a windows service is that I need to trigger my UI Test Automation Scripts on the slave machine, M2 which will not be triggered when Jenkins is installed as a service.(As mentioned in the comment section here)
M1(Master):
M2(从站-无法打开Jenkins登录页面):
推荐答案
我终于能够从远程计算机上打开Jenkins UI.我找到了解决方案 HERE .按照解决方案,我只能将端口添加到防火墙.
I was finally able to open the Jenkins UI from a remote machine. I found the solution HERE. As per the solution, I was only supposed to add the port to the Firewall.
我在安装了Jenkins的计算机上以提升模式运行了以下命令:
I ran the following command in elevated mode on the machine where Jenkins was installed:
netsh advfirewall firewall add rule name="TCP Port 8080" dir=in localport=8080 protocol=TCP action=allow
这篇关于通过主服务器上的war软件包安装jenkins时,无法从从机打开JenkinsUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!