[jira] [Commented] (SOLR-7642) Should launching Solr in cloud mode using a ZooKeeper chroot create the chroot znode if it doesn't exist?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (SOLR-7642) Should launching Solr in cloud mode using a ZooKeeper chroot create the chroot znode if it doesn't exist?

JIRA jira@apache.org

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

Shawn Heisey commented on SOLR-7642:

Catching up on email and saw issue updates for this.

bq. So how about we auto-create the chroot only if it == /solr.

I really like this idea.  A chroot of /solr is very unlikely to be a typo, and probably will be what a sizable majority of users will want.  So if that exact text is the chroot and it doesn't exist, we go ahead and create it.  We can discuss whether to make it case-insensitive, so /Solr or /SOLR is also auto-created.  If any other string (like /solr7 or /solrdev) gets used, we can require manual creation, and have a meaningful error in the log.  [~thelabdude] already indicated that the existing error is not ambiguous, but we can probably improve it by telling the user they will have to manually create the chroot.

> 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
>         Attachments: SOLR-7642.patch, SOLR-7642.patch, SOLR-7642_tag_7.5.0.patch
> 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

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]