0

In trying to install Sitecore Commerce for the first time I am stuck on the InitializeCommerceEngineUsingHost task. From the log file:

[------------------------------------ BootStrapCommerceServices : BootStrapCommerceServices ------------------------------------]
Resolving ConfigFunction extension 'concat'
Resolved 'Invoke-ConcatConfigFunction'
Resolving ConfigFunction extension 'concat'
Resolved 'Invoke-ConcatConfigFunction'
Invoke-ConcatConfigFunction
Concatenating: sc911ec.qa /commerceops/Bootstrap()
Result: sc911ec.qa/commerceops/Bootstrap()
Invoke-ConcatConfigFunction
Concatenating: https://commerceshops. sc911ec.qa/commerceops/Bootstrap()
Result: https://commerceshops.sc911ec.qa/commerceops/Bootstrap()
BootStrapping Commerce Services: https://commerceshops.sc911ec.qa/commerceops/Bootstrap()
PUT https://commerceshops.sc911ec.qa/commerceops/Bootstrap() with 0-byte payload
Install-SitecoreConfiguration :                                      IIS 502.5 Error                       HTTP Error 502.5 - 
Process Failure                           Common causes of this issue:               The application process failed to start      
          The application process started but then stopped                The application process started but failed to listen on 
the configured port                                     Troubleshooting steps:                Check the system event log for 
error messages                Enable logging the application process' stdout messages                Attach a debugger to the 
application process and inspect                For more information visit:                
https://go.microsoft.com/fwlink/?LinkID=808681                                  
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:02:01
Install-SitecoreConfiguration :                                      IIS 502.5 Error                       HTTP Error 502.5 - 
Process Failure                           Common causes of this issue:               The application process failed to start      
          The application process started but then stopped                The application process started but failed to listen on 
the configured port                                     Troubleshooting steps:                Check the system event log for 
error messages                Enable logging the application process' stdout messages                Attach a debugger to the 
application process and inspect                For more information visit:                
https://go.microsoft.com/fwlink/?LinkID=808681                                  
At C:\resourcefiles\ecomm\SIF.Sitecore.Commerce.2.0.19\Deploy-Sitecore-Commerce-JP.ps1:88 char:2
+     Install-SitecoreConfiguration @params -Verbose *>&1 | Tee-Object  ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

I have not previously installed any other version of Commerce as some other posts suggest could cause an issue.

Looking at the event log I can see a message saying

Application 'MACHINE/WEBROOT/APPHOST/COMMERCESHOPS_SC911EC' with physical root 'c:\inetpub\wwwroot\CommerceShops_Sc911ec\' created process with commandline 'c:\inetpub\wwwroot\CommerceShops_Sc911ec\Sitecore.Commerce.Engine.exe ' but failed to listen on the given port '8231'

Each failed attempt mentions a different port number.

I am following the Sitecore_XC-9.1 Installation Guide, so I'm guessing something is maybe misconfigured but there is nothing obvious in my Deploy script to fix.

Two settings I'm not completely sure of are:

CommerceServicesPostfix                     = "Sc911ec"
CommerceServicesHostPostfix                 = "sc911ec.qa"

What should these correlate to?

I can see these in IIS against my CommerceShops_sc911ec site that was created.

enter image description here

Update: Thanks to Vipin I can see it relates to the https binding

enter image description here

Edit: I found another post that mentions maybe needing to update connection strings in a bunch of files - and found some sql references to machine name which I changed to localhost\sql2016.

Now I just get 500 internal server error so I'm not sure if I've made it better or worse and have no idea where to check for the detailed error message.

The files I changed were:

...\CommerceShops_Sc9\wwwroot\config.json
...\CommerceShops_Sc9\wwwroot\bootstrap\global.json (2 sql parts!)
...\CommerceShops_Sc9\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json

and configurations in CommerceAuthoring, CommerceMinions, CommerceOps

Install log now has:

[------------------------------------ BootStrapCommerceServices : BootStrapCommerceServices ------------------------------------]
Resolving ConfigFunction extension 'concat'
Resolved 'Invoke-ConcatConfigFunction'
Resolving ConfigFunction extension 'concat'
Resolved 'Invoke-ConcatConfigFunction'
Invoke-ConcatConfigFunction
Concatenating: sc911ec.qa /commerceops/Bootstrap()
Result: sc911ec.qa/commerceops/Bootstrap()
Invoke-ConcatConfigFunction
Concatenating: https://commerceshops. sc911ec.qa/commerceops/Bootstrap()
Result: https://commerceshops.sc911ec.qa/commerceops/Bootstrap()
BootStrapping Commerce Services: https://commerceshops.sc911ec.qa/commerceops/Bootstrap()
PUT https://commerceshops.sc911ec.qa/commerceops/Bootstrap() with 0-byte payload
Install-SitecoreConfiguration : The remote server returned an error: (500) Internal Server Error.
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:02
Install-SitecoreConfiguration : The remote server returned an error: (500) Internal Server Error.
At C:\resourcefiles\ecomm\SIF.Sitecore.Commerce.2.0.19\Deploy-Sitecore-Commerce-JP.ps1:88 char:2
+     Install-SitecoreConfiguration @params -Verbose *>&1 | Tee-Object  ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
  • CommerceServicesHostPostfix setting is used to create host names. What is in the website bindings, can you see a https binding with hostname "commerceshops.sc911ec.qa"? – Vipin Banka Aug 2 at 6:19
  • @VipinBanka ah thanks - yes I do – Jen Aug 2 at 6:41
  • can you open this url in a browser "commerceshops.sc911ec.qa/commerceops/$metadata" and see metadata? you can also check logs in your shops service wwwroot/logs folder. – Vipin Banka Aug 2 at 6:50
  • @VipinBanka I'm getting ERROR FailedToDeserialize.Error: Message=Bad JSON escape sequence: \s. Path 'Policies.$values[1].Server', line 1, position 1513.|Trace= at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote). If I try searching for that path - I only find it in the log file. – Jen Aug 4 at 22:55
  • i think the Server value you have given in json files is not correct. it should contain double slashes (\), your server value should look like "{your-machine}\\{SQL Instance}}". – Vipin Banka Aug 5 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.