Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Core: Solr Error

Tags:

linux

solr

When I attempt to run the following command to add a core, I get an error.

sudo ./solr create -c myapp -s 2 -rf 2 -force

I get this error message:

ERROR: Error CREATEing SolrCore 'myapp': Couldn't persist core properties to /var/solr/data/myapp/core.properties : /var/solr/data/myapp/core.properties

Any insight on how to solve this would be greatly appreciated.

like image 331
Jackson Avatar asked Sep 03 '25 03:09

Jackson


2 Answers

Try removing the sudo and run it with normal user. There might be a problem when trying to do create with escalated privileges.

Did you install solr using root or with an unprivileged user.

Also is there a specific reason you are trying to run this as root ? It is not advisable to run or install anything using root privileges.

Check this jira also to get some more info:Check this jira for more details

https://issues.apache.org/jira/browse/SOLR-7826

like image 108
root Avatar answered Sep 06 '25 00:09

root


Stop the Solr service. Switch to the solr user:

su solr

If there's no password for the user, set up the password

sudo passwd solr

As you switched to the solr user, start Solr

/opt/solr/bin/init.d/solr start

Then, create the core

/opt/solr/bin/solr create -c myapp
like image 29
Vasilii Shpilchin Avatar answered Sep 05 '25 23:09

Vasilii Shpilchin