2013-04-26 90 views
1

在Mac雪豹,我一直在使用BREW安装Apache Solr实现4.2.0,并使用下面的命令触发服务器,Apache Solr实现 - 无法访问管理页面

Usage: $ solr path/to/config/dir 

当我尝试访问管理页面在浏览器中使用下面的链接和与SolrCore初始化失败的页面如下情况发生时,

http://localhost:8983/solr/admin 

collection1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config for solrconfig.xml 

页面还具有消息,

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

任何有关这方面的帮助,非常感谢。

回答

0

在Solr config目录的根目录中,有一个名为solr.xml的文件。该文件配置Solr核心。该文件可能包含:

<cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:}" hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}"> 
    <core default="true" name="auction" instanceDir="auctionConfigDir" /> 
    </cores> 

重要的一点是要与实际相符path/to/config/dirinstanceDir="auctionConfigDir"。如果Solr找不到配置文件的位置,则无法启动核心。

+0

我不不认为它是config目录的路径。它是包含该配置目录的目录的路径。 – lulalala 2013-10-09 04:26:01

0

须藤的vim /opt/solr-4.8.1/example/etc/jetty.xml 变化

<!-- This connector is currently being used for Solr because it 
     showed better performance than nio.SelectChannelConnector 
     for typical Solr requests. --> 
<Call name="addConnector"> 
    <Arg> 
     <New class="org.eclipse.jetty.server.bio.SocketConnector"> 
     <Set name="host">127.0.0.1</Set> 
     <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set> 
     <Set name="maxIdleTime">50000</Set> 
     <Set name="lowResourceMaxIdleTime">1500</Set> 
     <Set name="statsOn">false</Set> 
     </New> 
    </Arg> 
</Call> 

<!-- This connector is currently being used for Solr because it 
     showed better performance than nio.SelectChannelConnector 
     for typical Solr requests. --> 
<Call name="addConnector"> 
    <Arg> 
     <New class="org.eclipse.jetty.server.bio.SocketConnector"> 
     <Set name="host">0.0.0.0</Set> 
     <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set> 
     <Set name="maxIdleTime">50000</Set> 
     <Set name="lowResourceMaxIdleTime">1500</Set> 
     <Set name="statsOn">false</Set> 
     </New> 
    </Arg> 
</Call> 

然后 须藤服务solrd重启