Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#69604 - [solr] unable to create core in 8.8.0-1

Attached to Project: Community Packages
Opened by Alan (jazztickets) - Tuesday, 09 February 2021, 21:33 GMT
Last edited by Andreas Radke (AndyRTR) - Wednesday, 21 April 2021, 14:03 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:
There is no way to create a core due to hardcoded paths to readonly directories in the .service file.

To reproduce:
1. Start the solr service
2. Open browser to something like "http://localhost:8983"
3. Click Core Admin, then Add Core
4. Displayed is an error: "Error CREATEing SolrCore 'new_core': Couldn't persist core properties to /usr/share/solr/server/solr/new_core/core.properties : /usr/share/solr/server/solr/new_core: Read-only file system"

This isn't how you create a core however, it just illustrates that the solr.​solr.​home variable is misconfigured.

In the .service file is the line:
ExecStart=/usr/bin/solr start -f -d /usr/share/solr/server -s /usr/share/solr/server/solr -t /var/lib/solr

From the command 'solr start -help':
-s <dir> Sets the solr.solr.home system property; Solr will create core directories under this directory.

It needs to create files under /var/lib/solr, not /usr/share...

The problem with using these flags in the service file is that it overrides any variables in /etc/solr/solr.in.sh, rendering it useless. I think it should be changed to something like:
ExecStart=/usr/bin/solr start -f -d /usr/share/solr/server

But then you'd have to have the package automatically set SOLR_HOME inside /etc/solr/solr.in.sh to "/var/lib/solr", and also copy solr.xml to /var/lib/solr/.


Another problem is with the command line tool. Running the command:
sudo -u solr solr create -c new_core -d /usr/share/solr/server/solr/configsets/_default/

Results in:
Error: Could not find or load main class org.apache.solr.util.SolrCLI
Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.SolrCLI

Currently the only way to create a core file (after fixing the .service file) would be:

sudo -u solr mkdir /var/lib/solr/new_core
sudo -u solr cp -r /usr/share/solr/server/solr/configsets/_default/conf/ /var/lib/solr/new_core/
This task depends upon

Loading...