SXC 9 Update 2 installation error: Ensure/Sync default content paths for environment AdventureWorksAuthoring failed

The error Logs are as below
[--------------------------- EnsureSyncDefaultContentPaths : EnsureSyncDefaultContentPaths ---------------------------]
Ensure/Sync default content paths for: AdventureWorksAuthoring
Checking if localhost:5005/.../CheckCommandStatus(taskId=2655) has completed ...
Ensure/Sync default content paths for environment AdventureWorksAuthoring failed, please check Engine service logs for
ore info.
Install-SitecoreConfiguration : ScriptHalted
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\Public\Install-SitecoreConfiguration.ps1:253
char:21
+ & $entry.Task.Command @paramSet | Out-Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

 

The service logs in C:\inetpub\wwwroot\CommerceShops_Sc9\wwwroot\logs :

ERROR CtxMsg.Error.ContentPathAlreadyExists: Text=Content path '/sitecore/Commerce/Commerce Control Panel' already exists.

  • If you are installing sitecore commerce for the first time on the sitecore instance, this issue will less likely to happen.This issue happens mostly in the scenario where the installation is halted for any other errors occurred and run a re installation of the sitecore commerce.

    To fix this issue here is what i needed to do

    Added https binding to the sitecore instance i am running the commerce installation.(https://local.sitecore902 for example).
    Remove all the sitecore commerce related folders in sitecore.
    Delete all the sitecore related web sites(Ops,Minions,Shops,Aiuthoring,Bizfx and identity server)
    remove the databases installed in previous installation( SitecoreCommerce9_Global and SitecoreCommerce9_SharedEnvironments)
    Remove all the solr cores of sitecore commerce(CustomersScope,CatalogItemsScope,OrdersScope)
    Delete the certificates(local.storefront)
    Rerun the sitecore commerce installation now.It should go through.