问题描述
我在 ubuntu9 上运行 tomcat6,并且我在 server.xml 中将关闭端口指定为 8005.但是,当我执行 netstat -tln 时,我看不到端口 8005 正在侦听.我可以做tomcat6 restart|start|stop 没问题.
I am running tomcat6 on ubuntu9, and i specified shutdown port in server.xml to 8005.When I do netstat -tln however, i cannot see port 8005 listening.I can do tomcat6 restart|start|stop no problem.
为什么不监听 8005 端口?
Why is it not listening on port 8005?
谢谢
推荐答案
我刚刚在以前运行的 Tomcat 安装中遇到了这个问题,在我的情况下,这是由于 servlet 的 init() 方法没有返回.我在 init() 主体中调用了一个长时间运行的方法,并且控制权从未返回到容器.一旦我清除了这一点,Tomcat 就会正常启动,包括监听关闭端口.
I just ran into this problem on a previously working Tomcat installation, and in my case it was due to the init() method of a servlet not returning. I was calling a long running method in the init() body and control was never returning to the container. Once I cleared this up, Tomcat started up properly, including listening on the shutdown port.
这篇关于tomcat6 关闭端口不监听的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!