'Error in creating indexes in Solr 8.1.1 running on an Azure App Service
We have created a new Sitecore environment with the Azure market place solution "Azure Experience Cloud" Sitecore version 9.3 XM scaled topology with Solr search.
Steps we followed for creating Solr App service:
- Created a blank sitecore 9.3 solution from Azure market place and created a Web app for Solr.
- Unzipped the Solr 8.1.1 package and copied all the contents to
wwwrootfolder of the Web app created for Solr. - Created a new Solr core by creating a new
{index folder}folder and copiedconffrom the/site/wwwroot/server/solr/configsets/_default. - Created a
core.propertiesfile withnumShards=2&name={index folder}.
We get the below error:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Index dir 'C:\home\site\wwwroot\server\solr{index folder}\data\index/' of core '{index folder}' is already locked. The most likely cause is another Solr server (or another solr core in this server) also configured to use this directory; other possible causes may be specific to lockType: native
How can we resolve the above problem?
Solution 1:[1]
This is a known issue with Solr running on an Azure App Service and usually gets resolved by restarting the App Service. Of course, it is not a proper solution, but can work short-term.
Moving forward I would recommend to create a virtual machine in Azure and setup Solr there or, alternatively, look at a SearchStax solution offering a fully managed Solr-as-a-Service.
Also please take a look at a relevant post on Sitecore Stack Exchange.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kate Orlova |
