This one is a summary of my own experience for Sitecore Experience Commerce 9.1 Initial Release (aka Sitecore XC 9.1.0) installation on my machine. I’ve had much experience in the following ones:
- Sitecore XC9 installation
- Sitecore XC9 Update 1 installation
- Sitecore XC9 Update 2 installation
- Sitecore XC9 Update 3 installation
so I decided to go only with:
- Installation Guide – On Premises (Thanks Sitecore team!)
I do hope that this blog post is helpful for your own journey as well.
Setup Prerequisites
Please refer to the Sitecore Experience Commerce 9 Compatibility Table for the software and version prerequisites:
- Windows 10
- Sitecore Experience Platform 9.1 Update 1
- Sitecore Experience Accelerator 1.8.1 (Note: must log into https://dev.sitecore.net/ before downloading)
- Sitecore Powershell Extensions 4.7.2
- .Net Core 2.1 Runtime (v2.1.3)
- Packages for On Premise 2019.04-3.0.163 (Note: must log into https://dev.sitecore.net/ before downloading)
Step-by-step guide
- install the ones below if not yet 😀
- a fresh Sitecore XP 9.1 Update 1 instance , let’s say storefront910.local and storefront910.xconnect.local (xConnect site)
- rebuild the Link databases for the master and core databases if not yet:
- on the Sitecore Launchpad, click Control Panel, and in the Database section, click Rebuild Link Databases
- select the master and core databases and then click Rebuild
- rebuild the search indexes if not yet:
- on the Sitecore Launchpad, click Control Panel, and in the Indexing section, click Indexing manager
- in the Indexing Manager dialog box, click Select all, and then click Rebuild
- ensure that Experience Analytics is working properly
- Note: if there is any error
- option 1: you will have to solve it before installing XC by opening the Sitecore log and then having a look at the error messages (normally, they’re certificate issues)
- option 2: you may want to disable xDB and then fix the error later after installing XC successfully
- (optional) once it’s configured for HTTPS/SSL so we should open \storefront910.identityserver.local\Config\production\Sitecore.IdentityServer.Host.xml and then add a new AllowCorsOriginsGroup to that file like this if not yet
- DON’T FORGET to do IIS reset
- create a new folder D:\sc910_com_install
- download MSBuild Microsoft Visual Studio Web targets (available from Nuget) then extract the Web targets package, copy the \tools\VSToolsPath\Web\Microsoft.Web.XmlTransform.dll file into D:\sc910_com_install
- download Sitecore Experience Accelerator 1.8.1 for Sitecore 9.1.1 (Note: must log into https://dev.sitecore.net/ before downloading) and put it into D:\sc910_com_install
- (optional) download Sitecore Powershell Extensions 4.7.2 then put it into D:\sc910_com_install
- Note: if you go with Sitecore Powershell Extensions 5.0, you will probably see NO default Storefront site in Sitecore
- download and unzip Packages for On Premise 2019.04-3.0.163 (Note: must log into https://dev.sitecore.net/ before downloading) then put it into D:\sc910_com_install
- unzip D:\sc910_com_install\SIF.Sitecore.Commerce.2.0.19 and then rename D:\sc910_com_install\SIF.Sitecore.Commerce.2.0.19 to D:\sc910_com_install\SIF for a better practice
- unzip the D:\sc910_com_install\Sitecore.BizFX.2.0.3.zip
- unzip the D:\sc910_com_install\Sitecore.Commerce.Engine.SDK.3.0.40.zip file then copy the D:\sc910_com_install\Sitecore.Commerce.Engine.SDK.3.0.40\Sitecore.Commerce.Engine.DB.dacpac file into D:\sc910_com_install
- download sc910_com_install.ps1 and put it into D:\sc910_com_install\SIF then open it to correct the following parameters:
- $Prefix
- $ScInstallDirectory
- $SiteHostHeaderName
- $SqlServer
- $SolrUrl
- $SolrRoot
- $SolrService
- (optional) correct the SitecoreUserName and SitecoreUserPassword of your Sitecore XP 9.1.1 instance if you’re using others rather than the default ones
- Note: also, you will have to perform 3.3. Update the deployment package with your custom values for Sitecore username and password (Page 19-20) in Sitecore Commerce 9.1 Initial Release Installation Guide
- (optional) you can specify any local account (note: it will be created automatically if non-existent) to be set up for the various application pools that are created as part of the deployment at line 80-81 of sc910_com_install.ps1
- (optional) open D:\sc910_com_install\SIF\Configuration\Commerce\Connect\Connect_MarketingAutomation.json to correct the name of Marketing Automation Service (the windows service)
- (optional) you may get timeout exceptions so I suggest to edit D:\sc910_com_install\SIF\Modules\SitecoreUtilityTasks\SitecoreUtilityTasks.psm1 in order to increase the execution timeout
- let’s install it
- Note 1: somehow, it will be a blank page instead of default Storefront site’s home page if we create SOLR SXA cores before installing so DO NOT create them
- Note 2: ensure that there is NO custom AllowedCorsOriginsGroup in D:\sc910_com_install\SIF\IdentityServer\Sitecore.Commerce.IdentityServer.Host.xml (they’re added automatically in prior installations)
- launch PowerShell as an administrator
- change directory to D:\sc910_com_install\SIF
- execute .\sc910_com_install
- hopefully there is nothing can stop the installation process now
- open a browser then navigate to https://storefront910.local/, you would see the default page of Sitecore website. That’s because we don’t use the default host name sxa.storefront.com so we need to correct it via Sitecore
- log into https://storefront910.local/sitecore/
- access /sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront
- update Host Name to storefront910.local and Database to master
- (optional) not check the checkbox Cache Html and select Yes for Disable Browser Caching for a better practice
- refresh https://storefront910.local/ and then add some products, you would see something like this
- DO NOT forget to perform Post-Installation Steps
- follow Post-Installation Steps (from Page 22) in Sitecore Commerce 9.1 Initial Release Installation Guide
The recommendation
We can remove the tasks completed from D:\sc910_com_install\SIF\Configuration\Commerce\Master_SingleServer.json and re-do Step 19 if there is something wrong (especially for Note: some known issues below) so that we are able to save a lot of time 😀
How to uninstall it?
- download sc910_com_uninstall.ps1 and put it into D:\sc910_com_install then open it to correct 07 parameters below:
- $ScInstallDirectory
- $Prefix
- $SolrService
- $PathToSolr
- $SqlServer
- $SqlAccount
- $SqlPassword
- launch PowerShell as an administrator
- change directory to D:\sc910_com_install
- execute .\sc910_com_uninstall
- hopefully, it runs well and cleans everything up
Note: some known issues
- Cannot create a file when that file already exists
- my suggestion: ensure that the site bindings are unique (Ex: host name, port)
- The service cannot accept control messages at this time
- my suggestion 1: access IIS, start storefront910.local site and storefront910.local application pool manually (note: you may need to do it several times) if they’re in STOP status, somehow IIS cannot restart those ones after stopping them
- my suggestion 2: have a look at the workaround Start-WebAppPool error when install Sitecore XC 9.1
- The remote server returned an error : (400) Bad Request
- my suggestion: try doing IIS Reset and then perform the current install step again
- No catalog data available + Illegal recursion detected: GetModel
- the layout for the requested document was not found
- log into https://storefront910.local/sitecore/
- access /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/Storefront/Catalog Configuration
- ensure to uncheck the checkbox Use Direct Navigation
Got issues?
Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.
Happy Sitecore Commerce Installation!
Great post! I had a minor issue with password other than ‘b’ in the config file causing issues with sync content items during InitializeCommerceEngineUsingHost. I switched my password back to b and everything worked. Thanks
LikeLiked by 1 person
Thanks for the info. I’m gonna mention about it in this post.
LikeLike
I see that this post mentions the use of Sitecore XP 9.1 u1. Can I use Sitecore commerce 9.1 initial release with Sitecore XP 9.1 initial release? Are there any known compatibility issues?
LikeLike
Yes. They’re incompatible each other. Sitecore XP 9.1 Initial Release is compatible with Sitecore XC 9.0 Update 3.
LikeLike
Thank you! I actually just came across this https://kb.sitecore.net/articles/804595, which seems to indicate that sc 9.1 initial is not compatible with sitecore xc at all. I presume you are aware of this pairing you mentioned though, I will give it a try 🙂
Thank you!
LikeLike
No, my bad. XC 9.0 Update 3 is compatible with XP 9.0 Update 2. Actually, there is no XC version for XP 9.1 Initial Release so we have to upgrade it to 9.1.1. Sorry for my misreading!
LikeLike
Hi Viet,
Really great article. Helped me a lot of troubleshooting the issues after the XC9.1 was installed.
Also, regarding the issue you found “The service cannot accept control messages at this time”, I had written a blog of how to avoid it before run the installation script, please have a look 😉
http://pengqd.net/archive/start-webapppool-error-when-install-sitecore-xc-91/
Again, thank you so much. It saved my time!!
LikeLiked by 1 person
Hi Peng, thanks for your good comment and your nice catch. I’m gonna update my blog post to suggest the workaround for that issue 🙂
LikeLike
Hi Viet,
I am installing sitecore commerce 9.1 but getting error ” The remote server returned an error : (400) Bad Request” i’m restart my IIS again perform again run script but same issue it’s not resolved please suggest me any other ways to resolve the issue ?
[—————————————————————————- GetIdServerToken : GetIdServerToken —————————————————————————-]
Get Token From Sitecore.IdentityServer
VERBOSE: POST https://ssc.identityserver.local/connect/token with -1-byte payload
Install-SitecoreConfiguration : The remote server returned an error: (400) Bad Request.
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.1.0\Public\Install-SitecoreConfiguration.ps1:641 char:25
+ & $entry.Task.Command @paramSet | Out-Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
[TIME] 00:00:04
Install-SitecoreConfiguration : The remote server returned an error: (400) Bad Request.
At D:\sc910_com_install\SIF\sc910_com_install.ps1:95 char:2
+ Install-SitecoreConfiguration @params -Verbose *>&1 | Tee-Object …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
[TIME] 00:46:11
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At D:\deploy\SIF\Modules\InitializeCommerce\InitializeCommerce.psm1:86 char:17
+ … $response = Invoke-RestMethod $UrlIdentityServerGetToken -Method Post …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Thank you!
LikeLike
You should ensure that your Sitecore Identity Server is up and running. If NO, perhaps you installed .Net Core incorrectly (have a look at Identity Server’s log and Event Viewer of Windows)
LikeLike
Hi Viet,
I am installing sitecore commerce 9.1 but getting bellow error, please suggest me
Ensure/Sync default content paths for environment AdventureWorksAuthoring failed, please check Engine service logs for
more info.
Install-SitecoreConfiguration : ScriptHalted
At C:\Program
Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.1.0\Public\Install-SitecoreConfiguration.ps1:641 char:25
+ & $entry.Task.Command @paramSet | Out-Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
[TIME] 00:01:23
Install-SitecoreConfiguration : ScriptHalted
At D:\sc910_com_install\SIF\sc910_com_install.ps1:95 char:2
+ Install-SitecoreConfiguration @params -Verbose *>&1 | Tee-Object …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
[TIME] 00:44:32
ScriptHalted
At D:\sc910_com_install\SIF\Modules\InitializeCommerce\InitializeCommerce.psm1:204 char:19
+ … $(throw Write-Host “Ensure/Sync default content paths for e …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], RuntimeException
+ FullyQualifiedErrorId : ScriptHalted
log error:
00004 18:30:19 ERROR Management.block.getitembypath: Sitecore Item Service Get item failed, Item /sitecore/Commerce/Commerce Control Panel not found.
00004 18:30:19 ERROR CtxMsg.Error.ItemOnPathNotFound: Text=Item on path ‘/sitecore/Commerce/Commerce Control Panel’ was not found.
thank you !
LikeLike
Hello, normally, you should ensure that your database server name is correct in the install script by using double-backslash escape if any, ex: “DESKTOP-XXXXXXX\\SQLServer2017”
LikeLike