Apache Solr Exception

201 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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