Solr
  1. Solr
  2. SOLR-6653

bin/solr start script should return error code >0 when something fails

    Details

      Description

      In order to be able to include bin/solr in scripts, it should be possible to test the return value for success or failure. Examples:

      jan:solr janhoy$ bin/solr start
      Waiting to see Solr listening on port 8983 [/]  
      Started Solr server on port 8983 (pid=47354). Happy searching!
      
      jan:solr janhoy$ echo $?
      0
      jan:solr janhoy$ bin/solr start
      
      Solr already running on port 8983 (pid: 47354)!
      Please use the 'restart' command if you want to restart this node.
      
      jan:solr janhoy$ echo $?
      0
      

      The last command should return status 1

      jan:solr janhoy$ bin/solr stop -p 1234
      No process found for Solr node running on port 1234
      jan:solr janhoy$ echo $?
      0
      

      Same here. Probably other places too.

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1642952 from Timothy Potter in branch 'dev/trunk'
        [ https://svn.apache.org/r1642952 ]

        SOLR-6653: should return error code >0 when something fails

        Show
        ASF subversion and git services added a comment - Commit 1642952 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1642952 ] SOLR-6653 : should return error code >0 when something fails
        Hide
        ASF subversion and git services added a comment -

        Commit 1642953 from Timothy Potter in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1642953 ]

        SOLR-6653: should return error code >0 when something fails

        Show
        ASF subversion and git services added a comment - Commit 1642953 from Timothy Potter in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1642953 ] SOLR-6653 : should return error code >0 when something fails
        Hide
        ASF subversion and git services added a comment -

        Commit 1642967 from Timothy Potter in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1642967 ]

        SOLR-6653: should return error code >0 when something fails

        Show
        ASF subversion and git services added a comment - Commit 1642967 from Timothy Potter in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1642967 ] SOLR-6653 : should return error code >0 when something fails
        Hide
        Timothy Potter added a comment -

        Yonik Seeley I fixed the issue you mentioned in SOLR-4792 as part of this work. Now you can do:

        cp -rp server s1
        cd s1
        ../bin/solr start -e techproducts -d .
        
        Show
        Timothy Potter added a comment - Yonik Seeley I fixed the issue you mentioned in SOLR-4792 as part of this work. Now you can do: cp -rp server s1 cd s1 ../bin/solr start -e techproducts -d .
        Hide
        Timothy Potter added a comment -

        oops! one of the changes I added for this broke restart ability

        Show
        Timothy Potter added a comment - oops! one of the changes I added for this broke restart ability
        Hide
        ASF subversion and git services added a comment -

        Commit 1643317 from Timothy Potter in branch 'dev/trunk'
        [ https://svn.apache.org/r1643317 ]

        SOLR-6653: don't exit with error code if restarting

        Show
        ASF subversion and git services added a comment - Commit 1643317 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1643317 ] SOLR-6653 : don't exit with error code if restarting
        Hide
        ASF subversion and git services added a comment -

        Commit 1643318 from Timothy Potter in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1643318 ]

        SOLR-6653: don't exit with error code if restarting

        Show
        ASF subversion and git services added a comment - Commit 1643318 from Timothy Potter in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1643318 ] SOLR-6653 : don't exit with error code if restarting
        Hide
        ASF subversion and git services added a comment -

        Commit 1643328 from Timothy Potter in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1643328 ]

        SOLR-6653: don't exit with error code if restarting

        Show
        ASF subversion and git services added a comment - Commit 1643328 from Timothy Potter in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1643328 ] SOLR-6653 : don't exit with error code if restarting
        Hide
        Timothy Potter added a comment -

        now the script checks to see if stop was requested before exiting so that restart works even if there is no process currently running.

        Show
        Timothy Potter added a comment - now the script checks to see if stop was requested before exiting so that restart works even if there is no process currently running.
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Timothy Potter
            Reporter:
            Jan Høydahl
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development