web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CrmWRPCTokenKey expired - root cause?

(3) ShareShare
ReportReport
Posted on by 3,079

This morning, I started getting the error "Current key (KeyType : CrmWRPCTokenKey) is expired".  After searching here, I found the steps to restart the async service, regenerate the key using "Microsoft.Crm.Tools.WRPCKeyRenewal.exe /R", and then do an IISReset, and this worked.  However, I'd like to try to figure out why the key did not renew properly on its own.

The only things I could see about that were 1. expired trial license, which is not the case, 2. Async or async maintenance services not running, which they both were running just fine, or 3. an overly large async database (https://support.microsoft.com/en-us/help/968520/performance-is-slow-if-the-asyncoperationbase-table-becomes-too-large).  However, running the count script at that link, I see it would only delete < 1000 records, which certainly doesn't seem to be anywhere near large enough to create issues.

Any ideas on where else I could look to track the root cause down?

ETA:  I checked the Application log in Event Viewer, and I can definitely see a bunch of the errors from the KeyGen source, saying it's expired.  Unfortunately, there are so many, I can't see back far enough in the log to the time they started.  (Which was apparently over a week ago - it says the key expired 10 days ago.  Not sure why we only started getting access problems this morning.)

*This post is locked for comments

I have the same question (0)
  • ashlega Profile Picture
    34,477 on at

    Usually, we just use that solution with WRPCKeyRenewal. It's like one of those strange bugs(?) that's been around.. since the beginning of time. I've never seen an explanation as to why CRM would not be able to do it automatically.

  • Gerald Gut Profile Picture
    50 on at

    Hi Allison,

    in our environment (CRM 365 SP2/December update) we have the same errors. MSCRMKeyGenerator throws an error every 15 Minutes.

    "The current active key (KeyType : CrmTicketKey) is expired.  This may indicate that a key is not being regenerated correctly.  Current Active Key : CrmKey(Id:xxx, ScaleGroupId:xxx, KeyType:CrmTicketKey, Expired:True, ValidOn:07/14/2017 15:50:39, ExpiresOn:07/16/2017 15:50:39, CreatedOn:07/14/2017 15:50:39, CreatedBy:xxx.  Key Setting : CrmKeySetting(Id:xxx, KeyType:CrmTicketKey, KeyLength:128, KeyGenerationInterval:24, KeyTimeToLive:48, CryptoTimeToLive:24, Algorithm:HMACSHA256, ArchiveLength:1, Enabled:True, ActiveKeys:[ScaleGroupId=xxx,ActiveKeyId=xxx])"       (keys/GUID's replaced by XXX)

    I was able to reproduce this behavior in our Test and also a Playground environment.

    In my case the problem can be related with a specific windows update (KB3186539 and KB4014604).

    After uninstalling these two updates it worked again.

    KB3186539 is an update of .net Framework to 4.7.....

    Somehow it seems that CRM 365 can not handle it.

    After uninstallation the errors are gone.

    Before doing that I also tried the following:

    Restart Async and Async Maintenance Service.

    Restart IIS.

    Execute Microsoft.Crm.Tools.WRPCKeyRenewal.exe /R

    Change Async and Async Maintenance Service User to network service and back to our custom service user.

    Everything resulted in reappearing of error after 24 hours when keys are regenerated automatically.

    Therefore, uninstalling of the mentioned KB's solved the problem in all our environments.

    Maybe you can confirm my results? :)

    Best regards,

    Gerald

  • awalters Profile Picture
    3,079 on at

    Interesting...sadly, I can neither confirm nor deny.  :-(  1.  Our key re-generation seems to be working fine again now since I reset things the other day, and 2. We're on Server 2016, which doesn't have those same KBs.  Sorry!

  • jphoekstra Profile Picture
    20 on at

    I was having the same problem and removing KB3186539 seems to have corrected it. We have on-premises CRM 2015 installed.

  • awalters Profile Picture
    3,079 on at

    Interesting - was your problem recurring pretty much straight away after resetting, or did the reset stick for a while?  And also, since you have that KB, I assume you're on Server 2012 R2?

  • awalters Profile Picture
    3,079 on at

    Also, as an update - the issue did come back on my machine as well.  Just took a little longer.  So I did the reset, and then I removed what I assume is the equivalent KB for Server 2016 - KB3186568.  We'll see what happens...

  • jphoekstra Profile Picture
    20 on at

    The reset didn't seem to stop the error message. Yes, this machine is Server 2012 R2. We do not have KB4014604 installed and I didn't really look at what it is.

  • Gerald Gut Profile Picture
    50 on at

    Hi Allison, Hi jphoekstra,

    Yes we are on Server 2012 R2. CRM 365 onpremise.

    The error is not gone directly after uninstallation of KB3186568. But after the necessary restart which the KB uninstallation requires, the error is gone. :)

    KB4014604 is only a quality update for .net

    https://support.microsoft.com/en-us/help/4014604/may-2017-description-of-the-quality-rollup-for-the-net-framework-4-6-4

    and seems not to be related to KB3186568.

    I think that it is not necessary to uninstall the quality update.

    @jphoekstra:

    What is your CRM Server setup? We have three servers:

    Front End, Back End and SQL Server

    I think the Update needs to be uninstalled at least on the server where the ASYNC and ASYNC Maintenance Service is running.

    I have uninstalled the KB on all servers except the SQL server.

    Best regards,

    Gerald

  • jphoekstra Profile Picture
    20 on at

    We have 2 machines for the CRM setup, SQL Server and CRM. I removed the update from the machine running the CRM services.

  • James Rees Profile Picture
    115 on at

    Hi Allison

    We upgraded to 365 from CRM 2015 on Server 2012.  We have 2 application servers (frontend and backend) and a SQL server and this problem started after about 1 month and try as we might I cannot get rid of it.    Once the CrmWRPCTokenKey expired the only impact to our users was that they could not access the attachments on notes.  We manually renewed the Keys, as you did and this fixed the issue.   From that point onwards we started getting the "CrmTicketKey is expired" in the event logs and monitoring results every 15 minutes.  Looking at the DB this key does appear to be regenerating and I no users are reporting any impact. I have logged a case with MS support but they haven't been able to resolve the issue.  We are currently waiting to see if the CrmWRPCTokenKey regenerates automatically as that only renews after every month or so.  

    We also have a test system, only 2 servers, application and SQL and this does not have any problems with Keys.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans