gpt4 book ai didi

solr - 在 SolrCloud 中创建集合失败

转载 作者:行者123 更新时间:2023-12-02 23:01:01 29 4
gpt4 key购买 nike

我正在尝试在 solrcloud 中创建一个位于 hadoop 集群之上的集合。我们有三个节点 zk ensemble,选择 hdfs 来存储数据/索引。

我浏览了可用的文档,并在集群上的 4 个数据节点上启动了 solr (solr 4.10.2)。

java -DzkHost=zk1:2181,zk2:2181,zk3:2181 -Dsolr.directoryFactory=HdfsDirectoryFactory -Dsolr.lock.type=hdfs -Dsolr.hdfs.home=hdfs://nn:8020/solr -Dsolr.hdfs.confdir=/etc/hadoop/conf -jar "$SOLR_HOME"/example/start.jar >> "$SOLR_HOME"/logs/solr.out 2>&1 &

现在,solrCloud 文档说我们需要按顺序运行以下步骤。

升级配置

"$SOLR_HOME"/example/scripts/cloud-scripts/zkcli.sh -cmd upconfig -zkhost zk1:2181,zk:2181,zk3:2181 -confdir "$SOLR_HOME"/example/solr/TestCol/conf -confname TEST_CONF;

链接配置

"$SOLR_HOME"/example/scripts/cloud-scripts/zkcli.sh -cmd linkconfig -zkhost zk1:2181,zk2:2181,zk3:2181 -collection TEST_COL -confname TEST_CONF;

创建集合

curl 'http://tlccmrhdd01:8983/solr/admin/collections?action=CREATE&name=TEST_COL&numShards=4&replicationFactor=2&maxShardsPerNode=2&createNodeSet=node1:8983_solr,node2:8983_solr,node3:8983_solr,node4:8983_solr'

upconfig 和 linkconfig 步骤顺利进行,但 createCollection 步骤失败,堆栈跟踪如下:


Collection: TEST_COL operation: createcollection failed:org.apache.solr.common.SolrException
at org.apache.solr.cloud.OverseerCollectionProcessor.createCollection(OverseerCollectionProcessor.java:2258)
at org.apache.solr.cloud.OverseerCollectionProcessor.processMessage(OverseerCollectionProcessor.java:551)
at org.apache.solr.cloud.OverseerCollectionProcessor$Runner.run(OverseerCollectionProcessor.java:2629)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /collections/TEST_COL
at org.apache.zookeeper.KeeperException.create(KeeperException.java:119)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
at org.apache.solr.common.cloud.SolrZkClient$11.execute(SolrZkClient.java:462)
at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:74)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:459)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:416)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:403)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:390)
at org.apache.solr.cloud.OverseerCollectionProcessor.createConfNode(OverseerCollectionProcessor.java:2420)
at org.apache.solr.cloud.OverseerCollectionProcessor.createCollection(OverseerCollectionProcessor.java:2164)


null:org.apache.solr.common.SolrException
at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:364)
at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:320)
at org.apache.solr.handler.admin.CollectionsHandler.handleCreateAction(CollectionsHandler.java:486)
at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:148)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:729)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:267)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
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:744)

最佳答案

刚遇到同样的问题,解决方法如下:

(1) 发出 upconfig 命令,将 solr conf 上传到 zk。

(2) 发出创建集合命令,但请确保添加“&collection.configName=TEST_CONF”(这将创建集合并使用您刚刚上传的配置文件)。

请勿使用 linkconfig 命令,因为它会导致“NodeExists”异常。

关于solr - 在 SolrCloud 中创建集合失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28019097/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com