How to kill a windows service which is stuck in a “Stopping” state

I recently ran into an issue where a service got stuck in the “Stopping” state.  When I tried to stop it through the command line I received the following error.  I had to kill it before I could start it again.

U:\>net stop snmp
The service could not be controlled in its present state.

More help is available by typing NET HELPMSG 2182.

U:\>sc queryex snmp
SERVICE_NAME: snmp
TYPE : 10 WIN32_OWN_PROCESS
STATE : 3 STOP_PENDING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x2
WAIT_HINT : 0x7530
PID : 54068
FLAGS :

The following command kills the process for the service

U:\>taskkill /f /pid 54068

This entry was posted in Microsoft and tagged , , , , . Bookmark the permalink.

One Response to How to kill a windows service which is stuck in a “Stopping” state

  1. wind farm says:

    Magnetic generators alternatively are minus the above challenges.
    Set the panels up and they also convert sunlight to electric power,
    plug and play real simple. Here are reasons why installing
    solar PV is an excellent investment for every household:.

Leave a Reply

Your email address will not be published. Required fields are marked *