The “SharePoint Timer Service” service terminated with the following service-specific error: Unspecified error

In the event log every 2 minutes, this error pops up:

The SharePoint Timer Service Service terminated with the following service-specific error: Unspecified error

A quick look at the Performance indicator, tells me that the CPU is not having it. Every 30 seconds or so, it maxes out. Most likely trying to restart the Timer service over and over.

The solution seems to be to reset the config cache. Only problem with that was that there was a xml-file which was locked. On top of that there was a tmp-file as well. A lot of googling later and I found that the reason was that the xml-file was locked by “miiserver.exe”. How in the f*^¤ that is done and why, I have no idea. After some research I find that this means it’s the “User Profile Synchronization Service”, that is locking that pesky xml-file. Another thing I found was that the cache.ini file still contained “1”. That number should be way larger.

The SharePoint Tracing Service was running, using the account “Local System”. That is not right. That needs to be fixed when the services are down anyway. But that doesen’t seem relevant to this specific error

On top of that the whole thing started with an update of the certificate of the owa server and then an update of the SPWOPIBindings, which gave an error on “Remove-SPWOPIBinding -Server wac.domain.com”. The function could not gain access to a [GUID].xml file in the config library.

These are the steps I followed to solve the issue:

Step 1: Stop the SharePoint Timer service

Step 2: Stop the SharePoint Administration Service

Step 3: Open Central admin and stop the “User Profile Synchronization Service”
Notice that the tmp-file goes away

Step 4: Give the “SharePoint Timer Service” account full permissions to the folder ” C:\ProgramData\Microsoft\SharePoint\Config”

Step 5: In C:\ProgramData\Microsoft\SharePoint\Config[Last updated GUID]

  1. edit cache.ini and replace the number with 1
  2. delete all the xml-files
  3. DON’T Delete the cache.ini file!

Step 6: Run this Powershell to change the Service Account for the SharePoint Tracing Service. The account should be the same as the one used for AppFabric Caching Service.

$farm = Get-SPFarm
$Svc = $farm.Services | where {$_.Name -eq "SPTraceV4"}
$accnt = Get-SPManagedAccount -Identity domain\SPServices
$Svc.ProcessIdentity.CurrentIdentityType = "SpecificUser" 
$Svc.ProcessIdentity.ManagedAccount = $accnt 
$Svc.ProcessIdentity.Update() 
$Svc.ProcessIdentity.Deploy()

Step 7: Start the 3 Services up again and you should see a config folder filling up with xml-files as well as seeing the errors in the event log dissapear

Step 8 (optional): New-SPWOPIBinding -ServerName wac.domain.com
This is specific for my issue where I could not update the SPWopiBinding af a Certificate-update

I found the solution to be a combination of:
• https://sharepoint.stackexchange.com/questions/159375/the-sharepoint-timer-service-service-terminated-unexpectedly
• http://www.codeovereasy.com/2012/12/locked-file-in-sharepoint-configuration-cache/

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.