Apache Lucene open-source search software
SOLR-7693: Fix the bin/solr -e cloud example to work if lsof is not installed
Timothy Potter929cb9544db8
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 899a2ba25c1..5765f20316e 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -159,6 +159,10 @@ Bug Fixes* SOLR-7682: Schema API: add-copy-field should accept the maxChars parameter. (Steve Rowe)+* SOLR-7693: Fix the bin/solr -e cloud example to work if lsof is not installed+ on the local machine by waiting for 10 seconds before starting the second node.+ (hossman, Timothy Potter)+Optimizations----------------------* SOLR-7660: Avoid redundant 'exists' calls made to ZK while fetching cluster state updates. (shalin)diff --git a/solr/bin/solr b/solr/bin/solrindex 64d37951f07..27c50a6010a 100755--- a/solr/bin/solr+++ b/solr/bin/solr@@ -1416,19 +1416,21 @@ function launch_solr() {elseecho -e "Still not seeing Solr listening on $SOLR_PORT after 30 seconds!"tail -30 "$SOLR_LOGS_DIR/solr.log"- exit+ exit # subshell!fielseSOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n"- exit+ exit # subshell!fidone) &spinner $!else+ echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT."+ sleep 10SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n"- exit;+ return;fifi}