来自初学者的一个问题。
我刚刚在以下位置安装了 Jenkins:
- Ubuntu 18.10 最低配置 - 谷歌云平台
- 已安装 Java 8
- UFW 配置为允许来自任何地方的 80 端口上的流量
当通过互联网从客户端计算机浏览器访问它时;它说<server IP address> took too long to respond
跑步netstat -apn|grep 80;
我得到:
tcp 0 0 10.142.0.3:58216 169.254.169.254:80 ESTABLISHED
tcp 0 0 10.142.0.3:58214 169.254.169.254:80 ESTABLISHED
tcp 0 0 10.142.0.3:58212 169.254.169.254:80 CLOSE_WAIT
tcp 0 0 10.142.0.3:58218 169.254.169.254:80 ESTABLISHED
tcp6 0 0 :::8080 :::* LISTEN
tcp6 0 0 :::80 :::* LISTEN
$ ps aux|grep jenkins
jenkins 6939 0.0 0.4 46188 7856 ? Ss 11:59 0:00 /lib/systemd/systemd --user
jenkins 6950 0.0 0.1 149060 2744 ? S 11:59 0:00 (sd-pam)
jenkins 6978 0.0 0.0 4684 156 ? S 11:59 0: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=8081
jenkins 6979 0.1 9.9 2437292 172520 ? Sl 11:59 0:28 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8081
root 12198 0.0 0.2 31912 4300 pts/1 S 16:45 0:00 sudo /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=-1
root 12199 0.9 8.7 2437292 151936 pts/1 Sl 16:45 0:11 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=-1
xcvbtr+ 12375 0.0 0.0 5016 896 pts/1 S+ 17:05 0:00 grep --color=auto jenkins
答案1
解决了,我不仅需要允许来自我的实例防火墙的流量,还需要允许来自云平台的流量。