我正在使用PerfSONAR一个网络测量工具,其UI依赖于tomcat7。我安装了perfsonar-ui在 Ubuntu 14.04 服务器上,为了测试我的安装,我将浏览器(在 Windows 7 计算机上)指向地址 http://my_server_address:8080/perfsonar-ui/
。连接失败。
到目前为止我尝试过的:
- 从多台计算机到我的服务器的 ping 操作均成功。
- 在服务器本身上,
curl -X GET http://localhost:8080/perfsonar-ui/
,响应状态正常(200) 在其他服务器上,
curl -X GET http://my_server_address:8080/perfsonar-ui/
结果:curl: (7) Failed to connect to my_server_address port 8080: Connection refused
服务器上允许的端口 8080
sudo ufw allow 8080
- 禁用了服务器上的防火墙
sudo ufw disable
我绑定(bind)到
0.0.0.0
,所以连接器来 self 的/etc/tomcat7/server.xml
文件看起来像:<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" address="0.0.0.0" />
netstat -ntlp | grep LISTEN
结果:tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN -
还是不行! :(
有人可以帮我解决这个问题吗?谢谢。
最佳答案
我要关闭这个。和tomcat没有任何关系。这是一个 iptables 问题,我必须允许传入连接到目标端口 8080。它成功了!
关于tomcat7 - 无法远程连接到服务器(端口 8080 : Connection refused),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41968633/