Dynamics CRM COMException: The server is not operational

Hi,

I experienced this error today in a customer. No users could log in to CRM. Everything was working fine until yesterday :(

So, it was a bit strange but the error message was not so helpful. Anyway, I found a solution that worked for me and decided to share here:

 

[ERROR]

image

 

Eventlog:

COMException

The server is not operational. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_NativeObject() at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args) at Microsoft.Crm.SecurityUtils.CheckMembership(Guid principalId, Guid groupId) at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context) at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context) at Microsoft.Crm.BusinessEntities.SecurityLibrary.IsOrganizationSpecialUser(Guid organizationId, Guid userId, ExecutionContext context) at Microsoft.Crm.Caching.UserDataCacheLoader.LoadCacheData(Guid key, ExecutionContext context) at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context) at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoCommon(IOrganizationContext context, Guid userGuid) at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId) at Microsoft.Crm.Authentication.CrmWindowsIdentity..ctor(WindowsIdentity innerIdentity, Boolean publishCrmUser, Guid organizationId) at Microsoft.Crm.Authentication.WindowsAuthenticationProviderBase.Authenticate(HttpApplication application, WindowsIdentity userIdentity) at Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application) at Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application) at Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Log file:

>System.Runtime.InteropServices.COMException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #15A4EDFA: System.Runtime.InteropServices.COMException (0x8007203A): The server is not operational.
>
>   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
>   at System.DirectoryServices.DirectoryEntry.Bind()
>   at System.DirectoryServices.DirectoryEntry.get_NativeObject()
>   at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args)
>   at Microsoft.Crm.SecurityUtils.CheckMembership(Guid principalId, Guid groupId)
>   at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
>   at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
>   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
>   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
>   at Microsoft.Crm.BusinessEntities.SecurityLibrary.IsOrganizationSpecialUser(Guid organizationId, Guid userId, ExecutionContext context)
>   at Microsoft.Crm.Caching.UserDataCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
>   at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
>   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
>   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
>   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoCommon(IOrganizationContext context, Guid userGuid)
>   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId)
>   at Microsoft.Crm.Authentication.CrmWindowsIdentity..ctor(WindowsIdentity innerIdentity, Boolean publishCrmUser, Guid organizationId)
>   at Microsoft.Crm.Authentication.WindowsAuthenticationProviderBase.Authenticate(HttpApplication application, WindowsIdentity userIdentity)
>   at Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application)
>   at Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application)
>   at Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e)
>   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
>   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[2011-12-21 13:57:01.052] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:  151 |Category: Pla

 

[CAUSE]

After going over the logs and making some researches, finally all pointed out to something wrong with the Active Directory Domain Controller.

Actually, after searching hard I came up with this post from Customer Effective guys who confirmed my theory.

End of story: the problem was that one DC was down.

 

[SOLUTION]

Amazingly, solution was same as my previous post, but now for the CRM Server.

The idea of explicitly set the Preferred DC for Dynamics CRM worked fine, replacing previous value in the registry for the new one.

So, steps are:

  • Open registry and navigate to HKLM\Software\Microsoft\MSCRM
  • If "PreferredDc" string exists, then open it, if not
    • Right Click and click on NewString value as "PreferredDc"
  • Add / Edit the value to PreferredDc setting it to YourNewDomainControllerName. You can find this in your AD by typing the command in your cmd prompt echo %logonserver%

Hope it helps to save somebody else’s time,

PP [twitter: @pabloperalta]

4 Comments

Comments have been disabled for this content.