You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Peter Johnson <Pe...@kp.org> on 2024/05/15 21:37:11 UTC

Zookeeper 3.8.3 FAILED TO START.... but why?

Hello,
Trying this 'send mail to list option' to try and find out why my new Zookeeper 3.8.3 app wouldn't  start, I get:
./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /apps/solr/apache-zookeeper-3.8.3/bin/../conf/zoo.cfg
Starting zookeeper ... FAILED TO START

...and that's all the information there is, so I have nothing to go on.

Bottom-line, I want the bare minimum Zookeeper/Solr installation possible on 1 server (and not really interested in learning too much about it), I just need it as a requirement for OT TeamSite.
With that in mind, I followed these basic steps (which had worked in the past, but maybe there is something new):
Setup Zookeeper

  *   cd apache-zookeeper-3.8.3/conf/
  *   mv zoo_sample.cfg zoo.cfg
  *   edit zoo.cfg to change default data dir to /apps/solr/logs/zookeeper
  *   ...and added line: 4lw.commands.whitelist=mntr,conf,ruok
Setup Solr

  *   Rename solr-8.11.2 directory to solr.
  *   cd solr
  *   mkdir cloud/node1/solr
  *   mkdir cloud/node2/solr
  *   cd to dir with solr.xml
  *   cp -p solr.xml ../../cloud/node1/solr/.
  *   cp -p solr.xml ../../cloud/node2/solr/.

Setup Env Vars

  *   export JAVA_HOME=/usr/lib/jvm/jdk-11.0.19+7
  *   export PATH=$JAVA_HOME/bin:$PATH
  *   export SOLR_JAVA_HOME=/usr/lib/jvm/jdk-11.0.19+7

Start servers in same session as env vars set:
/apps/solr/apache-zookeeper-3.8.3/bin/zkServer.sh start

Can anybody tell me what is missing?

Thanks & Regards
Peter Johnson [c]
System Engineer (TeamSite)
Kaiser Permanente

NOTICE TO RECIPIENT:  If you are not the intended recipient of this e-mail, you are prohibited from sharing, copying, or otherwise using or disclosing its contents.  If you have received this e-mail in error, please notify the sender immediately by reply e-mail and permanently delete this e-mail and any attachments without reading, forwarding or saving them. v.173.295  Thank you.

Re: Zookeeper 3.8.3 FAILED TO START.... but why?

Posted by Shawn Heisey <el...@elyograg.org.INVALID>.
On 5/15/2024 15:37, Peter Johnson wrote:
> Bottom-line, I want the bare minimum Zookeeper/Solr installation possible on 1 server (and not really interested in learning too much about it), I just need it as a requirement for OT TeamSite.
> With that in mind, I followed these basic steps (which had worked in the past, but maybe there is something new):

If you want a very simple SolrCloud install on a single server, I think 
you should run a single node with embedded ZK.

If you're on Linux or another similar OS, I think your best bet is to 
actually install Solr.

in some directory, like your downloads directory, with the tarball:

tar xzf solr-8.11.2.tgz solr-8.11.2/bin/install_solr_service.sh 
--strip-components=2

Then:

sudo bash ./install_solr_service.sh solr-8.11.2.tgz

Then edit /etc/default/solr.in.sh and add:

SOLR_MODE="solrcloud"

You might also want to change the heap size with something like this:

SOLR_HEAP="1g"

The default heap size is 512MB and it doesn't take a very big index for 
that to be too small.

Once you have solr.in.sh the way you want it, restart the Solr service.

sudo service solr restart

If you don't like the data in /var/solr, running under a user named 
solr, and the program in /opt/solr-8.11.2 with a symlink at /opt/solr, 
you can give the install script options to change this.

If you are running it on Windows, then there is no install script.  You 
can edit bin/solr.in.cmd instead of /etc/default/solr.in.sh and you 
would use solr.cmd to start it.

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

My Solr listens on the default port of 8983.  The embedded ZK listen on 
port 1443 for some reason -- the advertised port plus 1000.  I have this 
behind an haproxy install which does listen on 443.  My install is 
version 9.7.0-SNAPSHOT which I compiled myself.  On 8.x you won't need 
SOLR_JETTY_PORT ... but 9.x listens on localhost by default.

Doing it this way, a ZK server will be run in the same JVM as Solr and 
you won't have to worry about it.

Thanks,
Shawn