The Server service hung on starting.
For a couple of years now, one of my Windows XP workstations has taken about 10 minutes to start responding on the network. The 10 minutes would be spent trying to start the Server service. Then an error 7022 with a message “The Server service hung on starting.” would be entered in the System Event Log, the Server service would be restarted, and everything would be fine. Every now and then I’ve searched Microsoft Support to see if they had any suggestions but never found anything. I’ve also Googled it from time to time, and still no dice. I don’t know what made me decide to try once again, but I did today. While the search on MS still came up empty, Google once again came to the rescue. It was to a forum post which interestingly enough, contained a link to a MS KB article:
And here is a direct link to that article: http://support.microsoft.com/default.aspx?scid=kb;en-us;319127
In brief, some Lexmark and HP printer drivers install port monitoring software which in some undescribed fashion cause the Spooler service to try to start before the Server service. The solution is to make the Spooler service depend on the Server service so Spooler does not start until after Server. For more details go to the MS link, but if you know what you are doing, you can add lanmanserver to the DependOnService key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Spooler.
<rant>One of the most interesting things I find about this is that Google was able to to provide a link, but Microsoft Support search was not able to. The support.microsoft.com robots.txt file disallows search engines from crawling Knowlege Base articles. And the would be okay if their own search worked well, but in this case it totally failed even though the exact phrase clearly exists in the article.</rant>
Tags: Windows
April 22nd, 2009 at 3:52 pm
OMG, thanks so much. I spent hours trying to figure out what was causing this to hang. I looked at the event viewer, but nothing showed up. I finally timed how long it was taking, then I got the idea to look at the eventlog, found the message about Server hung, googled it, found your blog, and applied the reg fix. The reg key already had the value of RPC Remote Procedure Call, so I added LanmanServer on the line below it, and verified it appeared correctly in services.msc on the dependencies tab. now I’m going to restart and hope it works correctly. thanks again
April 22nd, 2009 at 4:03 pm
YES, that worked perfectly. Thanks again. I agree that it it pretty lame that search engines can’t crawl the KB articles and the KB search tool is so bad. That is why MS is so far being in the search category. They S U C K !
April 22nd, 2009 at 11:11 pm
Thanks Steve. That is exactly why I started this. I’m glad it helped somebody.
July 2nd, 2010 at 6:15 am
hope this works for me, driving me nuts
May 27th, 2011 at 5:13 pm
Thanks kindly — searched all over for an answer, kicked myself when i found this! Lexmark drivers = problems.
much appreciated!
December 2nd, 2011 at 8:21 am
Life saver! Still works Nov 2011! Sure enough our Lexmark got hung up, and all hell broke loose with the server. Looks like the Lexmark/Print Spooler/Lanman(Server) service got hosed. Following your method worked flawlessly.
January 13th, 2012 at 1:32 pm
This single blog post is still helpping people in 2012. thanks!
April 17th, 2012 at 11:40 am
Thanks for the post, actually I found the KB by googling it. funny thing though, it happened to me today and never before, had my current config for over a year now:O
April 17th, 2012 at 11:37 pm
This helped with windows server 2008. Yep in April 2012!
May 4th, 2012 at 9:35 pm
Hard to believe they haven’t fixed it yet. Thanks for the comment.
July 23rd, 2012 at 12:00 pm
Thank you so much for this! Helped me today!
July 30th, 2012 at 12:50 pm
Yep, 2012 and this still is helping 🙂 The MS link describes adding a new key. In my case the key was already there and lexmark had put LexBce as the first dependence. I edited the existing key and put LanmanServer at the BEGINNING of the key, ahead of LexBce, with a return after it. This seemed to solve the problem.
Thank you Soooo much (even if this is years later 🙂 )
September 23rd, 2012 at 10:52 am
The issue is present in Server 2008 R2 as well… I had the same situation as Stan and it just started happening randomly. I had fixed it temporarily by starting the service manually via a batch script but I believe this will fix the issue properly… I’ll keep you posted next time I do a server reboot.
November 9th, 2012 at 3:40 pm
That is a outstanding post, what kind of progress do does the writer see occurring in the 5 years time for this field?
November 19th, 2012 at 11:30 am
The fix worked!!
I had a hunch it had something to do with the Lexmark printer but would never have guessed to add a dependency
You are the man for tracking this down.
If you ever have had a problem with Foxpro 2.6 crashing on XP, try changng the affinity for foxprox.exe to one. This took me many months to figure out but did the trick.
June 7th, 2013 at 4:29 am
This helped me! Thanks a million!
October 23rd, 2013 at 10:45 am
Thanks so much! You’re a life saver!
January 17th, 2014 at 5:29 am
Still an issue and it’s now 2014. NOT GOOD ENOUGH HP/LEXMARK/MICROSOFT. 🙁
January 26th, 2014 at 3:14 pm
You are still helping people in 2014! Over a month of researching, experimenting, installing new drivers, etc., nothing working (fixing the problem) and you finally solved it. I am sitting, here, rebooting, because it is so wonderful. Windows 7 Ultimate. Thank you!
February 16th, 2014 at 1:39 pm
Can’t thank you enough!
March 16th, 2015 at 6:34 pm
March 2015 and this fixed my problem on a Windows 7 Pro 64bit HP computer
Many thanks
October 4th, 2016 at 5:02 am
Great,
this help us to solve issue on spooler service unable to share some printer randomly…
Windows 7, HP and Lexmark Printers
Thank very much for your help…