Solr
  1. Solr
  2. SOLR-7018

"bin/solr status" error after calling "bin/solr stop" against a cluster started using "bin/solr -e cloud"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Start a cluster using bin/solr -e cloud -noprompt.

      Run bin/solr stop. This will only stop one of the two nodes, using the default port 8983. (This in itself is a problem.)

      Run bin/solr status. Previously I thought that this process hung because it took a while to return, but just now I tried it again and got this:

      $ bin/solr status
      
      Found 1 Solr nodes: 
      
      Solr process 88680 running on port 7574
      Failed to get system information from http://localhost:7574/solr/ due to: org.apache.solr.client.solrj.SolrServerException: KeeperErrorCode = ConnectionLoss for /overseer/collection-queue-work/qn-
      	at org.apache.solr.util.SolrCLI.getJson(SolrCLI.java:513)
      	at org.apache.solr.util.SolrCLI.getJson(SolrCLI.java:456)
      	at org.apache.solr.util.SolrCLI$StatusTool.getCloudStatus(SolrCLI.java:697)
      	at org.apache.solr.util.SolrCLI$StatusTool.reportStatus(SolrCLI.java:680)
      	at org.apache.solr.util.SolrCLI$StatusTool.runTool(SolrCLI.java:638)
      	at org.apache.solr.util.SolrCLI.main(SolrCLI.java:203)
      
      1. SOLR-7018.patch
        2 kB
        Timothy Potter

        Activity

        Hide
        Timothy Potter added a comment -

        This should be considered a blocker for 5.0 - it's a trivial fix btw - since it can cause confusion and issues with bin/solr status ... cooking up a patch now.

        Show
        Timothy Potter added a comment - This should be considered a blocker for 5.0 - it's a trivial fix btw - since it can cause confusion and issues with bin/solr status ... cooking up a patch now.
        Hide
        Timothy Potter added a comment -

        Here's a patch that addresses this issue using the following logic:

        1) If there is only 1 Solr node running, then bin/solr stop will stop it.

        2) If there is more than 1 node running, then bin/solr stop will generate an error message and the script will exit 1

        While a bit nuanced, I think being able to just do "stop" when running 1 node is a nice thing to have.

        Show
        Timothy Potter added a comment - Here's a patch that addresses this issue using the following logic: 1) If there is only 1 Solr node running, then bin/solr stop will stop it. 2) If there is more than 1 node running, then bin/solr stop will generate an error message and the script will exit 1 While a bit nuanced, I think being able to just do "stop" when running 1 node is a nice thing to have.
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-7018: bin/solr stop should stop if there is only one node running or generate an error message prompting the user to be explicit about which of multiple nodes to stop using the -p or -all options

        Show
        ASF subversion and git services added a comment - Commit 1654015 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1654015 ] SOLR-7018 : bin/solr stop should stop if there is only one node running or generate an error message prompting the user to be explicit about which of multiple nodes to stop using the -p or -all options
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-7018: bin/solr stop should stop if there is only one node running or generate an error message prompting the user to be explicit about which of multiple nodes to stop using the -p or -all options

        Show
        ASF subversion and git services added a comment - Commit 1654016 from Timothy Potter in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1654016 ] SOLR-7018 : bin/solr stop should stop if there is only one node running or generate an error message prompting the user to be explicit about which of multiple nodes to stop using the -p or -all options
        Hide
        ASF subversion and git services added a comment -

        Commit 1654019 from Timothy Potter in branch 'dev/branches/lucene_solr_5_0'
        [ https://svn.apache.org/r1654019 ]

        SOLR-7018: bin/solr stop should stop if there is only one node running or generate an error message prompting the user to be explicit about which of multiple nodes to stop using the -p or -all options

        Show
        ASF subversion and git services added a comment - Commit 1654019 from Timothy Potter in branch 'dev/branches/lucene_solr_5_0' [ https://svn.apache.org/r1654019 ] SOLR-7018 : bin/solr stop should stop if there is only one node running or generate an error message prompting the user to be explicit about which of multiple nodes to stop using the -p or -all options
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

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

        I think for people new to solr it may helpful to note why that behavior occurs (i.e. stopping one node breaks the cluster). And the reason is that `bin/solr -e cloud` uses an embedded zookeeper. Killing one node takes down zookeeper and hence the solr cluster stop responding...right?

        Show
        Oliver Bates added a comment - I think for people new to solr it may helpful to note why that behavior occurs (i.e. stopping one node breaks the cluster). And the reason is that `bin/solr -e cloud` uses an embedded zookeeper. Killing one node takes down zookeeper and hence the solr cluster stop responding...right?

          People

          • Assignee:
            Timothy Potter
            Reporter:
            Steve Rowe
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development