-1

我正在尝试设置 SolrCloud 安装,并且我遵循了本指南:http ://wiki.apache.org/solr/SolrCloudTomcat

浏览到任何 solr 实例时,我都会收到此错误消息(如预期的那样):

There are no SolrCores running.
Using the Solr Admin UI currently requires at least one SolrCore.

但是,在涉及 curl 命令的最后一步,我收到以下错误:

curl 'http://mysolr1.com:8080/solr/admin/collections?action=CREATE&name=collection&numShards=4&replicationFactor=1'
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">500</int><int name="QTime">11</int></lst><lst name="error"><str name="trace">java.lang.NullPointerException
    at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:149)
    at org.apache.solr.handler.admin.CollectionsHandler.handleCreateAction(CollectionsHandler.java:277)
    at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:112)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
    at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:591)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:201)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    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:722)
</str><int name="code">500</int></lst>
</response>

有任何想法吗?

4

1 回答 1

0

似乎 Solr 无法通信或 Solr 没有从 ZooKeeper 获得预期的响应。

根据 Solr 4.2.1源代码

Line 149 # QueueEvent event = coreContainer.getZkController()
.getOverseerCollectionQueue()
.offer(ZkStateReader.toJSON(m), DEFAULT_ZK_TIMEOUT);

那么您能否验证一下:

连接到 ZooKeeper 并验证 Solr 配置是否存在(此参考可能会有所帮助

让我知道结果!

于 2013-04-17T05:13:09.510 回答