我在运行VMware Workstation的CentOS 7上安装了Jenkins。 Jenkins服务正在运行:
jenkins.service - Jenkins Service
Loaded: loaded (/etc/systemd/system/jenkins.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2016-06-21 08:47:46 PDT; 5s ago
Main PID: 68969 (java)
Memory: 82.3M
CGroup: /system.slice/jenkins.service
└─68969 java -jar /usr/local/bin/jenkins.war
Jun 21 08:47:48 server.centos.lan java[68969]: Jun 21, 2016 8:47:48 AM org.eclipse.jetty.util.log.JavaUtilLog info
Jun 21 08:47:48 server.centos.lan java[68969]: INFO: Started ServerConnector@34ddf859{HTTP/1.1}{0.0.0.0:8080}
Jun 21 08:47:48 server.centos.lan java[68969]: Jun 21, 2016 8:47:48 AM org.eclipse.jetty.util.log.JavaUtilLog info
Jun 21 08:47:48 server.centos.lan java[68969]: INFO: Started @2472ms
Jun 21 08:47:48 server.centos.lan java[68969]: Jun 21, 2016 8:47:48 AM winstone.Logger logInternal
Jun 21 08:47:48 server.centos.lan java[68969]: INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Jun 21 08:47:49 server.centos.lan java[68969]: Jun 21, 2016 8:47:49 AM jenkins.InitReactorRunner$1 onAttained
Jun 21 08:47:49 server.centos.lan java[68969]: INFO: Started initialization
Jun 21 08:47:49 server.centos.lan java[68969]: Jun 21, 2016 8:47:49 AM jenkins.InitReactorRunner$1 onAttained
Jun 21 08:47:49 server.centos.lan java[68969]: INFO: Listed all plugins
VM的IP为192.168.139.160。主机操作系统是Windows 7.
当我尝试使用http://192.168.139.160:8080/jenkins从Windows上的浏览器访问Jenkins时出现错误: “无法访问此网站”。我做错了什么?
答案 0 :(得分:3)
如果您在CentOS 7.1上安装了Jenkins,则应在防火墙中为端口8080添加规则,或者至少禁用firewalld。
要禁用firewalld,您可以使用以下命令:
systemctl stop firewalld
systemctl禁用firewalld
在此之后,您应该能够通过端口8080到达Jenkins。
答案 1 :(得分:0)
停止防火墙+启动tomcat
找到iptables所在的位置,然后像这样将它们放下: /etc/init.d/iptables停止 (可能在您计算机上的其他位置)
然后启动tomcat,您将具有如下脚本: startup.sh(在我的计算机中,路径为/usr/share/apache-tomcat-7.0.56/bin /)
答案 2 :(得分:-2)
请试一试。
第一
JENKINS_HTTPS_LISTEN_ADDRESS="Public IP" >> /etc/sysconfig/jenkins
然后
/etc/init.d/jenkins restart