[ 
https://issues.apache.org/jira/browse/SOLR-7693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588617#comment-14588617
 ] 

Raghavan Janakiraman commented on SOLR-7693:
--------------------------------------------

The way I understand the launch_solr function

1. If to be launched in back ground
    1.1.  Launch the java process in nohup
    1.2.  If OS supports lsof (list of open files) function
        1.2.1. Open a sub shell
        1.2.2. Poll the list of open files for the port on which the java 
process is launched till 30 seconds or the port becomes active which ever is 
earlier
        1.2.3. Display the launch message
        1.2.4. Exit sub shell
    1.3. Else // if OS does not support lsof
         1.3.1. Try a grep to get the process id of the java process launched
         1.3.2. Display the launch message
         1.3.3. Eixt // (Actually this should be a return and not exit, as the 
else clause is not launched in a sub shell)
   1.4 End If



> bin/solr start -e cloud -noprompt on a docker container spins only one node 
> instead of two
> ------------------------------------------------------------------------------------------
>
>                 Key: SOLR-7693
>                 URL: https://issues.apache.org/jira/browse/SOLR-7693
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 5.2.1
>         Environment: Boot2Docker, Docker container with Oracle Linux, JDK 8, 
> Solr 5.2.1
>            Reporter: Raghavan Janakiraman
>            Priority: Critical
>
> Extract from the command prompt on starting up solr cloud :
> -------------------------------------------------------------------------------------------
> [appuser@mysolrsandbox ~]$ cd $HOME/softwares/solr-5.2.1
> [appuser@mysolrsandbox solr-5.2.1]$ bin/solr start -e cloud -noprompt -m 1g
> Welcome to the SolrCloud example!
> Starting up 2 Solr nodes for your example SolrCloud cluster.
> Creating Solr home directory 
> /home/appuser/softwares/solr-5.2.1/example/cloud/node1/solr
> Cloning Solr home directory 
> /home/appuser/softwares/solr-5.2.1/example/cloud/node1 into 
> /home/appuser/softwares/solr-5.2.1/example/cloud/node2
> Starting up SolrCloud node1 on port 8983 using command:
> solr start -cloud -s example/cloud/node1/solr -p 8983  -m 1g
> Started Solr server on port 8983 (pid=102). Happy searching!
> [appuser@mysolrsandbox solr-5.2.1]$
> ------------------------------------------------------------------------------------------------
> The second node is not starting up.
> Possible issue :
> File : $SOLR_HOME/bin/solr
> Line number : 1431
> -- The "exit;" command is causing the shell scrip to exit.
> Line 1428 - 1432
>     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;
>     fi
> Work Around :
> Comment line 1431 in the shell script
> Line 1428 - 1432
>     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;
>     fi



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to