You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2014/11/11 17:00:05 UTC
svn commit: r1638195 - /lucene/dev/branches/branch_5x/solr/bin/solr
Author: thelabdude
Date: Tue Nov 11 16:00:05 2014
New Revision: 1638195
URL: http://svn.apache.org/r1638195
Log:
SOLR-6703: double check for conflicting port use before starting (backport fix from trunk)
Modified:
lucene/dev/branches/branch_5x/solr/bin/solr
Modified: lucene/dev/branches/branch_5x/solr/bin/solr
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr?rev=1638195&r1=1638194&r2=1638195&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr Tue Nov 11 16:00:05 2014
@@ -858,6 +858,10 @@ fi
if [[ "$SCRIPT_CMD" == "start" ]]; then
# see if Solr is already running
SOLR_PID=`solr_pid_by_port "$SOLR_PORT"`
+ if [ "$SOLR_PID" == "" ]; then
+ # not found using the pid file ... but use ps to ensure not found
+ SOLR_PID=`ps waux | grep start.jar | grep $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
+ fi
if [ "$SOLR_PID" != "" ]; then
echo -e "\nSolr already running on port $SOLR_PORT (pid: $SOLR_PID)!"
echo -e "Please use the 'restart' command if you want to restart this node.\n"