Re: SPLITSHARD failure right before publishing the new sub-shards
Never mind. I figured it out. It was due to a NPE on the missing updateLog in solrconfig.xml. My solrconfig.xml is from an older Solr release, which doesn't have certain required sections, etc. After adding them to solrconfig.xml per this official doc, everything started to work. It'd be great if null checks were there to produce informative error on SolrCore.java, so as to make it easier to find the root cause. http://wiki.apache.org/solr/SolrCloud#Required_Config Regards, HaiXin On 09/16/2013 06:44 PM, HaiXin Tie wrote: Hi Solr experts, I am using Solr 4.4 with ZK 3.4.5, trying to split "shard1" of a collection named "body". There is only one core on one machine for this collection. When I call SPLITSHARD to split this collection, Solr is able to create two sub-shards, but failed with a NPE in SolrCore.java while publishing the new shards. It seems that either the updateHandler or its updateLog is null, though they work fine in the original shard: SolrCore.java if (cc != null && cc.isZooKeeperAware() && Slice.CONSTRUCTION.equals(cd.getCloudDescriptor().getShardState())) { // set update log to buffer before publishing the core 862: getUpdateHandler().getUpdateLog().bufferUpdates(); cd.getCloudDescriptor().setShardState(null); cd.getCloudDescriptor().setShardRange(null); } Here are the details. Any pointers to aid debugging this issue is greatly appreciated! # curl request/response to split the shard: curl -s "http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=body&shard=shard1"; 5002688org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'body_shard1_0_replica1': Unable to create core: body_shard1_0_replica1 Caused by: nullorg.apache.solr.common.SolrException:org.apache.solr.common.SolrException: SPLTSHARD failed to create subshard leadersSPLTSHARD failed to create subshard leaders500SPLTSHARD failed to create subshard leadersorg.apache.solr.common.SolrException: SPLTSHARD failed to create subshard leaders at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:171) at org.apache.solr.handler.admin.CollectionsHandler.handleSplitShardAction(CollectionsHandler.java:322) at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:136) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:611) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:218) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) 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:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) 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(Thread.java:662) 500 # Full solr log for the split shard call: 384779 [qtp334936
SPLITSHARD failure right before publishing the new sub-shards
Hi Solr experts, I am using Solr 4.4 with ZK 3.4.5, trying to split "shard1" of a collection named "body". There is only one core on one machine for this collection. When I call SPLITSHARD to split this collection, Solr is able to create two sub-shards, but failed with a NPE in SolrCore.java while publishing the new shards. It seems that either the updateHandler or its updateLog is null, though they work fine in the original shard: SolrCore.java if (cc != null && cc.isZooKeeperAware() && Slice.CONSTRUCTION.equals(cd.getCloudDescriptor().getShardState())) { // set update log to buffer before publishing the core 862: getUpdateHandler().getUpdateLog().bufferUpdates(); cd.getCloudDescriptor().setShardState(null); cd.getCloudDescriptor().setShardRange(null); } Here are the details. Any pointers to aid debugging this issue is greatly appreciated! # curl request/response to split the shard: curl -s "http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=body&shard=shard1"; 5002688org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'body_shard1_0_replica1': Unable to create core: body_shard1_0_replica1 Caused by: nullorg.apache.solr.common.SolrException:org.apache.solr.common.SolrException: SPLTSHARD failed to create subshard leadersSPLTSHARD failed to create subshard leaders500SPLTSHARD failed to create subshard leadersorg.apache.solr.common.SolrException: SPLTSHARD failed to create subshard leaders at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:171) at org.apache.solr.handler.admin.CollectionsHandler.handleSplitShardAction(CollectionsHandler.java:322) at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:136) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:611) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:218) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) 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:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) 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(Thread.java:662) 500 # Full solr log for the split shard call: 384779 [qtp334936591-10] INFO org.apache.solr.handler.admin.CollectionsHandler ? Splitting shard : shard=shard1&action=SPLITSHARD&collection=body 384791 [main-EventThread] INFO org.apache.solr.cloud.DistributedQueue ? Watcher fired on path: /overseer/collection-queue-work state: SyncConnected type NodeChildrenChanged 384791 [main-EventThread] INFO org.apache.solr.cloud.DistributedQueue ? Watcher fired on path: /overseer/collection-queue-work state: SyncConnected type NodeChildrenChanged 384797 [main-EventThread] INFO org.apache.solr.cloud.Di