I stumbled upon a weird error after upgrading CRM 2013 to CRM 2016, After enabling the option to view the encryption key in an HTTP deployment:
I received the following error when trying to open the encryption key form:
Event Log on the front end server had the following error:
Exception type: CrmException
Exception message: SYSTEM user account not found.
It took me a while to figure it out but it seems that the problem in my deployment was that i had TWO rows of the CRM SYSTEM user in the SystemUserBase table! all the way from 2013 to 2016 and it looked like that:
select * from SystemUserBase where fullname like '%system%'
They were both created at the same second just a few milliseconds apart – Have no idea how & why.
Delete the second user using the following query:
Delete FROM systemuserbase
WHERE SystemUserId ='youruserguid'
After that – I was able to open the form and insert an encryption key properly.
Important: Tempering with the DB is unsupported by Microsoft so do this at your OWN RISK – Don’t forget to backup your DB before!
During Dynamics CRM 2015/2013 setup you might encounter this error in the final system checks process:
This is caused due to improper SPN’s (Service Principal Name) configuration for the SQL server. To resolve this follow these steps:
1. Connect to your SQL server and go to services (Start -> services.msc) from there locate your SQL service and check the Log on account
2. Open CMD with Run As Administrator and run the following commands one by one (you need to use a high privileged domain account):
setspn –A MSSQLSvc/<SQL Server computer name>:1433 <Domain\Account>
setspn -A MSSQLSvc/<SQL Server FQDN>:1433 <Domain\Account>
If you are running SQL with NETWORK SERVICES or NT Service\MSSQLSERVER – then you need to register the SPN’s for the machine name (it is less likely to encounter this error in that scenario – but possible) – example:
setspn –A MSSQLSvc/CRM-SQL:1433 TZOOKI\crm-sql
If you changed the default SQL port from 1433 to something else – then you need to update the commands accordingly
3. In Dynamics CRM setup click back & next – Problem should be solved – You can now continue the installation.
If you have issues with the CMD commands then there is a way to solve this with a simple GUI instead:
1. Connect to your Active Directory server -> open the ADSI Editor and locate your service account (or machine name if you are using NETWORK SERVICES or NT Service\MSSQLSERVER)
2. Right click -> Properties
3. In the Attribute Editor locate ServicePrincipalName and click Edit.
4. Add your SPN’s accordingly:
5. Click OK & Apply – You installation should now go through without issues