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.

3 comments:

Harish Kumar said...

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

... said...

Saved me as well.

Zakir Chougle said...

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