Wednesday, March 28, 2007

Windows service stuck in "starting" mode

   I have come across this scenario quite a few times. When you try to start a service some how windows screws up and comes back with an error saying that the service could not be started and the reason for the failure (as expected) is useless. The worst part is that after failure the service still stays in the 'starting' mode for quite some time and there is nothing that you can do to stop it, i mean there is no option to force stop the service.





   I am still trying to figure out some way to get the service to recover faster but can't seem to find any help, google is not helping me either. So the best solution for the moment is to wait till the service recovers on its own and then restart it or you reboot the OS itself (isn't that the universal fix for any problem on windows. ;))





Powered by ScribeFire.

12 comments:

Anonymous said...

Try matching up the service name to an .exe using MsInfo32.
Then locate the PID of the service using ProcMon (the process may not show up in task manager) then use "Task Kill" from the Windows Support Tools to kill the process. You can then attempt to start the problem service.

afulay said...

I haven't seen the problem again primarily because i don't start/stop services manually anymore. I have created a VBscript to managed a bunch of services which are relevant to me.

Thanks for the suggestion though. I will try this out if i run into the 'stuck' service issue again. Meanwhile if any of you try this out successfully do post your results here.

Anonymous said...

This idea worked perfect for me...Adaptive Server Anywhere service was hung. Found the .exe and killed it, voila!

Anonymous said...

This was exactly what I needed. My problem was the oposite, I kept getting services stuck at Stopping. After killing the related exe in the processes, it stopped. Unfortunately, that didn't fix the problem for why I was stopping the service.

Anonymous said...

I ran in to same problem quite a few times. Service gets stuck up in starting mode when I try to restart it and eats up 100% of CPU I kill it by using Taskmanager but the problem comes up again when I start it. I found that it doesn't release the file it is using for operation. Once I delete that file or it completes the work on that file it restarts easily

Sandip C

Senthil Kumar Sekar said...

You can stop such hanging (starting ...) service by following command

sc stop

Though this will throw some error, the service will gets stopped.

Hope this helps

ehowstuff said...

I restart the process and service using Process Explorer. It may helps you as well. Download it here:
http://technet.microsoft.com/en-us/sysinternals/bb896653
http://www.filehippo.com/download_process_explorer/

ehowstuff said...

I used process explorer to restart the service that stuck in a 'starting' or 'stopping' state.

http://technet.microsoft.com/en-us/sysinternals/bb896653

Anonymous said...

simple, but effective.
cheers mate!

Anonymous said...

You can also visit the step by step procedure at the following link https://www.youtube.com/watch?v=3YAuE0hjI9A

Unknown said...

I know how to stop the service when hung...
sc queryex servicename
taskkill /f /pid pid#

The real question is how to get a specific service started when it keeps freezing on "starting"

No matter how many times you taskkill a frozen "starting" service, it still freezes again when you try to restart it!

How can we find out what is causing the specific service to freeze?

Any help would be appreciated! Thanks!

nikkolayebba said...

Youre so cool! I dont suppose Ive read something like this before. So good to find any individual with some original ideas on this subject. realy thank you for beginning this up. this web site is one thing that's wanted on the internet, somebody with a little originality. useful job for bringing one thing new to the web! casino blackjack