Thursday, March 31, 2011

[SP2010] SharePoint Timer service crashes constantly

[SYMPTOMS]
I tried to retract a solution, but the status remained "Retracting" and never changed. After some investigation I found out that the SharePoint Timer service on one of the servers crashed every couple of minutes. The event log showed the following errors:

Log Name: System
Source: Service Control Manager
Date: 3/31/2011 9:24:55 AM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: [Server name]
Description:
The SharePoint 2010 Timer service terminated with service-specific error %%-2147467259.
and

Log Name: System
Source: Service Control Manager
Date: 3/31/2011 9:24:55 AM
Event ID: 7031
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: [Server name]
Description:
The SharePoint 2010 Timer service terminated unexpectedly. It has done this 3 time(s). The following corrective action will be taken in 30000 milliseconds: Restart the service.
The ULS log showed the following errors:
- The timer service could not initialize its configuration, please check the configuration database. Will retry later.

- Exiting the process because the timer could not be initialized after multiple attempts.
- The timer service is stopping
[CAUSE]
After searching the Internet I found one article where someone explained that this was caused by the fact that the Configuration Cache directory (C:\ProgramData\Microsoft\SharePoint\Config) did not contain a folder with the farm GUID as the name. After checking the configuration cache folder, that folder was indeed missing.

I then remembered I had to clear the configuration cache last week because the implementation of the February 2011 Cumulative Update failed during the Configuration Wizard step. Clearing the configuration cache fixed this issue. As it turned out, I was a little too enthousiastic with deleting the folders :-)

[Resolution]
  1. Open the Registry Editor
  2. Browse to HKLM > SOFTWARE > Microsoft > Shared Tools > Web Server Extensions > 14.0 > Secure > ConfigDB
  3. Copy the value in the property "Id"
  4. Browse to folder C:\ProgramData\Microsoft\SharePoint\Config and create a folder with the name of the previously copied value
  5. Restart the SharePoint Timer service
  6. The folder should be populated with XML files within a minute.

13 comments:

Harish Kumar said...

Thanks for this Blog, saved lot of my time to figure out the resolution.

... said...

Saved me as well.

Terry Lau said...

Thanks for your sharing. It's useful for me.

Zakir Chougle said...

Thanks !! Your resolution helped me to solve my wsp deployment issue.

Wee Zil said...

This just fixed my development environment. Thanks a ton.

Aakif said...

Thank you it helped a lot and the same thing works for SharePoint 2013

Aakif said...

Thank you it helped a lot and the same thing works for SharePoint 2013

Amit Koyani said...

can please tell solution for SharePoint 2013...there is no C:\\program data

Amit Koyani said...

can please tell solution for SharePoint 2013...there is no C:\\program data

Amit Koyani said...

Please write solution for SharePoint 2013.. because there is no C:\\programdata

Amit Koyani said...

please post for SharePoint 2013because there is no c:\\programdata

Unknown said...

In may case there is 15.0 folder in registry edit and I took that ID and create folder but, when I restart service there is no XML file generate and unfortunately problem remain same..

Unknown said...

In my case there is 15.0>secure>configDB and I copied ID from there, and do the same but When I restart service no populated XML file in them and unfortunately problem remain same