[ 
https://issues.apache.org/jira/browse/SOLR-7642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14576278#comment-14576278
 ] 

Shawn Heisey commented on SOLR-7642:
------------------------------------

My recommendation to people in places like IRC has been to always use a chroot 
and never use the bootstrap options.  That is incompatible with what you 
mentioned about SOLR-4028.

If a user attempts to start Solr using a zookeeper chroot that doesn't exist, I 
think that one of two things should happen:

 * Automatically create that chroot and proceed with startup.
  ** Multiple simultaneous startups may run into a situation where two (or 
more) instances detect the missing chroot, one of them creates it, and then 
another tries to create it and finds it's already there.  That should be 
handled with no complaint louder than a WARN in the log.
 * Spit out a meaningful error message and fail to start.
 ** The error should be both on stderr and in the logfile.

I think my advice about always using a chroot and never using bootstrap options 
is good advice, and should be in the documentation.

If Solr doesn't create the chroot automatically, I'm OK with that decision, as 
long as the docs clearly explain how to create one.  The error message on 
startup should explain the problem and reference the documentation or maybe 
link to a moinmoin wiki page.


> Should launching Solr in cloud mode using a ZooKeeper chroot create the 
> chroot znode if it doesn't exist?
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-7642
>                 URL: https://issues.apache.org/jira/browse/SOLR-7642
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Timothy Potter
>            Priority: Minor
>
> If you launch Solr for the first time in cloud mode using a ZooKeeper 
> connection string that includes a chroot leads to the following 
> initialization error:
> {code}
> ERROR - 2015-06-05 17:15:50.410; [   ] org.apache.solr.common.SolrException; 
> null:org.apache.solr.common.cloud.ZooKeeperException: A chroot was specified 
> in ZkHost but the znode doesn't exist. localhost:2181/lan
>         at 
> org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:113)
>         at org.apache.solr.core.CoreContainer.load(CoreContainer.java:339)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:140)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:110)
>         at 
> org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
>         at 
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
>         at 
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
>         at 
> org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
>         at 
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
>         at 
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
> {code}
> The work-around for this is to use the scripts/cloud-scripts/zkcli.sh script 
> to create the chroot znode (bootstrap action does this).
> I'm wondering if we shouldn't just create the znode if it doesn't exist? Or 
> is that some violation of using a chroot?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to