locked
CRMWRPCTokenKey Issues - Event 18962 RRS feed

  • Question

  • Hello
    I am working for a client who is running CRM 2015 On Premise, and has the CRM Server Update 0.1 as the latest UR.

    I have been having reports of people getting errors when trying to download attachments from notes in the system.  So I start digging in, and find that there are a number of issues present in the event log - however, the one that seems to be the most prevalent, and related to my users, are the following:

    Event: 18962

    Current key (KeyType : CrmWRPCTokenKey) is expired.  This can indicate that a key is not being regenerated correctly.  Current Key : CrmKey(Id:7b92dc39-f014-e711-9438-00155dfc452d, ScaleGroupId:00000000-0000-0000-0000-000000000000, KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:03/30/2017 02:26:06, ExpiresOn:05/02/2017 02:26:06, CreatedOn:03/30/2017 02:26:06, CreatedBy:NT AUTHORITY\NETWORK SERVICE.

    Event 1309:
     Exception type: CrmException
        Exception message: The key specified to compute a hash value is expired, only active keys are valid.  Expired Key : CrmKey(Id:7b92dc39-f014-e711-9438-00155dfc452d, ScaleGroupId:00000000-0000-0000-0000-000000000000, KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:03/30/2017 02:26:06, ExpiresOn:05/02/2017 02:26:06, CreatedOn:03/30/2017 02:26:06, CreatedBy:NT AUTHORITY\NETWORK SERVICE.
       at Microsoft.Crm.CrmKeyService.ComputeHash(CrmKey key, Guid scaleGroupId, HashParameterBase[] parameters)
       at Microsoft.Crm.CrmKeyService.ComputeHash(CrmKey key, HashParameterBase[] parameters)
       at Microsoft.Crm.Application.Security.WrpcContext.ComputeWrpcTokenHash(CrmKey key, String actionPageUrl, DateTime timestamp)
       at Microsoft.Crm.Application.Security.WrpcContext.ValidateToken()
       at Microsoft.Crm.Application.Controls.AppPage.ValidateWrpcContext()
       at Microsoft.Crm.Application.Controls.AppPage.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    I have been scouring the web, trying to figure out how to fix this.  The 'temporary' fix is to have users clear IE cache and then restart their browsers - and that seems to work, for about a month.  Then, when the next key is generated, they get the same issue.  However, the key errors in the event viewer are always there, firing every 20-30 minutes or so.

    I have tried all the usual suspects: Restart Async and Async Maintenance services.  Manually stop/start those services.  Reset IIS.  Reboot the entire server.  None of this has worked.


    I then started digging into the database to try and figure out what the issue might be.  They do have a dev server, which is NOT experiencing these issues whatsoever.  So I wanted to compare the records in the MSCRM_CONFIG database, and the CrmKey table (as well as the CRMKeyProperties, CRMKeySettings, and CRMKeySettingProperties tables).  What I saw was a bit confusing.

    In DEV (which again, works perfectly with respect to this error  - it does not appear), there is only ONE CRMWRPCTokenKey, and it is Enabled (Enabled =1).  The valid date range falls within what I'd expect (it's currently valid, expires mid-month). 

    In PROD, where the issue is present, there are THREE CRMWRPCTokenKeys, one of which is enabled and the other 2 are disabled.  The one that is enabled has a valid 'valid date' and 'expiration date' - it should be active as of yesterday, and will not expire until early May.  It appears that this same table (MSCRM_CONFIG.CrmKey) has multiple records for CRMStaticVersionScaleGroupkey (2 records), CRMTicketkey (3 records), as well as the CrmWRPCTokenKey (3 records).

    I do see that two of the CRMWRPCTokenKey records (including the one active one) were created by my user account, while the third, which is also inactive, was created by Network Service (in prod).  The lone record of this type in DEV was also created by Network Service.


    So, does anyone have a permanent fix for this?  Why would I have multiple instances of the same type of key in the CRMKey table in one instance, but not the other?  Is that key regenerated when I stop/start the Async Maintenance service?  WHy wouldn't it clean up the old keys, so the system only has 1 to look at?

    Tuesday, April 4, 2017 4:00 PM

All replies

  • we have the same issue in the our environment. we fixed it by updating the CrmKeySetting table of the MSCRM_CONFIG DB, setting the ActiveKeyId with the enabled CRMWRPCTokenKey key


    Sugar

    Monday, May 22, 2017 6:11 PM