Troubleshooting and Tips on Sitecore Experience Commerce 9.0.2

While trying out my hands on the Sitecore Experience Commerce 9.0.2 in the month August 2018 I have been through some of the errors and fixed those errors successfully. In the steps of doing so I did found out some Tips also which I thought should be taken into consideration while working with the setup. This would definitely help you with the  installation and setup of Sitecore Experience Commerce. There are also lot of questions posted by me on Sitecore StackExchange for the same.

Troubleshooting

  1. Error “Install-SitecoreConfiguration: Cannot find path ‘C:\inetpub\wwwroot\CommerceOps_Sc9\wwwroot\config.json’ because it does not exist.

Fix: Make sure the Sitecore.Commerce.Engine.2.2.126.zip file you created do not have any subfolder as Sitecore.Commerce.Engine.2.2.126 else you will end up with this error during setup.

1

2

  1. ErrorCannot find path ‘IIS:\Sites\’ because it does not exist”.

Fix: Make sure the PowerShell script you ran have the same $Sitename as you see in your wwwroot or you have in IIS. Here it sxp9u2.sc.

3

  1. ErrorThe Service cannot accept control messages at this time”.

Fix: Make sure you restart your site apppool and always remember to do so once you get an error in the PowerShell while installing else you will keep on getting this error or do an ‘iisreset’ (Open cmd and run ) each time you do any changes to fix error.

4

Somehow it has stopped so restarting as shown below have worked.

5

4.TIPS: Below are the databases that are expected to be present in the SQL Server. Make sure the .ps1 file have correct parameter or database name referring as you have in the SQL server.

4.2

5.TIPS: Make sure the ‘Initial Catalog’ or the Database name being referred in the json of SitecoreIdentityServer (C:\intepub\wwwroot\SitecoreIdentityServer\wwwroot) as shown below

4.3

6.Error: If the Publishing takes lot of time and break with the below error “Install-SitecoreConfiguration: Request timed out.

Fix: You need to publish manually and try the step again.

7

7.TIPS: Incase you want to re run the installation script and do not want to go through the successful steps again or want you script to start where it broke or ended because of error then you can edit the Master_SinglrServer.json (\SIF\Configuration\Commerce\Master_SingleServer.json)to remove the tasks completed so that the re-run does not have to execute the completed steps again. For instance, I would remove all the completed tasks before PublishExtensions. 8

8.TIPS: If you do not see any message as below on the PowerShell screen for a long time or the steps do not move further for a long time, then press enter and the PowerShell will get activate. Sometimes during the PowerShell execution the screen hangs but the process were executing in the back so in order to see or find what have happened you need you need to press Enter key after clicking on the PowerShell.

9

    9. Error: Ensure/Sync default content paths for: AdventureWorkAuthoring

Ensure/Sync default content paths for environment AdventureWorksAuthoring failed, please check Engine service logs for more info.

10

Fix: I tried the below steps to verify and fix the error.

  • Make sure the binding in IIS for the Sitecore website(sxp9u2.sc) and sxa, storefront.com with https (443). Note: By default, during Installation these binding should have got added and if they are not then you should add it.
  • Make sure the above urls with http and https in the AllowedOrigins Property of the json for the below files.
    C:\inetpub\wwwroot\CommerceAuthoring_Sc9\wwwroot\ C:\inetpub\wwwroot\CommerceMinions_Sc9\wwwroot\ C:\inetpub\wwwroot\CommerceOps_Sc9\wwwroot\ C:\inetpub\wwwroot\CommerceShops_Sc9\wwwroot\
  • Make sure you have $SiteHostHeaderName= “sxa.storefront.com” in the install ps1(Deploy-Sitecore-Commerce.ps1)
  • Added the ConnectionString in Json (C:\inetpub\wwwroot\SitecoreIdentityServer\wwwroot) with “User Id“, “Password” and removed “Integrated Security“. Make sure the user id have all the required permission on the SQL server database. NoteWith the default ConnectionString my connection to the SQL was not working so I modified it here with the one than works.
  • Modified the app pool Identity to LocalSystemas the default CSFRuntimeUser was not working.
  1. Tips: Create a default SSL site for your Sitecore.

11.1

11.211.3

Initially it was as below11.4And it was updated as below11.5

Make sure you do it for all the config.json inside the four folders as below

11.6

  1. TIPS: Do not keep any folder open while running the PowerShell scripts because the scripts keep on updating and deleting files and folders and if they opened it will break.
  2. ErrorInstall-SitecoreConfiguration: One or more exceptions occurred while processing the subscribers to the ‘packageinstall:items:ended’ event.

13.2

Fix: I tried providing the SQL Server Name in all the configs. Start by searching inside your wwwroot for “Server”: “.” and replace the “.” With the server name as shown below.

The files I found are as below:

\SitecoreIdentityServer\wwwroot\appsettings.json \CommerceShops_Sc9\wwwroot\bootstrap\Global.json \CommerceOps_Sc9\wwwroot\bootstrap\Global.json \CommerceMinions_Sc9\wwwroot\bootstrap\Global.json \CommerceAuthoring_Sc9\wwwroot\bootstrap\Global.json \CommerceShops_Sc9\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json \CommerceShops_Sc9\wwwroot\data\Environments\PlugIn.Habitat.CommerceAuthoring-1.0.0.json \CommerceShops_Sc9\wwwroot\data\Environments\PlugIn.AdventureWorks.CommerceAuthoring-1.0.0.json

Once you have made these changes, please do an ‘iisreset’ before running the script again from PowerShell.

13.1

  1. TIPS: Make sure you have the folders and the zip files as shown below

14.114.2

Solution: https://sitecorecorner.com/tag/ssl/

  1. Fix: To solve the problem, you must remove all non-self-signed certificates from the root store. This PowerShell command will identify non-self-signed certificates:

Get-Childitem cert:\LocalMachine\root -Recurse |     Where-Object {$_.Issuer -ne $_.Subject}

15

  1. TIPS: The certificateThumbprint in the Commerce.Engine.Connect.config (inetpub\wwwroot\sxp9u2.sc\App_Config\include\Y.Commerce.Engine) as shown below replaces the thumbprint for all config.json

16

  1. TIPS: The SSL certificate in IIS for all the commerce created sites(CommerceShops_sc9, CommerceOps_sc9, CommerceMinions_sc9, CommerceAuthoring_sc9) are pointing to Sitecore commerce SSL certificate whereas the config.json point to enigineconnect certificate and json in SitecoreIdentity certificate points to Sitecore commerce SSL certificate and added user id password and removed integrated security in appsettings.json and SQL database have permission Grant for all for particular user type.

17

  1. TIPS: To find the certificate name with the Thumbprint run the command in PowerShell as shown below

Open PowerShell as Admin

cd CERT:\\

Get-ChildItem -Path ‘4C8CFD390BC7AEF30DB888405000062F2F67E214’ -Recurse

18

There are also lot of other troubleshooting blogs that can help you.

https://naveed-ahmad.com/2018/02/25/sitecore-experience-commerce-xc9-troubleshooting-your-installation/

https://hachweb.wordpress.com/2018/05/17/sitecore-xc-pitfalls-while-installation-with-sif-part-2/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s