简体   繁体   English

Tomcat端口已打开,但应用程序无法加载

[英]Tomcat port open but app won't load

I would like tomcat to run in both ports, 8080 and 9000. Port 8080 works perfectly but that is not the case for port 9000. 我希望tomcat在8080和9000两个端口中都能运行。端口8080可以完美运行,但对于端口9000则不是这样。

Port 9000 is open and listening: 端口9000已打开并正在侦听:

$ ufw status
To                         Action      From
--                         ------      ----
9000/tcp                   ALLOW       Anywhere 
9000/tcp (v6)              ALLOW       Anywhere (v6)

$ netstat -an | grep "LISTEN "
tcp6       0      0 :::9000                 :::*                    LISTEN 

I can connect to the port and get the index page 我可以连接到端口并获取索引页面

$ wget mydomain:9000
HTTP request sent, awaiting response... 200 OK
Length: 1887 (1.8K) [text/html]
Saving to: ‘index.html’

100%[=========================================>] 1,887       --.-K/s   in 0s      

I have added a connector into the con/server.xml in tomcat 我已经在tomcat的con / server.xml中添加了一个连接器

<Connector port="9000" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />

But when I open the browser and type the address "mydomain:9000" the app is never loaded. 但是,当我打开浏览器并输入地址“ mydomain:9000”时,该应用程序将永远不会加载。 It doesn't show any error, it just hangs there. 它没有显示任何错误,只是挂在那里。 I have checked the logs but no error is shown. 我已经检查了日志,但未显示任何错误。 I have no idea what the problem could be.Apache2 is running in port 80, but I am not sure if that is somehow related to the problem. 我不知道可能是什么问题.Apache2在端口80中运行,但是我不确定这是否与问题有关。

Any help is greatly appreciated... 任何帮助是极大的赞赏...

确保所有防火墙都允许该端口上的客户端和服务器之间进行通信(双向-防火墙可以双向或双向屏蔽数据)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM