简体   繁体   English

Tomcat7状态在Windows服务中停止

[英]Tomcat7 status Stopping in windows service

I have Apache 2.2 and 4 Tomcat7 instance is running 我有Apache 2.2和4 Tomcat7实例正在运行

One of the tomcat is configured for 1500 threads and 1024 Mb of Java heap space as the web application require such a deal... 其中一个tomcat配置为1500个线程和1024 Mb的Java堆空间,因为Web应用程序需要这样的交易......

So at time i face a lot of user traffic and the application gets slow, i restart the tomcat for a fix which in-turn makes the service showing status 'STOPPING' 因此,当我面临大量用户流量并且应用程序变慢时,我重新启动tomcat以进行修复,从而使服务显示状态为“STOPPING” 在此输入图像描述

If you want to get out of this situation, you could follow the steps as shown below. 如果您想摆脱这种情况,可以按照以下步骤操作。

Open Command prompt (Run as Administrator) on Windows Vista and Win 7 在Windows Vista和Win 7上打开命令提示符(以管理员身份运行)

Query Service details using the following command (where Tomcat_7.0.7 is the service name of the Tomcat instance): 使用以下命令查询服务详细信息(其中Tomcat_7.0.7是Tomcat实例的服务名称):

sc queryex Tomcat_7.0.7

You will be able to find the details related to the service (as shown below): 您将能够找到与服务相关的详细信息(如下所示):

C:\WINDOWS\system32>sc queryex Tomcat_7.0.7

        SERVICE_NAME: Tomcat_7.0.7
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 3  STOP_PENDING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x3
        WAIT_HINT          : 0x0
        PID                : 2340
        FLAGS              :

Now get the PID details from the above, use the command as shown below to kill it (to resolve the issue). 现在从上面得到PID细节,使用如下所示的命令来杀死它(解决问题)。

taskkill /PID 2340 /F

This page gives more details on the same! 这个页面提供了相同的更多细节!

Hope this helps! 希望这可以帮助!

Take a thread dump to find out what part of your application is stopping Tomcat from shutting down cleanly. 进行线程转储以找出应用程序的哪个部分阻止Tomcat干净地关闭。 Provided you are using a reasonably recent Apache Tomcat 7 release, there is an option to generate a thread dump accessible via the configuration tool that sits in the system tray. 如果您使用的是最新的Apache Tomcat 7版本,则可以选择通过位于系统托盘中的配置工具生成可访问的线程转储。

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

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