Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6653

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

    XMLWordPrintableJSON

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.

      Attachments

        Activity

          People

            thelabdude Timothy Potter
            janhoy Jan H√łydahl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: