Jenkins说它的运行没有错误,但是当我去
时http://myserverip:8080
或
http://myservername:8080
在浏览器中,它说"无法访问此网站"。
在服务器上,如果我这样做:
wget http://localhost:8080
我明白了:
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-10-17 02:13:42 ERROR 403: Forbidden.
我这样开始了:
sudo systemctl start jenkins
得到了:
jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
Active:active (exited) since Thu 2017-04-20 16:51:13 UTC; 2min 7s ago
Docs: man:systemd-sysv-generator(8)
这显然都是好的和正确的。
sudo systemctl status jenkins
给出:
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
Active: active (exited) since Tue 2017-10-17 02:01:44 CEST; 13min ago
Docs: man:systemd-sysv-generator(8)
Oct 17 02:01:43 bob systemd[1]: Starting LSB: Start Jenkins at boot time...
Oct 17 02:01:43 bob jenkins[35278]: * Starting Jenkins Automation Server jenkins
Oct 17 02:01:43 bob su[35299]: Successful su for jenkins by root
Oct 17 02:01:43 bob su[35299]: + ??? root:jenkins
Oct 17 02:01:43 bob su[35299]: pam_unix(su:session): session opened for user jenkins by (uid=0)
Oct 17 02:01:44 bob jenkins[35278]: ...done.
Oct 17 02:01:44 bob systemd[1]: Started LSB: Start Jenkins at boot time.
Oct 17 02:02:18 bob systemd[1]: Started LSB: Start Jenkins at boot time.
FW是开放的:
sudo ufw status
给出:
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
8080 ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
8080 (v6) ALLOW Anywhere (v6)
查看日志文件没有错误。 e.g。
tail -f /var/log/jenkins/jenkins.log
给出:
Oct 17, 2017 2:01:57 AM hudson.model.DownloadService$Downloadable load
INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
Oct 17, 2017 2:01:58 AM hudson.model.UpdateSite updateData
INFO: Obtained the latest update center data file for UpdateSource default
Oct 17, 2017 2:01:58 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Oct 17, 2017 2:01:58 AM hudson.model.DownloadService$Downloadable load
INFO: Obtained the updated data file for hudson.tools.JDKInstaller
Oct 17, 2017 2:01:58 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 6,382 ms
如果我这样做
ps -ef | grep jenkins
我看到了
jenkins 36715 1 0 02:22 ? 00:00:00 /lib/systemd/systemd --user
jenkins 36719 36715 0 02:22 ? 00:00:00 (sd-pam)
jenkins 36726 1 0 02:22 ? 00:00:00 /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
jenkins 36727 36726 34 02:22 ? 00:00:16 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
我刚刚根据指南here
安装了它在我安装之前,我按照惯例做了:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
为什么我看不到詹金斯的任何想法?
答案 0 :(得分:0)
我刚刚发现了这个问题。 Dediserve为每台服务器提供内置的基于Web的外部FW。我刚刚在dediserve控制面板上打开了8080,它可以工作。
我已经习惯了没有这样一个FW的linode - 你必须在每个服务器上安装自己的或者暴露它。