You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ishan Chattopadhyaya (JIRA)" <ji...@apache.org> on 2016/11/28 17:23:59 UTC

[jira] [Commented] (SOLR-4922) When i create a SolrCore by CoreAdmin ,a SolrException has occur

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

Ishan Chattopadhyaya commented on SOLR-4922:
--------------------------------------------

It seems your shardId here is empty here (can you confirm?). I couldn't reproduce it when my shardIds were shard1, shard2.
I will test separately to see if I can somehow create a collection with empty shard names (but that deserves a separate issue). However, the code for the ElectionContext seems correct here. My feeling is that we should close this as a "cannot reproduce" until we can verify that you saw this issue in spite of having proper shardIds for your collection.

> When i create a SolrCore by CoreAdmin ,a SolrException has occur
> ----------------------------------------------------------------
>
>                 Key: SOLR-4922
>                 URL: https://issues.apache.org/jira/browse/SOLR-4922
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.3
>         Environment: Windows7 Home Basic ,jdk1.6.0_45
>            Reporter: zengjie
>              Labels: LeaderElector, PathUtils, SolrCloud
>             Fix For: 4.3
>
>
> Full stack is over here:
> 1714364 [qtp29239443-20] ERROR org.apache.solr.core.SolrCore  – org.apache.solr.common.SolrException: Error CREATEing SolrCore 'pconline_cms':
>         at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:524)
>         at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:144)
>         at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
>         at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:608)
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:206)
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>         at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
>         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
>         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>         at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>         at org.eclipse.jetty.server.Server.handle(Server.java:365)
>         at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
>         at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
>         at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
>         at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
>         at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
>         at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>         at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
>         at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: org.apache.solr.common.cloud.ZooKeeperException:
>         at org.apache.solr.core.CoreContainer.registerInZk(CoreContainer.java:853)
>         at org.apache.solr.core.CoreContainer.registerCore(CoreContainer.java:814)
>         at org.apache.solr.core.CoreContainer.register(CoreContainer.java:869)
>         at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:520)
>         ... 30 more
> Caused by: java.lang.IllegalArgumentException: Invalid path string "/collections/pconline_cms/leader_elect//election" caused by empty node name specified @39
>         at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:99)
>         at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1020)
>         at org.apache.solr.common.cloud.SolrZkClient$4.execute(SolrZkClient.java:201)
>         at org.apache.solr.common.cloud.SolrZkClient$4.execute(SolrZkClient.java:198)
>         at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:65)
>         at org.apache.solr.common.cloud.SolrZkClient.exists(SolrZkClient.java:198)
>         at org.apache.solr.common.cloud.ZkCmdExecutor.ensureExists(ZkCmdExecutor.java:92)
>         at org.apache.solr.common.cloud.ZkCmdExecutor.ensureExists(ZkCmdExecutor.java:86)
>         at org.apache.solr.cloud.LeaderElector.setup(LeaderElector.java:278)
>         at org.apache.solr.cloud.ZkController.joinElection(ZkController.java:934)
>         at org.apache.solr.cloud.ZkController.register(ZkController.java:757)
>         at org.apache.solr.cloud.ZkController.register(ZkController.java:723)
>         at org.apache.solr.core.CoreContainer.registerInZk(CoreContainer.java:830)
>         ... 33 more
> then ,I check the source code,I found the the base class  of ShardLeaderElectionContext 
> do this:ZkStateReader.COLLECTIONS_ZKNODE + "/" + collection + "/leader_elect/",it create a leader_elect Zookeeper path,but throught method #setu# of class #LeaderElector# line 276, follow code are executed #String electZKPath = context.electionPath + LeaderElector.ELECTION_NODE;# ,then we have a path like this "/collections/pconline_cms/leader_elect//election"  



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

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