是因为Linux的防火墙没有开放8080端口
解决办法:
/sbin/iptables -I INPUT -p tcp –dport 8080 -j ACCEPT #开启8080端口 /sbin/iptables -I INPUT -p tcp –dport 22 -j ACCEPT #开启22端口 /etc/rc.d/init.d/iptables save #保存配置 /etc/rc.d/init.d/iptables restart #重启服务 查看已开放端口 /etc/init.d/iptables status 结果如下 Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination 2 ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 3 ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080 然后就可以访问了