SOLR-7693: Fix the bin/solr -e cloud example to work if lsof is not installed

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1686113 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy Potter 2015-06-17 21:27:10 +00:00
parent 4b16875058
commit 929cb9544d
2 changed files with 9 additions and 3 deletions

View File

@ -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)

View File

@ -1416,19 +1416,21 @@ function launch_solr() {
else
echo -e "Still not seeing Solr listening on $SOLR_PORT after 30 seconds!"
tail -30 "$SOLR_LOGS_DIR/solr.log"
exit
exit # subshell!
fi
else
SOLR_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!
fi
done) &
spinner $!
else
echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT."
sleep 10
SOLR_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;
fi
fi
}