Jackson
Jackson

Reputation: 6871

Adding Core: Solr Error

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.

Upvotes: 4

Views: 5396

Answers (2)

Vasilii Shpilchin
Vasilii Shpilchin

Reputation: 73

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

Upvotes: 6

root
root

Reputation: 3957

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

Upvotes: 6

Related Questions