I got the following error in my SharePoint 2013 environment:
[SystemException: The trust relationship between the primary domain and the trusted domain failed.
]
System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) +1085
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) +52
System.Security.Principal.NTAccount.Translate(Type targetType) +181
Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKeyClaim(IClaimsIdentity claimsIdentity, SPClaim loginClaim) +310
Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(String encodedIdentityClaimSuffix) +379
Microsoft.SharePoint.Utilities.SPUtility.GetFullUserKeyFromFullName(String fullName) +209
Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) +40779177
Microsoft.SharePoint.SPSite.get_Request() +323
Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId, Int32 mondoHint) +60
Microsoft.SharePoint.Publishing.CachedObjectFactory.OpenWebFromSuperUserSite(Guid webId) +655
Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site) +1276
Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean useContextSite, Boolean allowContextSiteOptimization, Boolean refreshIfNoContext) +1115
Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingRibbon.OnLoad(EventArgs e) +150
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
I upgraded from SharePoint 2010. I do not have this issue in SP2010.
From the exception it looks like something to do with Publishing feature, so I disabled this feature, and this error is gone.
I also found this issue only occurs for certain users.
I found this article
http://blogs.technet.com/b/spsforum/archive/2011/11/02/quick-solution-2-the-trust-relationship-between-the-primary-domain-and-the-trusted-domain-failed.aspx, It is in SP2007 and says you can remove the invalid users from Shared Service Provider. However, I am in SP2013 cannot find a way remove invalid users. I guess the Publishing cache feature is using some invalid user ids, but how can I remove these users?
Do can you please suggest other directions to investigate?