Categories
AI & Tech

How to kill a Windows Service that is on Stopping state?

Ever wondered why your Tomcat/TomEE services are stuck at “Stopping” state even though when you have stop the service.  I am sure you have tired all bets to get it started again and didn’t succeed. Try this simple technique which will help you get started with no hassles.

Open your COMMAND PROMPT in Administrator mode

How to do this?

Go to Run, type cmd and right click on the ‘cmd.exe’ on the START menu screen to select ‘Run as Administrator’

After you  open the command prompt on Windows 7 and Windows Vista, fire the following query to check the PID associated with that WINDOWS service:

Check the service name of the service you want to kill from ‘Services.msc’. Double click the service and get the ‘Service name’ details from the popup and fill the following command with it.

sc queryex TomEE

Command to kill the service

taskkill /PID 2292 /F

With this you will be able to get yourself out of the issue of a Tomcat or a TomEE or any windows service that is hung on a ‘Stopping’ state for good.

Hope this helps someone with their problem.

Exit mobile version