Thursday, 18 June 2015

How to stop Tomcate server when it is not stop from eclipse

In some situation Apache Tomcat not stop from eclipse at that time we have to forcefully stop that server by using kill that process, Here we show this simple task that is very useful for developers.

This solution is tested and working file with Windows platform :

First of all we want to know that which process ID is for Apache tomcate port.

For that we follow bellow steps :
-> Open command promt  
-> Type command :
     netstat -o -n -a | findstr 8080
     Where 8080 is the PORT number on which Tomcat is start.
-> It will show you result like :
    TCP    0.0.0.0:8080                  0.0.0.0:0                       LISTENING         6852
    TCP    192.168.0.193:63473    192.168.0.100:8080     CLOSE_WAIT     6852
    TCP    [::]:8080                        [::]:0                             LISTENING         6852
    TCP    [::1]:8080                      [::1]:63536                   TIME_WAIT        0

-> Where the last number is ther Process ID that you have to kill for stooping the service on which Tomcat working. This number is differ every time.

-> For kill the process type the bellow command in command prompt :
    taskkill /F /PID 6852
    6852 is the process id that you get from first command.

-> This command will show you message like :
     SUCCESS: The process with PID 6852 has been terminated.

-> That it now you can restart Tomcat and it will start as normal way. Now enjoy the code.

KEEP VISITING THIS BLOG FOR MORE TECH DISCUSSION. 
YOUR SUGGESTION ARE WELCOMES FOR ANY POST.

No comments:

Post a Comment