Thanks Dima and Shawn for your response.
*Dima: *
* We did consider going with Docker initially but we settled on going
with installing from scratch seeing that we are now testing it out.
* We have a few servers, we are just trying to this first set up for
now with one site and see how it goes. So far everything is going well.
o We saw great speed increases searches.
* I will look at the advantages/disadvantages of running it as in
Docker vs standalone.
* I'm not even using Solr Cloud or ZookerKeeper, tbh. Just standalone
and one node.
o I'm completely new to this.
*Shawn:*
* /var/solr was exactly the problem. The parent folder was owned by
solr:solr but I saw subfolders especially in data was owned by
root:root.
* I did are `chown -R solr:solr` on the parent folder and then tried
`service solr start`.
* It then successfully started. Thanks.
* I see your set up. I wish I had that knowledge but I got miles to
go, especially now that have to set up SSL.
Lee
On 2024-05-28 13:45, Shawn Heisey wrote:
On 5/27/24 13:43, Lee Daniel wrote:
I'm on Centos 7.5.
Can't find it in:
* /usr/lib/systemd/system
* /usr/sbin/
I found it in
* /etc/init.d/
I know for sure when I initially installed I was able to use:
* service solr start/stop/restart
* systemctl start/stop/restart solr.service
The install script does not create a systemd service. It creates an
init script, so /etc/init.d is where it will live. Then systemd can
control the service because it has a sysvinit compatibility layer.
TWe are planning to change that to native systemd at some point in the
future.
If at any point you ran Solr as root, chances are that some of the
data files in the data directory (which defaults to /var/solr but can
be changed) are probably now owned by root which can cause Solr to
fail to start.
You can change the settings (like which port Solr runs on) by editing
the include file, defaulting to /etc/default/solr.in.sh, where 'solr'
is the name of the service.
This is the contents of my /etc/default/solr.in.sh file:
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_HEAP="768m"
GC_TUNE=" \
-XX:+UnlockExperimentalVMOptions \
-XX:+UseZGC \
-XX:+ParallelRefProcEnabled \
-XX:+ExplicitGCInvokesConcurrent \
-XX:+AlwaysPreTouch \
-XX:+UseNUMA \
"
SOLR_SECURITY_MANAGER_ENABLED=false
SOLR_JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
SOLR_JAVA_STACK_SIZE="-Xss1m"
SOLR_ULIMIT_CHECKS=false
SOLR_GZIP_ENABLED=true
SOLR_JETTY_HOST=0.0.0.0
SOLR_MODE="solrcloud"
SOLR_MODULES="analysis-extras"
SOLR_HOST=solr.elyograg.org
SOLR_PORT_ADVERTISE=443
ENABLE_REMOTE_JMX_OPTS=true
RMI_PORT=18983
The first few lines were created by the install script, and I modified
it from there.
Running Solr as root is only a requirement if you try to bind to a
port number below 1024. I would recommend not running Solr on such a
port.
I run my Solr behind haproxy. Solr is on port 8983 without TLS, and
this port is not accessible via the Internet. The haproxy config only
lets a very small number of public IP addresses talk to solr on 443.
Solr is running on an AWS instance.
Thanks,
Shawn