Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      I've always found that starting Solr with java -jar start.jar is a little odd if you are not a java guy, but I think there are bigger pros than looking less odd in shipping some start scripts.

      Not only do you get a cleaner start command:
      sh solr.sh or solr.bat or something
      But you also can do a couple other little nice things:

      • it becomes fairly obvious for a new casual user to see how to start the system without reading doc.
      • you can make the working dir the location of the script - this lets you call the start script from another dir and still have all the relative dir setup work.
      • have an out of the box place to save startup params like -Xmx.
      • we could have multiple start scripts - say solr-dev.sh that logged to the console and default to sys default for RAM - and also solr-prod which was fully configured for logging, pegged Xms and Xmx at some larger value (1GB?) etc.

      You would still of course be able to make the java cmd directly - and that is probably what you would do when it's time to run as a service - but these could be good starter scripts to get people on the right track and improve the initial user experience.

      1. SOLR-3617.patch
        20 kB
        Timothy Potter
      2. SOLR-3617.patch
        59 kB
        Timothy Potter
      3. SOLR-3617.patch
        47 kB
        Timothy Potter
      4. SOLR-3617.patch
        41 kB
        Timothy Potter
      5. SOLR-3617.patch
        22 kB
        Timothy Potter

        Issue Links

          Activity

          Hide
          Mark Miller added a comment -

          Thoughts?

          Show
          Mark Miller added a comment - Thoughts?
          Hide
          Robert Muir added a comment -

          Somewhat related: it might be worth adding /etc/init.d-type start/stop/etc scripts, at least
          one that works for Linux. I'm sure people have these already themselves or are writing their own.

          Show
          Robert Muir added a comment - Somewhat related: it might be worth adding /etc/init.d-type start/stop/etc scripts, at least one that works for Linux. I'm sure people have these already themselves or are writing their own.
          Hide
          Uwe Schindler added a comment -

          As fan of Ubuntu, please also add a upstart config (/etc/init/solr.conf), thats much easier to write than stupid shell script with the well known start|stop|... switch

          Show
          Uwe Schindler added a comment - As fan of Ubuntu, please also add a upstart config (/etc/init/solr.conf), thats much easier to write than stupid shell script with the well known start|stop|... switch
          Hide
          Mark Miller added a comment -

          So I guess some things to consider here...where do we put the scripts?

          In example? In example bin?

          If we just have one start.sh/start.bat scripts and one stop.sh/stop.bat script, just example seems good to me. But if we wanted to have start-dev and start-prod or something, perhaps bin is better due to the number?

          example/start.sh is very clear to me - but I'd like to have one fully configured for logging and what not, and the other more dev friendly (log to console).

          (one thing I forgot to mention is that this allows us to have a nice preconfigured stop scripts as well.

          Show
          Mark Miller added a comment - So I guess some things to consider here...where do we put the scripts? In example? In example bin? If we just have one start.sh/start.bat scripts and one stop.sh/stop.bat script, just example seems good to me. But if we wanted to have start-dev and start-prod or something, perhaps bin is better due to the number? example/start.sh is very clear to me - but I'd like to have one fully configured for logging and what not, and the other more dev friendly (log to console). (one thing I forgot to mention is that this allows us to have a nice preconfigured stop scripts as well.
          Hide
          Mark Miller added a comment -

          As fan of Ubuntu, please also add a upstart config (/etc/init/solr.conf)

          +1 - I think we should ship with examples for this type of thing as well.

          Show
          Mark Miller added a comment - As fan of Ubuntu, please also add a upstart config (/etc/init/solr.conf) +1 - I think we should ship with examples for this type of thing as well.
          Hide
          Timothy Potter added a comment -

          Here's a rough cut of a *nix start/stop script. I'm posting early to get some feedback before going too far down this path if it's not what we want.

          First, I think the start/stop script should go hand-in-hand / complement any work done on SOLR-3619 and SOLR-3259, which is why I chose to put the script in the $SOLR_TIP/bin vs. example/bin (where SOLR_TIP is the root directory where Solr is installed). One of the nice ideas in SOLR-3619 is to have a "server" directory for production environments and use the example dir only for running examples.

          You can do: solr -help or solr <command> -help, such as solr start -help to see usage.

          Here's an overview of some of the features in this script, which I'll demonstrate by showing example usages:

          solr Prints usage and exits

          solr -f Starts the example server in the foreground; alternatively, we could support a -b option to background the server if we want foreground to be the default behavior.

          solr -i Looks for running Solr servers and prints information about any that are found. Right now, the script is doing a GET to the /admin/system/info handler, which is too verbose so we need a synopsis option (I'll open another ticket)

          solr -p 8984 Starts Solr in the background bound to port 8984

          solr -cloud or solr -c Starts Solr in "solrcloud" mode in the background on port 8983; since a zkHost is not provided, this will also set the -DzkRun option to start the embedded ZooKeeper on port 9983. Or you could pass -z to set the zkHost param.

          solr -e <example>, such as solr -e dih Starts the specified example server such as the DIH example server

          solr -f -c -p 8985 -m 1g Would start Solr in solrcloud mode in the foreground bound to port 8985 with max heap set to 1 gig (i.e. -Xms1g -Xmx1g)

          I think you get the idea ... here's the full usage for the start command:

          Usage: solr start [-f] [-c] [-h hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example]
          
            -f            Start Solr in foreground; default starts Solr in the background
                            and sends stdout / stderr to solr-PORT-console.log
          
            -c            Start Solr in SolrCloud mode; if -z not supplied, an embedded ZooKeeper
                            instance is started; -cloud or --cloud are synonyms for -c
          
            -h <host>     Specify the hostname for this Solr instance
          
            -p <port>     Specify the port to start the Solr HTTP listener on; default is 8983
          
            -d <dir>      Specify the Solr server directory; defaults to example
          
            -z <zkHost>   ZooKeeper connection string; only used when running in SolrCloud mode using -c
          
            -m <memory>   Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g
                            results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m
          
            -e <example>  Name of the example to run; available examples:
                cloud:         SolrCloud example
                default:       Solr default example
                dih:           Data Import Handler
                schemaless:    Schema-less example
                multicore:     Multicore
          

          The stop behavior is pretty basic, but it does try to stop the Jetty server gracefully before issuing kill commands using the Jetty stop key / port.

          Notice that I'm not supporting a restart command yet but that's easy to add if we don't like the current behavior of stopping a running server first before starting, i.e. in the current impl, if you do: solr start && solr start (just for illustration purposes), the second start invocation will stop the server and then start it back up. Alternatively, we could easily have the script check if a server is already running and complain, thus forcing the user to stop first or issue a "restart".

          I've also included support for sourcing env variables from an include file named solr.in.sh (similar to how Cassandra's start script works). The idea here is that for production environments, users will likely want to keep common settings like Java memory options and zkHost in an include file and then only use command-line options to set machine specific values, such as the host (-h). The script searches common paths for the include file.

          I'm still sorting out how to support the multiple nodes for the SolrCloud example. Currently, the script will start both nodes and index the documents as shown in the ref guide, but there's more that could be done with this example. For now, to run the cloud example, do:

          solr -e cloud

          which sets up the node1 and node2 directories, starts the servers on ports 8983 and 7574 respectively, and then indexes the docs in mem.xml and monitor2.xml

          There are also some other goodies in here which may or may not cause some folks heartburn. For instance, I find it really helpful to enable the RMI options to allow you to attach a tool like VisualVM to the JVM hosting Solr. It's enabled by default here but can be disabled by setting ENABLE_REMOTE_JMX_OPTS="false"

          Also, I've built-in Shawn H's famous GC tuning options for Solr, which I've found to be good for many Solr workflows. In general, I think the start script should take as much of the thinking out of running Solr as possible, which includes baking in best practices.

          So far I've only tested this on Mac and RedHat but should work on other flavors of Linux.

          Show
          Timothy Potter added a comment - Here's a rough cut of a *nix start/stop script. I'm posting early to get some feedback before going too far down this path if it's not what we want. First, I think the start/stop script should go hand-in-hand / complement any work done on SOLR-3619 and SOLR-3259 , which is why I chose to put the script in the $SOLR_TIP/bin vs. example/bin (where SOLR_TIP is the root directory where Solr is installed). One of the nice ideas in SOLR-3619 is to have a "server" directory for production environments and use the example dir only for running examples. You can do: solr -help or solr <command> -help , such as solr start -help to see usage. Here's an overview of some of the features in this script, which I'll demonstrate by showing example usages: solr Prints usage and exits solr -f Starts the example server in the foreground; alternatively, we could support a -b option to background the server if we want foreground to be the default behavior. solr -i Looks for running Solr servers and prints information about any that are found. Right now, the script is doing a GET to the /admin/system/info handler, which is too verbose so we need a synopsis option (I'll open another ticket) solr -p 8984 Starts Solr in the background bound to port 8984 solr -cloud or solr -c Starts Solr in "solrcloud" mode in the background on port 8983; since a zkHost is not provided, this will also set the -DzkRun option to start the embedded ZooKeeper on port 9983. Or you could pass -z to set the zkHost param. solr -e <example> , such as solr -e dih Starts the specified example server such as the DIH example server solr -f -c -p 8985 -m 1g Would start Solr in solrcloud mode in the foreground bound to port 8985 with max heap set to 1 gig (i.e. -Xms1g -Xmx1g) I think you get the idea ... here's the full usage for the start command: Usage: solr start [-f] [-c] [-h hostname] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] -f Start Solr in foreground; default starts Solr in the background and sends stdout / stderr to solr-PORT-console.log -c Start Solr in SolrCloud mode; if -z not supplied, an embedded ZooKeeper instance is started; -cloud or --cloud are synonyms for -c -h <host> Specify the hostname for this Solr instance -p <port> Specify the port to start the Solr HTTP listener on; default is 8983 -d <dir> Specify the Solr server directory; defaults to example -z <zkHost> ZooKeeper connection string; only used when running in SolrCloud mode using -c -m <memory> Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m -e <example> Name of the example to run; available examples: cloud: SolrCloud example default: Solr default example dih: Data Import Handler schemaless: Schema-less example multicore: Multicore The stop behavior is pretty basic, but it does try to stop the Jetty server gracefully before issuing kill commands using the Jetty stop key / port. Notice that I'm not supporting a restart command yet but that's easy to add if we don't like the current behavior of stopping a running server first before starting, i.e. in the current impl, if you do: solr start && solr start (just for illustration purposes), the second start invocation will stop the server and then start it back up. Alternatively, we could easily have the script check if a server is already running and complain, thus forcing the user to stop first or issue a "restart". I've also included support for sourcing env variables from an include file named solr.in.sh (similar to how Cassandra's start script works). The idea here is that for production environments, users will likely want to keep common settings like Java memory options and zkHost in an include file and then only use command-line options to set machine specific values, such as the host (-h). The script searches common paths for the include file. I'm still sorting out how to support the multiple nodes for the SolrCloud example. Currently, the script will start both nodes and index the documents as shown in the ref guide, but there's more that could be done with this example. For now, to run the cloud example, do: solr -e cloud which sets up the node1 and node2 directories, starts the servers on ports 8983 and 7574 respectively, and then indexes the docs in mem.xml and monitor2.xml There are also some other goodies in here which may or may not cause some folks heartburn. For instance, I find it really helpful to enable the RMI options to allow you to attach a tool like VisualVM to the JVM hosting Solr. It's enabled by default here but can be disabled by setting ENABLE_REMOTE_JMX_OPTS="false" Also, I've built-in Shawn H's famous GC tuning options for Solr, which I've found to be good for many Solr workflows. In general, I think the start script should take as much of the thinking out of running Solr as possible, which includes baking in best practices. So far I've only tested this on Mac and RedHat but should work on other flavors of Linux.
          Hide
          Timothy Potter added a comment -

          Created SOLR-6233 for adding a parameter to the system admin info handler to get an overview of a server.

          Show
          Timothy Potter added a comment - Created SOLR-6233 for adding a parameter to the system admin info handler to get an overview of a server.
          Hide
          Mark Miller added a comment -

          +1, nice!

          Just read over your comments so far, but it all sounds great to me.

          Show
          Mark Miller added a comment - +1, nice! Just read over your comments so far, but it all sounds great to me.
          Hide
          Varun Thacker added a comment -

          Also, I've built-in Shawn H's famous GC tuning options for Solr, which I've found to be good for many Solr workflows. In general, I think the start script should take as much of the thinking out of running Solr as possible, which includes baking in best practices.

          +1 for baking in the best practices.

          Should we have warnings for say - too less file handles, using a buggy java version etc?

          In one of Marks earlier comments he had mentioned that we could have a start-dev and a start-prod. These warnings would make sense in the start-prod script. Not sure if it's a good idea to have them if we have only one start script.

          Show
          Varun Thacker added a comment - Also, I've built-in Shawn H's famous GC tuning options for Solr, which I've found to be good for many Solr workflows. In general, I think the start script should take as much of the thinking out of running Solr as possible, which includes baking in best practices. +1 for baking in the best practices. Should we have warnings for say - too less file handles, using a buggy java version etc? In one of Marks earlier comments he had mentioned that we could have a start-dev and a start-prod. These warnings would make sense in the start-prod script. Not sure if it's a good idea to have them if we have only one start script.
          Hide
          Timothy Potter added a comment -

          Hi Varun,

          Thanks for the feedback. Good idea about checking Java version but it's tough to know how many file handles is sufficient.

          Also, I'm favoring one script to rule them all Although I'm willing to be convinced of the start-dev / start-prod, I like bin/solr because it's simple and intuitive. In addition:

          1) One script to maintain / document; well two actually scripts (one for *nix and other for Windows)
          2) I'm turning off prod options when you enable an example using the -e flag
          3) There's going to be a lot of overlap in the logic between the two scripts anyway

          I'm cooking up the Windows version today and have some updates to the *nix one, the main one being a "restart" option as described above as I convinced myself while writing the initial comment above that restart is a more standard approach. Another patch coming soon ...

          Show
          Timothy Potter added a comment - Hi Varun, Thanks for the feedback. Good idea about checking Java version but it's tough to know how many file handles is sufficient. Also, I'm favoring one script to rule them all Although I'm willing to be convinced of the start-dev / start-prod, I like bin/solr because it's simple and intuitive. In addition: 1) One script to maintain / document; well two actually scripts (one for *nix and other for Windows) 2) I'm turning off prod options when you enable an example using the -e flag 3) There's going to be a lot of overlap in the logic between the two scripts anyway I'm cooking up the Windows version today and have some updates to the *nix one, the main one being a "restart" option as described above as I convinced myself while writing the initial comment above that restart is a more standard approach. Another patch coming soon ...
          Hide
          Mark Miller added a comment -

          Yeah, a flag for a more friendly dev mode is just as good as another script.

          Show
          Mark Miller added a comment - Yeah, a flag for a more friendly dev mode is just as good as another script.
          Hide
          Timothy Potter added a comment -

          Here's an updated patch with the following:

          1) bin/solr.cmd

          For our Windows users I did my best to emulate the behavior of the Linux script (bin/solr). The main difference between the Windows version and the Linux version is that I don't know how to implement the stop all in the .cmd version, so currently, the user needs to do: solr stop -p PORT. In the Linux, if you don't pass the port, it stops all running Solrs, which may be too heavy handed anyway so easiest might be to fix the Linux version to require the port too.

          In general, I'm not a Windows user so there may be some things in this implementation that can be done cleaner / easier. Happy to have suggestions on how to improve it.

          2) Added a restart mode, which stops and starts the Solr server again. Thus, if you re-issue start when a server is running, it complains vs. stop / start as it did before.

          Lastly, I'm still sorting out how to implement the cloud example. Specifically, I'm wondering if we should walk the user through using prompts and reading from stdin, that way it's a little more interactive, something like:

          $ cd solr-5.0.0/bin
          $ ./solr -e cloud

          Welcome to the SolrCloud example!

          Please enter the number of local nodes you would like to run? [2] <-- default
          2

          Ok, let's start up 2 Solr nodes for your example SolrCloud cluster.

          Enter the port for node1: [8983]
          8983

          Enter the port for node2: [7574]
          7574

          Oops! It looks like there is already something running on port 7574, please choose another port: [7575]
          7575

          Ok, starting node1 on port 8983 with embedded ZooKeeper listening on localhost:9983

          Now starting node2 on port 7575

          Success! Found 2 active nodes in your cluster.

          Do you want to create a new collection? Y/n
          Y

          Collection name? [collection1]
          collection1

          How many shards? [2]
          2

          How many replicas per shard? [1]
          1

          Ok, collection1 created successfully, do you want to index some documents? Y/n
          Y

          Path to file to index: [example/exampledocs/mem.xml]
          <path>

          ...

          We could also just support a -q flag to indicate "quiet" mode and just accept all defaults from the interactive session. And of course -V will activate a verbose mode that probably shows more of the commands being run during the interactive session.

          Show
          Timothy Potter added a comment - Here's an updated patch with the following: 1) bin/solr.cmd For our Windows users I did my best to emulate the behavior of the Linux script (bin/solr). The main difference between the Windows version and the Linux version is that I don't know how to implement the stop all in the .cmd version, so currently, the user needs to do: solr stop -p PORT. In the Linux, if you don't pass the port, it stops all running Solrs, which may be too heavy handed anyway so easiest might be to fix the Linux version to require the port too. In general, I'm not a Windows user so there may be some things in this implementation that can be done cleaner / easier. Happy to have suggestions on how to improve it. 2) Added a restart mode, which stops and starts the Solr server again. Thus, if you re-issue start when a server is running, it complains vs. stop / start as it did before. Lastly, I'm still sorting out how to implement the cloud example. Specifically, I'm wondering if we should walk the user through using prompts and reading from stdin, that way it's a little more interactive, something like: $ cd solr-5.0.0/bin $ ./solr -e cloud Welcome to the SolrCloud example! Please enter the number of local nodes you would like to run? [2] <-- default 2 Ok, let's start up 2 Solr nodes for your example SolrCloud cluster. Enter the port for node1: [8983] 8983 Enter the port for node2: [7574] 7574 Oops! It looks like there is already something running on port 7574, please choose another port: [7575] 7575 Ok, starting node1 on port 8983 with embedded ZooKeeper listening on localhost:9983 Now starting node2 on port 7575 Success! Found 2 active nodes in your cluster. Do you want to create a new collection? Y/n Y Collection name? [collection1] collection1 How many shards? [2] 2 How many replicas per shard? [1] 1 Ok, collection1 created successfully, do you want to index some documents? Y/n Y Path to file to index: [example/exampledocs/mem.xml] <path> ... We could also just support a -q flag to indicate "quiet" mode and just accept all defaults from the interactive session. And of course -V will activate a verbose mode that probably shows more of the commands being run during the interactive session.
          Hide
          Timothy Potter added a comment -

          Previous patch was hosed ... here's a good one.

          Show
          Timothy Potter added a comment - Previous patch was hosed ... here's a good one.
          Hide
          Timothy Potter added a comment -

          Updated patch with changes to complement the patch I'm posting for SOLR-3619. Specifically, there are two improvements to the bin/solr script in this patch:

          1) Interactive session with user to start the SolrCloud example. I think this approach is good for a couple of reasons:

          a. no weird command-line settings like bootstrap_conf ...
          b. interactive session uses the same commands that a user should use to deploy a configuration directory (zkcli) and create a collection; what's more is the script shows the commands it is running so the user gets an example of how to do this again.

          I'm thinking of adding a -q (quiet) flag to skip all the prompts and just accept defaults, but for now, here's what the interactive session looks like:

          [~/dev/lw/projects/solr_trunk_co/solr]$ bin/solr -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? (1-4) [2] 
          Ok, let's start up 2 Solr nodes for your example SolrCloud cluster.
          Please enter the port for node1 [8983] 
          8983
          Please enter the port for node2 [7574] 
          7574
          Cloning Solr server directory into /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node1
          Cloning Solr server directory into /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node2
          
          Starting up SolrCloud node1 on port 8983 using command:
          
          
          solr start -c -d /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node1 -p 8983 
          
          
          Waiting to see Solr listening on port 8983 [/]  
          Started Solr server on port 8983 (pid=55965). Happy searching!
          
              
          
          Starting node2 on port 7574 using command:
          
          
          solr start -c -d /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node2 -p 7574 -z localhost:9983 
          
          
          Waiting to see Solr listening on port 7574 [/]  
          Started Solr server on port 7574 (pid=56050). Happy searching!
          
              
          Now let's create a new collection for indexing documents in your 2-node cluster.
          
          Please provide a name for your new collection: [gettingstarted] 
          gettingstarted
          How many shards would you like to split gettingstarted into? [2] 
          2
          How many replicas per shard would you like to create? [2] 
          2
          Deploying default Solr configuration files to embedded ZooKeeper using command:
          
          
          /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd upconfig -confdir /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/example/example-schemaless/solr/collection1/conf -confname schemaless
          
          INFO  - 2014-07-29 12:56:28.201; org.apache.zookeeper.Environment; Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
          _... Whole bunch more log messages here ..._
          INFO  - 2014-07-29 12:56:33.659; org.apache.zookeeper.ClientCnxn$EventThread; EventThread shut down
          
          
          Creating new collection gettingstarted with 2 shards and replication factor 2 using Collections API command:
          
          http://localhost:8983/solr/admin/collections?action=CREATE&name=gettingstarted&replicationFactor=2&numShards=2&collection.configName=schemaless&maxShardsPerNode=2&wt=json&indent=2
          
          For more information about the Collections API, please see: https://cwiki.apache.org/confluence/display/solr/Collections+API
          
          {
            "responseHeader":{
              "status":0,
              "QTime":6045},
            "success":{
              "":{
                "responseHeader":{
                  "status":0,
                  "QTime":3735},
                "core":"gettingstarted_shard2_replica1"},
              "":{
                "responseHeader":{
                  "status":0,
                  "QTime":3850},
                "core":"gettingstarted_shard1_replica1"},
              "":{
                "responseHeader":{
                  "status":0,
                  "QTime":4091},
                "core":"gettingstarted_shard1_replica2"},
              "":{
                "responseHeader":{
                  "status":0,
                  "QTime":4093},
                "core":"gettingstarted_shard2_replica2"}}}
          
          
          SolrCloud example running, please visit http://localhost:8983/solr 
          

          2) Works with the server directory instead of example (based on work being done for SOLR-3619)

          Show
          Timothy Potter added a comment - Updated patch with changes to complement the patch I'm posting for SOLR-3619 . Specifically, there are two improvements to the bin/solr script in this patch: 1) Interactive session with user to start the SolrCloud example. I think this approach is good for a couple of reasons: a. no weird command-line settings like bootstrap_conf ... b. interactive session uses the same commands that a user should use to deploy a configuration directory (zkcli) and create a collection; what's more is the script shows the commands it is running so the user gets an example of how to do this again. I'm thinking of adding a -q (quiet) flag to skip all the prompts and just accept defaults, but for now, here's what the interactive session looks like: [~/dev/lw/projects/solr_trunk_co/solr]$ bin/solr -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? (1-4) [2] Ok, let's start up 2 Solr nodes for your example SolrCloud cluster. Please enter the port for node1 [8983] 8983 Please enter the port for node2 [7574] 7574 Cloning Solr server directory into /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node1 Cloning Solr server directory into /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node2 Starting up SolrCloud node1 on port 8983 using command: solr start -c -d /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node1 -p 8983 Waiting to see Solr listening on port 8983 [/] Started Solr server on port 8983 (pid=55965). Happy searching! Starting node2 on port 7574 using command: solr start -c -d /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/node2 -p 7574 -z localhost:9983 Waiting to see Solr listening on port 7574 [/] Started Solr server on port 7574 (pid=56050). Happy searching! Now let's create a new collection for indexing documents in your 2-node cluster. Please provide a name for your new collection: [gettingstarted] gettingstarted How many shards would you like to split gettingstarted into? [2] 2 How many replicas per shard would you like to create? [2] 2 Deploying default Solr configuration files to embedded ZooKeeper using command: /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd upconfig -confdir /Users/thelabdude/dev/lw/projects/solr_trunk_co/solr/example/example-schemaless/solr/collection1/conf -confname schemaless INFO - 2014-07-29 12:56:28.201; org.apache.zookeeper.Environment; Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT _... Whole bunch more log messages here ..._ INFO - 2014-07-29 12:56:33.659; org.apache.zookeeper.ClientCnxn$EventThread; EventThread shut down Creating new collection gettingstarted with 2 shards and replication factor 2 using Collections API command: http: //localhost:8983/solr/admin/collections?action=CREATE&name=gettingstarted&replicationFactor=2&numShards=2&collection.configName=schemaless&maxShardsPerNode=2&wt=json&indent=2 For more information about the Collections API, please see: https: //cwiki.apache.org/confluence/display/solr/Collections+API { "responseHeader" :{ "status" :0, "QTime" :6045}, "success" :{ "":{ "responseHeader" :{ "status" :0, "QTime" :3735}, "core" : "gettingstarted_shard2_replica1" }, "":{ "responseHeader" :{ "status" :0, "QTime" :3850}, "core" : "gettingstarted_shard1_replica1" }, "":{ "responseHeader" :{ "status" :0, "QTime" :4091}, "core" : "gettingstarted_shard1_replica2" }, "":{ "responseHeader" :{ "status" :0, "QTime" :4093}, "core" : "gettingstarted_shard2_replica2" }}} SolrCloud example running, please visit http: //localhost:8983/solr 2) Works with the server directory instead of example (based on work being done for SOLR-3619 )
          Hide
          Timothy Potter added a comment -

          I should have mentioned, the interactive session for launching the SolrCloud example has not been implemented for Windows yet (in bin/solr.cmd). I do intend to do that, but wanted to get some feedback on what is there now for *nix. Also, I still need to test the bin/solr script with Cygwin (as many may do that instead of using bin/solr.cmd) and test whether bin/solr.cmd supports launching Solr from a directory containing spaces.

          Show
          Timothy Potter added a comment - I should have mentioned, the interactive session for launching the SolrCloud example has not been implemented for Windows yet (in bin/solr.cmd). I do intend to do that, but wanted to get some feedback on what is there now for *nix. Also, I still need to test the bin/solr script with Cygwin (as many may do that instead of using bin/solr.cmd) and test whether bin/solr.cmd supports launching Solr from a directory containing spaces.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-3617: start/stop script with support for running examples

          Show
          ASF subversion and git services added a comment - Commit 1616271 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1616271 ] SOLR-3617 : start/stop script with support for running examples
          Hide
          Timothy Potter added a comment -

          I've committed this on trunk. Notable improvements from this last patch include:

          • Interactive session to launch SolrCloud example for Windows
          • bin/solr -i calls the SolrCLI class (SOLR-6233) to get basic information about a running server
          • bin/solr healthcheck -collection foo runs some basic health checks against a collection (cloud mode only)
          • Support for legacy (branch_4x layout) and soon-to-be server layout (SOLR-3619)
          • Windows script works when Solr is installed in a directory containing a space
          • Hardening of *nix and Windows scripts

          I'm hoping to back-port these to branch_4x soon so they can be included in the 4.10 release.

          Show
          Timothy Potter added a comment - I've committed this on trunk. Notable improvements from this last patch include: Interactive session to launch SolrCloud example for Windows bin/solr -i calls the SolrCLI class ( SOLR-6233 ) to get basic information about a running server bin/solr healthcheck -collection foo runs some basic health checks against a collection (cloud mode only) Support for legacy (branch_4x layout) and soon-to-be server layout ( SOLR-3619 ) Windows script works when Solr is installed in a directory containing a space Hardening of *nix and Windows scripts I'm hoping to back-port these to branch_4x soon so they can be included in the 4.10 release.
          Hide
          Timothy Potter added a comment -

          Here's an updated patch. Hoping to backport this to 4x (for inclusion in 4.10) unless anyone has any major concerns over the approach. This patch includes some minor bug fixes found by our QA team and some hardening of command-line parsing. Also improved the interactive SolrCloud example session to prompt the user for a configuration name, either default or schemaless.

          Show
          Timothy Potter added a comment - Here's an updated patch. Hoping to backport this to 4x (for inclusion in 4.10) unless anyone has any major concerns over the approach. This patch includes some minor bug fixes found by our QA team and some hardening of command-line parsing. Also improved the interactive SolrCloud example session to prompt the user for a configuration name, either default or schemaless.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-3617: hardening command-line parsing and a few minor bug fixes found by QA testing.

          Show
          ASF subversion and git services added a comment - Commit 1619025 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1619025 ] SOLR-3617 : hardening command-line parsing and a few minor bug fixes found by QA testing.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-3617: clean-up a few error messages and update changes to add to 4.10 release

          Show
          ASF subversion and git services added a comment - Commit 1619461 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1619461 ] SOLR-3617 : clean-up a few error messages and update changes to add to 4.10 release
          Hide
          ASF subversion and git services added a comment -

          Commit 1619480 from Timothy Potter in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1619480 ]

          SOLR-3617: add bin/solr and bin/solr.cmd scripts for starting, stopping, and running examples.

          Show
          ASF subversion and git services added a comment - Commit 1619480 from Timothy Potter in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1619480 ] SOLR-3617 : add bin/solr and bin/solr.cmd scripts for starting, stopping, and running examples.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-3617: backport bin/solr scripts into the 4.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1619490 from Timothy Potter in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1619490 ] SOLR-3617 : backport bin/solr scripts into the 4.10 branch
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-3617: minor issue if the user selects a port that is in use for the cloud example.

          Show
          ASF subversion and git services added a comment - Commit 1619591 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1619591 ] SOLR-3617 : minor issue if the user selects a port that is in use for the cloud example.
          Hide
          ASF subversion and git services added a comment -

          Commit 1619592 from Timothy Potter in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1619592 ]

          SOLR-3617: minor issue if the user selects a port that is in use for the cloud example.

          Show
          ASF subversion and git services added a comment - Commit 1619592 from Timothy Potter in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1619592 ] SOLR-3617 : minor issue if the user selects a port that is in use for the cloud example.
          Hide
          ASF subversion and git services added a comment -

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

          SOLR-3617: minor issue if the user selects a port that is in use for the cloud example.

          Show
          ASF subversion and git services added a comment - Commit 1619594 from Timothy Potter in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1619594 ] SOLR-3617 : minor issue if the user selects a port that is in use for the cloud example.

            People

            • Assignee:
              Timothy Potter
              Reporter:
              Mark Miller
            • Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development