2013-04-26 31 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重啓