Solr
  1. Solr
  2. SOLR-6509

Solr start scripts interactive mode doesn't honor -z argument

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.10
    • Fix Version/s: 4.10.2, 5.0
    • Component/s: scripts and tools
    • Labels:
      None

      Description

      The solr start script ignore -z parameter when combined with -e cloud (interactive cloud mode).

      ./bin/solr -z localhost:2181 -e cloud
      
      Welcome to the SolrCloud example!
      
      
      This interactive session will help you launch a SolrCloud cluster on your local workstation.
      
      To begin, how many Solr nodes would you like to run in your local cluster? (specify 1-4 nodes) [2] 1
      Ok, let's start up 1 Solr nodes for your example SolrCloud cluster.
      
      Please enter the port for node1 [8983] 
      8983
      Cloning /home/shalin/programs/solr-4.10.1/example into /home/shalin/programs/solr-4.10.1/node1
      
      Starting up SolrCloud node1 on port 8983 using command:
      
      solr start -cloud -d node1 -p 8983 
      
      
      Waiting to see Solr listening on port 8983 [-]  
      Started Solr server on port 8983 (pid=27291). Happy searching!
      
      1. SOLR-6509.patch
        3 kB
        Timothy Potter

        Activity

        Hide
        Timothy Potter added a comment -

        Good catch! Although I don't know if this qualifies as a major bug in that solr -e cloud is intended for running the Solr cloud example, which uses the embedded Zk server. I suppose some people might want to point their example SolrCloud instance at an existing ZK but that seems like a very rare case. It's easy enough to add support for this to the script though

        Show
        Timothy Potter added a comment - Good catch! Although I don't know if this qualifies as a major bug in that solr -e cloud is intended for running the Solr cloud example, which uses the embedded Zk server. I suppose some people might want to point their example SolrCloud instance at an existing ZK but that seems like a very rare case. It's easy enough to add support for this to the script though
        Hide
        Hoss Man added a comment -

        Although I don't know if this qualifies as a major bug in that solr -e cloud is intended for running the Solr cloud example

        my suggestion, to help re-iterate that "-e is for example" would be to make it fail with an error if you try to combine it with other params that are definitely not a good idea when running examples.

        that said: i'm not convinced that "-z" is one of those options ... i think we should definitely move towards encouraging people to recognize and realize that in a "real" solr setup they should run an external zookeeper quarum, and the best way to teach them that is to show documented examples of running zk as an external process.

        (in fact: now that we have scripts ... we should stop supporting embedded zk completely, and just have the script spin up a single external zk process in any situation where it would currently tell solr to do an embedded zk server ... but that's a tangent that should probably be considered in a distinct issue)

        Show
        Hoss Man added a comment - Although I don't know if this qualifies as a major bug in that solr -e cloud is intended for running the Solr cloud example my suggestion, to help re-iterate that "-e is for example" would be to make it fail with an error if you try to combine it with other params that are definitely not a good idea when running examples. that said: i'm not convinced that "-z" is one of those options ... i think we should definitely move towards encouraging people to recognize and realize that in a "real" solr setup they should run an external zookeeper quarum, and the best way to teach them that is to show documented examples of running zk as an external process. (in fact: now that we have scripts ... we should stop supporting embedded zk completely, and just have the script spin up a single external zk process in any situation where it would currently tell solr to do an embedded zk server ... but that's a tangent that should probably be considered in a distinct issue)
        Hide
        Shalin Shekhar Mangar added a comment -

        that said: i'm not convinced that "-z" is one of those options ... i think we should definitely move towards encouraging people to recognize and realize that in a "real" solr setup they should run an external zookeeper quarum, and the best way to teach them that is to show documented examples of running zk as an external process.

        +1

        We encourage people to use external ZK in any real setting. Our startup scripts should also support that scenario.

        (in fact: now that we have scripts ... we should stop supporting embedded zk completely, and just have the script spin up a single external zk process in any situation where it would currently tell solr to do an embedded zk server ... but that's a tangent that should probably be considered in a distinct issue)

        +1 again

        Show
        Shalin Shekhar Mangar added a comment - that said: i'm not convinced that "-z" is one of those options ... i think we should definitely move towards encouraging people to recognize and realize that in a "real" solr setup they should run an external zookeeper quarum, and the best way to teach them that is to show documented examples of running zk as an external process. +1 We encourage people to use external ZK in any real setting. Our startup scripts should also support that scenario. (in fact: now that we have scripts ... we should stop supporting embedded zk completely, and just have the script spin up a single external zk process in any situation where it would currently tell solr to do an embedded zk server ... but that's a tangent that should probably be considered in a distinct issue) +1 again
        Hide
        Timothy Potter added a comment -

        The start script now honors the -z argument when launching the interactive SolrCloud example, such as:

        bin/solr -e cloud -z localhost:2181
        

        This will run the interactive example as before, but instead of launching the embedded ZooKeeper instance, it will start each node with -z localhost:2181 to connect to an external ZK instance.

        Show
        Timothy Potter added a comment - The start script now honors the -z argument when launching the interactive SolrCloud example, such as: bin/solr -e cloud -z localhost:2181 This will run the interactive example as before, but instead of launching the embedded ZooKeeper instance, it will start each node with -z localhost:2181 to connect to an external ZK instance.
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6509: Solr start scripts interactive mode doesn't honor -z argument

        Show
        ASF subversion and git services added a comment - Commit 1626847 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1626847 ] SOLR-6509 : Solr start scripts interactive mode doesn't honor -z argument
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6509: Solr start scripts interactive mode doesn't honor -z argument

        Show
        ASF subversion and git services added a comment - Commit 1626849 from Timothy Potter in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1626849 ] SOLR-6509 : Solr start scripts interactive mode doesn't honor -z argument
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6509, SOLR-6486, SOLR-6549, SOLR-6529: backport recent fixes / improvements to the bin/solr scripts for inclusion in 4.10.2 release.

        Show
        ASF subversion and git services added a comment - Commit 1631528 from Timothy Potter in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1631528 ] SOLR-6509 , SOLR-6486 , SOLR-6549 , SOLR-6529 : backport recent fixes / improvements to the bin/solr scripts for inclusion in 4.10.2 release.

          People

          • Assignee:
            Timothy Potter
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development