为什么Tomcat不会绑定到关闭端口(8005)? [英] Why Tomcat will not bind to shutdown port (8005)?

查看:19
本文介绍了为什么Tomcat不会绑定到关闭端口(8005)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Tomcat 启动并运行得很好,但从未绑定到 8005 关闭端口.因此,我只能通过杀死它来结束它.

Tomcat starts and runs just fine but never binds to the 8005 shutdown port. Consequently, I can only end it by killing it.

我使用以下命令启动 Tomcat:

I am starting Tomcat with:

catalina.sh start

或:

startup.sh

结果相同.

Server.xml 片段:

Server.xml snippet:

<Server port="8005" shutdown="SHUTDOWN">

Catalina.out 片段:

Catalina.out snippet:

Aug 20, 2013 4:55:18 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Aug 20, 2013 4:55:19 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 20, 2013 4:55:19 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2209 ms
Aug 20, 2013 4:55:19 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 20, 2013 4:55:19 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42

$ netstat -ln snippet:

tcp        0      0 :::8443                 :::*                    LISTEN
tcp        0      0 :::8009                 :::*                    LISTEN
tcp        0      0 :::8080                 :::*                    LISTEN

注意:Apache绑定8443和8080,通过8009连接tomcat

Note: Apache is bound to 8443 and 8080, it connects to tomcat via 8009

$ netstat -ln | grep 8005:
<nothing>

是否应该在 catalina.out 中出现一些绑定或无法绑定到端口 8005 的指示?

Should some indication of binding or failing to bind to port 8005 appear in catalina.out?

是否存在我在 server.xml 中引入的某种语法错误,这将允许它绑定到 8009 连接器而不是 8005?

Is there some kind of syntax error I may have introduced in server.xml which would allow it to bind to the 8009 connector but not 8005?

我在这里不知所措,因为没有抛出任何错误,任何建议都会有所帮助.

I'm at a loss here because no errors are thrown, any suggestion would be helpful.

为了响应提供的链接路由器,我添加了上面的我正在启动 Tomcat"并尝试:

In response to the link router provided I added the above "I am starting Tomcat with" and also tried:

startup.sh &

仍然没有绑定到端口 8005,在所有情况下结果似乎都相同.

Still no binding to port 8005, results appeared to be identical in all cases.

推荐答案

很可能您的 Tomcat 实例由于某种原因尚未完全启动,并且从未达到启动关闭侦听器的程度.您是否发布了整个启动日志?通常,最后一条消息类似于服务器在 XXX 毫秒内启动".我注意到关闭侦听器只在最后启动.

Most likely your Tomcat instance has not fully started for some reason, and never got to the point that it started the shutdown listener. Did you post your entire start log? Normally, the very last message is something like "Server startup in XXX ms". I have noticed that the shutdown listener is only started at the very end.

最常见的原因是在您的 Web 应用程序初始化之一中出现挂起或延迟.

The most common reason is something hanging or delaying in one of your web application initializations.

这篇关于为什么Tomcat不会绑定到关闭端口(8005)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆