Answered by:
CRM Redeployment failed

Question
-
Hi,
After restoring the Organization_MSCRM and MSCRM_Config databases to my Dev environment I am getting the error in the Event viewer as
Log Name: Application
Source: MSCRMKeyGenerator
Date: 13/07/2009 14:35:33
Event ID: 18945
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: 0CRM32DEV01.internal.comp.co.uk
Description:
CrmKeyGenerator encountered an error generating/monitoring key type Microsoft.Crm.CrmConfigObjectNotFoundException: CrmKey With Id = 92163130-2845-de11-b491-000e7f7d6356 Does Not Exist
at Microsoft.Crm.CrmKey.LoadExistingKey(Guid crmKeyId)
at Microsoft.Crm.CrmKeyGenerator.HandleChangedSettings(CrmKeyInfo keyInfo, Guid scaleGroupId)
at Microsoft.Crm.CrmKeyGenerator.DoManageKeys(Guid scaleGroupId). Check event log to see if keys are being generated properly. KeySetting : %2. Error : %3
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="MSCRMKeyGenerator" />
<EventID Qualifiers="49152">18945</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2009-07-13T13:35:33.000Z" />
<EventRecordID>3432</EventRecordID>
<Channel>Application</Channel>
<Computer>0CRM32DEV01.internal.comp.co.uk</Computer>
<Security />
</System>
<EventData>
<Data>Microsoft.Crm.CrmConfigObjectNotFoundException: CrmKey With Id = 92163130-2845-de11-b491-000e7f7d6356 Does Not Exist
at Microsoft.Crm.CrmKey.LoadExistingKey(Guid crmKeyId)
at Microsoft.Crm.CrmKeyGenerator.HandleChangedSettings(CrmKeyInfo keyInfo, Guid scaleGroupId)
at Microsoft.Crm.CrmKeyGenerator.DoManageKeys(Guid scaleGroupId)</Data>
</EventData>
</Event>
Can some help me on this.
Thanks- Split by Donna EdwardsMVP Thursday, May 20, 2010 6:36 PM
Monday, July 13, 2009 1:40 PM
Answers
-
Hi Guy,
Please see the responses below:
One thing, in deployment manager under servers list my web server (Roles are displayed as Full Server, SRS data connector) is displayed as Disabled. Do i need to enable it? What does this actually mean?
I am not sure why the SRS Data Connector is disabled, but you may not need the connector since SQL and CRM are on the same server. To enable the Connector, you can run a repair. You could also select it and select Enable, but I am concerned that your initial install might have been associated with your Production rather than Dev environment. Therefore, I recommend a repair and ensure SRSS Data Connector is associated to your Dev environment.
And at last it would be really very greatfull if you can suggest me the way to have my Dev environment in Sync with the production environment. The process of doing this, trouble shooting etc.
The way to keep your Dev environment in sync is to follow the guide provided before for your database backup and restore."here is a good article by Joel Lindstrom on refreshing a test environment with production data."
You must ensure that you follow the steps carefully and go through the Organization Import wizard to connect to the database after you backup and restore the production database to the Dev environment. The wizard will walk you through the steps and you should carefully make the correct entries.
If might be useful for you to engage the services of someone who can do this for you the first time and you can shadow the individual. It probably won't take more than an hour depending on the size of your production database and will be a great learning experience and a time saver for you moving forward.
Best Regards, Donna- Proposed as answer by Donna EdwardsMVP Tuesday, July 14, 2009 1:05 PM
- Marked as answer by Jim Glass Jr Monday, May 24, 2010 4:26 PM
Tuesday, July 14, 2009 1:05 PM -
......"but may be because i gave my production and dev environment the same Organization name i ran into problems"
Yes, the above is most likely the root issue.
Is there a way where intsead of doing the complete DB back up I can only import few entities data (like Country, etc) from production to staging?
You can export the data by setting up an Advanced Find query that includes all the fields you want to export from the entity record. Run the Advanced Find query and export to Excel saving the file as .csv. You can then use the Data Import tool from CRM and import the data.
You will also want to backup your customization file from Production and Import the file to the staging server and publish it in order for your staging server to have any customizations from your production machine. If you don't know how to do this, I can provide the steps.
Another option for uploading data is the Data Migration Manager, again using the Advanced Find, export method above. Scribe software also provides a method for migrating data from one environment to another and it is relatively inexpessive.
Hopefully one of the above solutions will better fit your needs, although the backup, restore, and import method is the most efficient and once you've done a few, you will become an expert. Just give the Org a different name when you come to that step in the Wizard. Give it a name like CRMTest or CRMDev and it should work as expected.
Best Regards, Donna- Proposed as answer by Donna EdwardsMVP Tuesday, July 14, 2009 2:13 PM
- Marked as answer by Jim Glass Jr Monday, May 24, 2010 4:26 PM
Tuesday, July 14, 2009 2:13 PM
All replies
-
The above issue is solved. But when I try to log into the CRM i am getting the below exception....
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 13/07/2009 14:48:49
Event ID: 1309
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: 0CRM32DEV01.internal.comp.co.uk
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 13/07/2009 14:48:49
Event time (UTC): 13/07/2009 13:48:49
Event ID: 38fc24988e3e4db797f5539bce15fa43
Event sequence: 526
Event occurrence: 20
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT-1-128919437206494323
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\
Machine name: 0CRM32DEV01
Process information:
Process ID: 1096
Process name: w3wp.exe
Account name: comp-INT\DevCRMSvc
Exception information:
Exception type: UriFormatException
Exception message: Invalid URI: The format of the URI could not be determined.
Request information:
Request URL: https://compinternational.staging.compcrm.com:443/signin.aspx
Request path: /signin.aspx
User host address: 192.168.33.39
User: comp-INT\crmsysadmin
Is authenticated: True
Authentication Type: Kerberos
Thread account name: comp-INT\DevCRMSvc
Thread information:
Thread ID: 4
Thread account name: comp-INT\DevCRMSvc
Is impersonating: False
Stack trace: at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.Crm.WebServices.OrganizationEndpointProviderFactory.AbstractOrganizationEndpointProvider.GetWebApplicationUrl(Guid organizationId)
at Microsoft.Crm.Authentication.CrmPostAuthenticationCookieHelper.RetrieveOrganizationDomain(Guid organizationId, String passportDomainRoot)
at Microsoft.Crm.Authentication.CrmPostAuthenticationCookieHelper.CreateCookie(CrmPostAuthenticationTicket ticket)
at Microsoft.Crm.Authentication.CrmPostAuthenticationHelper.CreateAndAttachCookie(HttpApplication application, CrmPostAuthenticationTicket ticket)
at Microsoft.Crm.Authentication.CrmPostAuthenticationHelper.CreateAndAttachCookie(HttpApplication application, ICrmIdentity identity)
at Microsoft.Crm.Application.Web.SignIn.ConfigurePage()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details: Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="32768">1309</EventID>
<Level>3</Level>
<Task>3</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2009-07-13T13:48:49.000Z" />
<EventRecordID>3468</EventRecordID>
<Channel>Application</Channel>
<Computer>0CRM32DEV01.internal.comp.co.uk</Computer>
<Security />
</System>
<EventData>
<Data>3005</Data>
<Data>An unhandled exception has occurred.</Data>
<Data>13/07/2009 14:48:49</Data>
<Data>13/07/2009 13:48:49</Data>
<Data>38fc24988e3e4db797f5539bce15fa43</Data>
<Data>526</Data>
<Data>20</Data>
<Data>0</Data>
<Data>/LM/W3SVC/1/ROOT-1-128919437206494323</Data>
<Data>Full</Data>
<Data>/</Data>
<Data>C:\inetpub\wwwroot\</Data>
<Data>0CRM32DEV01</Data>
<Data>
</Data>
<Data>1096</Data>
<Data>w3wp.exe</Data>
<Data>comp-INT\DevCRMSvc</Data>
<Data>UriFormatException</Data>
<Data>Invalid URI: The format of the URI could not be determined.</Data>
<Data>https://compinternational.staging.compcrm.com:443/signin.aspx</Data>
<Data>/signin.aspx</Data>
<Data>192.168.33.39</Data>
<Data>comp-INT\crmsysadmin</Data>
<Data>True</Data>
<Data>Kerberos</Data>
<Data>comp-INT\DevCRMSvc</Data>
<Data>4</Data>
<Data>comp-INT\DevCRMSvc</Data>
<Data>False</Data>
<Data> at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.Crm.WebServices.OrganizationEndpointProviderFactory.AbstractOrganizationEndpointProvider.GetWebApplicationUrl(Guid organizationId)
at Microsoft.Crm.Authentication.CrmPostAuthenticationCookieHelper.RetrieveOrganizationDomain(Guid organizationId, String passportDomainRoot)
at Microsoft.Crm.Authentication.CrmPostAuthenticationCookieHelper.CreateCookie(CrmPostAuthenticationTicket ticket)
at Microsoft.Crm.Authentication.CrmPostAuthenticationHelper.CreateAndAttachCookie(HttpApplication application, CrmPostAuthenticationTicket ticket)
at Microsoft.Crm.Authentication.CrmPostAuthenticationHelper.CreateAndAttachCookie(HttpApplication application, ICrmIdentity identity)
at Microsoft.Crm.Application.Web.SignIn.ConfigurePage()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</Data>
</EventData>
</Event>Monday, July 13, 2009 1:51 PM -
It is becoming worse and worse... :(
I have taken the back up of the "Comp_MSCRM" and "MSCRM_Config" databases of live environment and restored them onto the staging environment. Now when I click the login page of the staging environment it will simply post back and the page is redirected to the login page of the live environment. Can some please help me resolve this issue. This seems to be some major problem.Monday, July 13, 2009 2:44 PM -
It sounds like you didn't give your test server a different name when you imported the Organization. For example, in my dev environment, after I restore the production database to the Dev environment, when I import the Organization, and select to connect to an existing installation, I give it the name CRMTest or something like that and ensure I am connecting to the database on my test environment and not my live environment.
If you backed up the database that was installed when you initially installed CRM 4 in the test environment, I would revert back to that database. Otherwise do a fresh install of 4.0 and ensure it is working as expected before trying to move the production database to the test environment. When you do move production to test, take your time and be very careful about what values you enter after you select the Import Organization.
You may want to have someone who has done this before, shadow you and help troubleshoot any issues.
Best Regards, DonnaMonday, July 13, 2009 2:54 PM -
Hi Donna,
Yes it went as you have mentioned...initially also i had the organization name same in staging and producion environment. When i have imported it was pointing the production db. Later I have edited the organization in Deployment Manager and updated to use my staging database. Will it not solve the issue?Monday, July 13, 2009 3:06 PM -
It may work, depending on everything that happened during the import process. Is the Dev environment working as expected now and not interfering with production?
Best Regards, DonnaMonday, July 13, 2009 3:39 PM -
No Donna, the Dev environment login page after post back is redirecting to live login page. And in the servers list in Deployment Manager on staging server, my production web server and DB server are shown.
- Edited by Courageous_Heart Monday, July 13, 2009 3:49 PM
Monday, July 13, 2009 3:42 PM -
Then, it looks like whatever action you took did not work. Otherwise you would see your Dev server and Dev db listed in the Deployment Manager and not your production server and db. It is difficult to understand what state your environment is currently in so if it is not too much trouble, I would take my initial advice:
"If you backed up the database that was installed when you initially installed CRM 4 in the test environment, I would revert back to that database. Otherwise do a fresh install of 4.0 and ensure it is working as expected before trying to move the production database to the test environment. When you do move production to test, take your time and be very careful about what values you enter after you select the Import Organization.
You may want to have someone who has done this before, shadow you and help troubleshoot any issues."
Best Regards, DonnaMonday, July 13, 2009 5:15 PM -
Hi,
As per your suggestion i have restored back my Dev DB's and luckily the staging environment is back. One thing, in deployment manager under servers list my web server (Roles are displayed as Full Server, SRS data connector) is displayed as Disabled. Do i need to enable it? What does this actually mean?
And at last it would be really very greatfull if you can suggest me the way to have my Dev environment in Sync with the production environment. The process of doing this, trouble shooting etc.
Thanks in advance...Tuesday, July 14, 2009 5:53 AM -
Hi,
Can any one please suggest me for the above comment....
ThanksTuesday, July 14, 2009 12:51 PM -
Hi Guy,
Please see the responses below:
One thing, in deployment manager under servers list my web server (Roles are displayed as Full Server, SRS data connector) is displayed as Disabled. Do i need to enable it? What does this actually mean?
I am not sure why the SRS Data Connector is disabled, but you may not need the connector since SQL and CRM are on the same server. To enable the Connector, you can run a repair. You could also select it and select Enable, but I am concerned that your initial install might have been associated with your Production rather than Dev environment. Therefore, I recommend a repair and ensure SRSS Data Connector is associated to your Dev environment.
And at last it would be really very greatfull if you can suggest me the way to have my Dev environment in Sync with the production environment. The process of doing this, trouble shooting etc.
The way to keep your Dev environment in sync is to follow the guide provided before for your database backup and restore."here is a good article by Joel Lindstrom on refreshing a test environment with production data."
You must ensure that you follow the steps carefully and go through the Organization Import wizard to connect to the database after you backup and restore the production database to the Dev environment. The wizard will walk you through the steps and you should carefully make the correct entries.
If might be useful for you to engage the services of someone who can do this for you the first time and you can shadow the individual. It probably won't take more than an hour depending on the size of your production database and will be a great learning experience and a time saver for you moving forward.
Best Regards, Donna- Proposed as answer by Donna EdwardsMVP Tuesday, July 14, 2009 1:05 PM
- Marked as answer by Jim Glass Jr Monday, May 24, 2010 4:26 PM
Tuesday, July 14, 2009 1:05 PM -
Hi Donna,
Thanks for the detailed explanation. Initially i have followed the same procedure but may be because i gave my production and dev environment the same Organization name i ran into problems. Unfortunately i dont have anyone to guide em on this :(.
Is there a way where intsead of doing the complete DB back up I can only import few entities data (like Country, etc) from production to staging?
One way i know is to use the web service and select the data from live and insert to staging. But for this i need to spend enough time for developing the stub.Tuesday, July 14, 2009 1:40 PM -
......"but may be because i gave my production and dev environment the same Organization name i ran into problems"
Yes, the above is most likely the root issue.
Is there a way where intsead of doing the complete DB back up I can only import few entities data (like Country, etc) from production to staging?
You can export the data by setting up an Advanced Find query that includes all the fields you want to export from the entity record. Run the Advanced Find query and export to Excel saving the file as .csv. You can then use the Data Import tool from CRM and import the data.
You will also want to backup your customization file from Production and Import the file to the staging server and publish it in order for your staging server to have any customizations from your production machine. If you don't know how to do this, I can provide the steps.
Another option for uploading data is the Data Migration Manager, again using the Advanced Find, export method above. Scribe software also provides a method for migrating data from one environment to another and it is relatively inexpessive.
Hopefully one of the above solutions will better fit your needs, although the backup, restore, and import method is the most efficient and once you've done a few, you will become an expert. Just give the Org a different name when you come to that step in the Wizard. Give it a name like CRMTest or CRMDev and it should work as expected.
Best Regards, Donna- Proposed as answer by Donna EdwardsMVP Tuesday, July 14, 2009 2:13 PM
- Marked as answer by Jim Glass Jr Monday, May 24, 2010 4:26 PM
Tuesday, July 14, 2009 2:13 PM -
Hi,
Please could you tell me how did you solve this issue (Evnt ID : 18945)
Thanks
Wednesday, May 12, 2010 1:21 AM -
Importing "Organization_MSCRM and MSCRM_Config databases" both and restoring may sometimes create problems. Playing with "MSCRM_Config" database can mess up things.
Try restoring "Organization_MSCRM" only.
- Arvind- Edited by Arvind Viswakarma Wednesday, May 12, 2010 6:02 AM correction
Wednesday, May 12, 2010 5:23 AM