Today is my third attempt at installing a fresh Sitecore 9 installation, with the intention of installing Sitecore Commerce (SxC) and Sitecore Accelerator (SxA) components, as a sandbox to practice Sitecore Commerce concepts for my upcoming exam Sitecore® Experience Commerce™ 9.0: Essentials Certification. My previous attempts have been foiled mostly by issues with SiF failing at the point where it tries to create SSL certificates during the installation process.
First off, installing Sitecore 9 introduces two challenges that previous versions did not: 1) SOLR, and 2) HTTPS / SSL certificates. For SOLR, I had already managed to set up SOLR under HTTPS in one of my previous attempts to install Sitecore 9, so I have nothing to write about that. Second, before installing Sitecore 9, it is valuable to read Kam Figy's All about xConnect Security. This is one of those 'Holy Grail' articles that took me from absolute bewilderment with Sitecore's new relation with HTTPS, to moderate understanding.
As previous attempts, the instructions I followed included the Sitecore 9 Installation Guide, along with this Youtube Video:
Re-running Install.ps1
On trouble with running the Install.ps1 script from the Installation Guide, is if the install fails for any reason and you need to re-run the script, you may run into this error.
Error Code: ERROR_EXECUTING_METHOD More Information: Could not deploy package. Warning SQL72023: The database containment option has been changed to None. This may result in deployment failure if the state of the database is not compliant with this containment level. Error SQL72014: .Net SqlClient Data Provider: Msg 12809, Level 16, State 1, Line 5 You must remove all users with password before setting the containment property to NONE. Error SQL72045: Script execution error. The executed script: IF EXISTS (SELECT 1 FROM [master].[dbo].[sysdatabases] WHERE [name] = N'$(DatabaseName)') BEGIN ALTER DATABASE [$(DatabaseName)] SET CONTAINMENT = NONE WITH ROLLBACK IMMEDIATE; END
The installation script mounts the databases and creates a user per database. When attempting to drop and recreate the database, these users must be dropped first. I created a DropUsers.sql script I could run between re-running the Install.ps1 script.
SSL Certificate Issues
Finally I ran into the error that blocked me on my two previous attempts:
[------------------------------------------------------------- CreateBindingsWithDevelopmentThumprint : AddWebFeatureSSL -----------------------------------------------------------------------------------] ********************** Command start time: 20180723134927 ********************** PS>TerminatingError(New-SelfSignedCertificate): "Cannot find object or property. 0x80092004 (-2146885628 CRYPT_E_NOT_FOUND) CertEnroll::CSignerCertificate::Initialize: The certificate does not have a property that references a private key. 0x8009200a (-2146885622 CRYPT_E_UNEXPECTED_MSG_TYPE)" >> TerminatingError(New-SelfSignedCertificate): "Cannot find object or property. 0x80092004 (-2146885628 CRYPT_E_NOT_FOUND) CertEnroll::CSignerCertificate::Initialize: The certificate does not have a property that references a private key. 0x8009200a (-2146885622 CRYPT_E_UNEXPECTED_MSG_TYPE)" >> TerminatingError(New-SelfSignedCertificate): "Cannot find object or property. 0x80092004 (-2146885628 CRYPT_E_NOT_FOUND) CertEnroll::CSignerCertificate::Initialize: The certificate does not have a property that references a private key. 0x8009200a (-2146885622 CRYPT_E_UNEXPECTED_MSG_TYPE)" Install-SitecoreConfiguration : Cannot find object or property. 0x80092004 (-2146885628 CRYPT_E_NOT_FOUND) CertEnroll::CSignerCertificate::Initialize: The certificate does not have a property that references a private key. 0x8009200a (-2146885622 CRYPT_E_UNEXPECTED_MSG_TYPE) At C:\projects\Commerce92\Install\Install.ps1:45 char:1 + Install-SitecoreConfiguration @xconnectParams + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration Install-SitecoreConfiguration : Cannot find object or property. 0x80092004 (-2146885628 CRYPT_E_NOT_FOUND) CertEnroll::CSignerCertificate::Initialize: The certificate does not have a property that references a private key. 0x8009200a (-2146885622 CRYPT_E_UNEXPECTED_MSG_TYPE) At C:\projects\Commerce92\Install\Install.ps1:45 char:1 + Install-SitecoreConfiguration @xconnectParams + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
I suspected this is caused by having several previous Sitecore 9 installations from previous projects already on my workstation, each with their own SSL certificates. Sure enough, this article, Install-SitecoreConfiguration : The certificate does not have a property that references a private key confirmed this was my problem, and had the solution. At the end of the article are exact directions to remove existing Local Computer and My User certificates (the My User certs were key to fixing this).
After removing the previous certificates, SiF managed to install Sitecore 9 Update 2, to much happiness.
Comments
Post a Comment