Wednesday, January 31, 2018

Sitecore Experience Commerce - SOLR directory cannot be removed

When installing Sitecore Experience Commerce on my local machine, I came across a number of errors, and each time re-ran the install PowerShell script in full. However, this would cause the following error to appear:
TerminatingError(Remove-Item): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Directory C:\solr\server\solr\sc9test_.scCustomersScope\data\index cannot be removed because it is not empty."
Install-SitecoreConfiguration : Directory C:\solr\server\solr\sc9test_.scCustomersScope\data\index cannot be removed
This error is caused when trying to remove a SOLR core which is in use (as the install script removed it before trying to create it). Before re-running the installation script, load up your SOLR admin and unload the three commerce SOLR cores.

SOLR admin - unloading commerce cores
The three cores to unload are:

  1. sc9test_.scCatalogItemsScope
  2. sc9test_.scCustomersScope
  3. sc9test_.scOrdersScope
The sc9test_.sc at the start may change depending on your instance name (set in parameters), it's the second part that will matter. Unloading these three cores, allowed the installation to continue.

No comments:

Post a Comment