Apache Solr Exception

Hello I am trying to run Solr on a Tomcat and have an exception like

org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: directory '/var/lib/solr/data/index' does not exist

Maybe anyone has some trouble like I do?

Upvotes: 1

Views: 186

Answers (1)

Bruno dos Santos
Bruno dos Santos

Reputation: 1361

When Solr starts and the index folder doesn't exists Solr create it by itself. To make it possible the folder be created by tomcat user this user need to have permission to create the folder. If the tomcat user doesn't have permission to create the index folder an exception is shown. Try to change the folder permission like this:

sudo chmod a+w /var/lib/solr/ -R

or change the folder owner like this:

sudo chown tomcat7. /var/lib/solr/ -R

Upvotes: 2

Related Questions