Recently I found a set of error messages in the Windows Application event log on the servers of a SharePoint 2010 farm. The errors were repeated in the logs hourly. The text of the error message was not very informative:
failure trying to synch site 9bc8e724-bcf1-435b-8eb2-ee5ac6b912b6 for ContentDB 1544ecc2-fb82-476b-a9b1-fca546dd5e37 WebApp 4feb0995-3b43-434a-b469-01bb39445a98. Exception message was <nativehr>0x80070005</nativehr><nativestack></nativestack>.
In the ULS log I found further details about the error:
10/06/2013 07:00:01.56 OWSTIMER.EXE (0x2584) 0x1E28 SharePoint Foundation General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80070005 44237f1d-1aeb-4f5f-923d-37dbb6e63490
10/06/2013 07:00:01.56 OWSTIMER.EXE (0x2584) 0x1E28 SharePoint Foundation General 72k4 Medium <nativehr>0x80070005</nativehr><nativestack></nativestack> 44237f1d-1aeb-4f5f-923d-37dbb6e63490
10/06/2013 07:00:01.56 OWSTIMER.EXE (0x2584) 0x1E28 SharePoint Foundation General 8kh7 High <nativehr>0x80070005</nativehr><nativestack></nativestack> 44237f1d-1aeb-4f5f-923d-37dbb6e63490
10/06/2013 07:00:01.56 OWSTIMER.EXE (0x2584) 0x1E28 SharePoint Server General 7888 Warning A runtime exception was detected. Details follow. Message: <nativehr>0x80070005</nativehr><nativestack></nativestack> Technical Details: System.UnauthorizedAccessException: <nativehr>0x80070005</nativehr><nativestack></nativestack> at Microsoft.SharePoint.Library.SPRequest.UpdateField(String bstrUrl, String bstrListName, String bstrXML) at Microsoft.SharePoint.SPField.UpdateCore(Boolean bToggleSealed) at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.UserSynchronizer.PushSchemaToList() at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.UserSynchronizer.SynchFull() at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.Synch() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, Filte… 44237f1d-1aeb-4f5f-923d-37dbb6e63490
10/06/2013 07:00:01.56* OWSTIMER.EXE (0x2584) 0x1E28 SharePoint Server General 7888 Warning …rBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) 44237f1d-1aeb-4f5f-923d-37dbb6e63490
10/06/2013 07:00:01.56 OWSTIMER.EXE (0x2584) 0x1E28 SharePoint Portal Server User Profiles ohvo Exception (Watson Reporting Cancelled) System.UnauthorizedAccessException: <nativehr>0x80070005</nativehr><nativestack></nativestack> at Microsoft.SharePoint.Library.SPRequest.UpdateField(String bstrUrl, String bstrListName, String bstrXML) at Microsoft.SharePoint.SPField.UpdateCore(Boolean bToggleSealed) at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.UserSynchronizer.PushSchemaToList() at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.UserSynchronizer.SynchFull() at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.Synch() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) 44237f1d-1aeb-4f5f-923d-37dbb6e63490
10/06/2013 07:00:01.56 OWSTIMER.EXE (0x2584) 0x1E28 SharePoint Portal Server User Profiles 5553 Critical failure trying to synch site a45068a1-2774-4d47-90f7-75665d69decb for ContentDB dcbc9765-0497-42c1-9dc4-e0de1b02d3f0 WebApp adab5c3e-9dfe-4159-ba0e-1828974b19b0. Exception message was <nativehr>0x80070005</nativehr><nativestack></nativestack>. 44237f1d-1aeb-4f5f-923d-37dbb6e63490
So the error is related to the SharePoint Timer Job (OWSTIMER.EXE), to the User Profile to SharePoint Full Synchronization (Microsoft.Office.Server.UserProfiles.SiteSynchronizer.UserSynchronizer.SynchFull), and to the lack of permissions (UnauthorizedAccessException).
As you might know, there are two timer jobs responsible for synchronization of SharePoint User Profile information to SharePoint sites: the User Profile to SharePoint Full Synchronization and the User Profile to SharePoint Quick Synchronization. The full synchronization is started hourly, that corresponds to the frequency of the errors in the log.
From this point the solution was quite simple, we should have only to give permissions for the identity of the OWSTimer service to the web application referred by ID in the error message. The PowerShell script I “borrowed” from this blog post handling the missing permission issue in case of Excel Services, another problem we already faced to in those days as well.
$webApp = Get-SPWebApplication –Identity http://YourSPWebApplication
# or
# $webApp = Get-SPWebApplication 4feb0995-3b43-434a-b469-01bb39445a98 # ID of the web application from the error message above
$webApp.GrantAccessToProcessIdentity("domain\userName") # the user account from the error message above (that should be the identity of the OWSTimer service)
Leave a comment