On Tuesday, February 8, 2022 at 7:23:55 PM UTC+3 Mark H. Wood wrote:
> Well, Ubuntu Focal has Solr in its package repository, but it's a
> decade old, so Ubuntu is one of the distro.s on which you need to do
> the installation manually. That means you'll need to create a user to
> run it, very like Gentoo which I use.
>
> I called that user 'solr'. I unpacked the Solr v8 files in
> /opt/solr-8, created /var/solr-8 to hold the configuration and cores,
> created /etc/solr-8 to hold the solr.in.sh and log4j2.xml, created
> /var/log/solr-8 to hold the logs, and edited solr.in.sh to set
> LOG4J_PROPS, SOLR_PID_DIR, SOLR_HOME, and SOLR_LOGS_DIR
> appropriately. I set the /var/lib/solr-8 directory and contents to be
> owned by 'solr'. I created an initscript (Ubuntu will need a "system
> unit" or some such) to start /opt/solr-8/bin/solr as user 'solr'
> running in ${SOLR_HOME}, with SOLR_INCLUDE set to
> '/etc/solr-8/solr.in.sh' and passing options '-p 8983 -s
> ${SOLR_HOME}'. Much of this is what one does for any daemon that
> isn't in the package manager.
>
> At that point Solr should start and run, with no cores. I created a
> directory ${SOLR_HOME}/ds7 and copied the DSpace 7 empty cores to
> there, setting them owned by 'solr'. (You can put the cores directly
> into ${SOLR_HOME} but I like to keep related cores organized this
> way.)
I see why you doing it manually. Gentoo is not included as one of the
supported OS's ( Debian, RedHat, The late CentOS, SuSE and Darwin are the
supported ones ). By using the bundled installation script it will do just
all of that. In Ubuntu it will create the Solr folders in accordance with
the default Ubuntu filesystem hierarchy and will sets the main Solr
environment variables as it seen below where the cores by default can be
placed/copied into $SOLR_HOME or $SOLR_HOME/configsets ... Solr and the
Dspace 4 cores installation are perfectly fine. I think the issue is with
the solr-reindex-statistics script it's still referencing the statistics
core in it's original location and that's should explain why I had to add
that location as an allowed path to satisfy Solr (
https://solr.apache.org/guide/8_11/format-of-solr-xml.html. ). I'm totally
new to dspace ( Three months ). I was surprised seeing your comment that
Dspace services by design can be isolated and the communication between the
services should happen over the network and they do not need direct
access to each others' files.
# /etc/default/solr.in.sh
SOLR_PID_DIR="/var/solr"
SOLR_HOME="/var/solr/data"
LOG4J_PROPS="/var/solr/log4j2.xml"
SOLR_LOGS_DIR="/var/solr/logs"
SOLR_PORT="8983"
#SOLR_OPTS="$SOLR_OPTS
-Dsolr.allowPaths=/opt/dspace/solr/statistics,/opt/dspace/temp/solr-data"
With reference to the dspace-tech discussion linked above: I don't
> know where Solr is getting that path '/dspace/solr/statistics'. We
> would need to see how Solr is configured at that site. Assuming that
> DSpace is installed at '/dspace', then '/dspace/solr/*' should have
> been copied into ${SOLR_HOME} and the copies set owned by the user
> that runs Solr. The copies in '/dspace' are just templates, and are
> not referenced by DSpace or Solr in use.
It's not specific to how Solr installed on Chris server. It can be easily
replicated on any Linux distro by excluding [dspace]/solr/statistics from
Solr Allowed paths and running [dspace]/bin/dspace solr-reindex-statistics
( I confirm this issue still exist in Dspace 7.2 ).
--
All messages to this mailing list should adhere to the Code of Conduct:
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/b825df9e-7c67-458a-82d6-f834b9b212b3n%40googlegroups.com.