2

Installing Sitecore Commerce (Sitecore.Commerce.2018.07-2.2.126) on the server. I am executing the below script Bootstrap-Commerce-Engine.ps1

#Requires -Version 3
param(
)
#Initializes Global Parameters
.\Global-Config
$global:DEPLOYMENT_DIRECTORY=Split-Path $MyInvocation.MyCommand.Path
$modulesPath=( Join-Path -Path $DEPLOYMENT_DIRECTORY -ChildPath "Modules" )
if ($env:PSModulePath -notlike "*$modulesPath*")
{
    $p = $env:PSModulePath + ";" + $modulesPath
    [Environment]::SetEnvironmentVariable("PSModulePath",$p)
}

$params = @{
        Path = Resolve-Path '.\Configuration\Commerce\CommerceEngine\CommerceEngine.Bootstrap.json'
        CommerceOpsServicesPort = "5015"
        CommerceOpsService = $CommerceOpsService
        SitecoreAdminAccount = @{
            userName = $SitecoreUsername
            password = $SitecoreUserPassword
          }
        UrlIdentityServerGetToken = "$($CommerceIdService):5050/connect/token"
    }
Install-SitecoreConfiguration @params -Verbose

getting the error:

[---------------------------------------- GetIdServerToken : GetIdServerToken ----------------------------------------]
Get Token From Sitecore.IdentityServer - Uri: https://tmpqa-id:5050/connect/token Body: System.Collections.Hashtable
VERBOSE: POST https://tmpqa-rb-id:5050/connect/token with -1-byte payload
>> TerminatingError(Invoke-RestMethod): "The remote server returned an error: (500) Internal Server Error."
>> TerminatingError(Invoke-RestMethod): "The remote server returned an error: (500) Internal Server Error."
Install-SitecoreConfiguration : The remote server returned an error: (500) Internal Server Error.
At C:\deploy_xc\Bootstrap-Commerce-Engine.ps1:29 char:1
+ Install-SitecoreConfiguration @params -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
Install-SitecoreConfiguration : The remote server returned an error: (500) Internal Server Error.
At C:\deploy_xc\Bootstrap-Commerce-Engine.ps1:29 char:1
+ Install-SitecoreConfiguration @params -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:00:01
**********************
Windows PowerShell transcript end
End time: 20190813104830
**********************
1
  • 1
    please check logs in identity server and see if there are more details? Commented Aug 13, 2019 at 17:34

1 Answer 1

0

The most probable reason is that you will have multiple SQL server instances running on your machine and the correct value for the Server:"MACHINE-NAME\SQLEXPRESS" has not been passed through the scripts.

Open the following configuration JSON files and update the connection string SQL Server instance name manually to Server:"MACHINE-NAME\SQLEXPRESS":

  1. \SitecoreIdentityServer\wwwroot\appsettings.json
  2. \CommerceShops_Sc9\wwwroot\bootstrap\Global.json
  3. \CommerceOps_Sc9\wwwroot\bootstrap\Global.json
  4. \CommerceMinions_Sc9\wwwroot\bootstrap\Global.json
  5. \CommerceAuthoring_Sc9\wwwroot\bootstrap\Global.json
  6. \CommerceShops_Sc9\wwwroot\data\Environments\Plugin.SQL.PolicySet-1.0.0.json
  7. \CommerceShops_Sc9\wwwroot\data\Environments\PlugIn.Habitat.CommerceAuthoring-1.0.0.json
  8. \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.

If you have already come to this step you may want to update the \Configuration\Commerce\Master_SingleServer.json file by removing the Tasks that have already been installed. For example, you may want to remove the tasks till ImportRootCertificate and run the script again to just initialize commerce and bootstrap your environment.

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.