我是Solr的新手, 我使用Solr -1.5(每晚bulid)来索引我的数据,这是xml格式...
以下是我的示例数据
<row id="359" lat="40".6368913000" lng="-74.1339055000" body="There's a new kid on the block at the Central Park Zoo."></row>
<row id="360" lat="40.6369362000" lng="-74.1340121000" body="@Pezzettino In Manhattan, 4th St Coop, though I personally love Westerly Health Foods. In BK, there used to be 1 in WIlliamsburg in 2006."></row>
<row id="361" lat="40.7614340000" lng="-73.9682530000" body="· Weighing in on Baoguette in FiDi [CH] · Is Le Cirque a Good Choice for Restaurant Week? [CH] · Food at the New Cru is Ok, Not Revelatory, but Where's the Wine Discount? [eG] · At Unknown Buffet, to..."></row>
我收到以下错误
org.apache.solr.client.solrj.SolrServerException: java.net.ConnectException: Connection refused
[java] at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:472)
[java] at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:243)
[java] at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
[java] at org.apache.solr.client.solrj.SolrServer.optimize(SolrServer.java:94)
[java] at org.apache.solr.client.solrj.SolrServer.optimize(SolrServer.java:82)
[java] at OSM2Solr.process(OSM2Solr.java:45)
[java] at Driver.main(Driver.java:80)
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:519)
[java] at java.net.Socket.connect(Socket.java:469)
[java] at java.net.Socket.<init>(Socket.java:366)
[java] at java.net.Socket.<init>(Socket.java:240)
[java] at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
[java] at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
[java] at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
[java] at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
[java] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
[java] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
[java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
[java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
[java] at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:416)
[java] ... 6 more
请帮助我, 提前谢谢。
答案 0 :(得分:1)
ConnectException意味着您的Solr实例未运行或您正在尝试连接到错误的IP /端口。
答案 1 :(得分:1)
从错误中,您的Solr实例似乎未在您提供的地址上运行。尝试直接访问您的Solr实例。一旦确定它已启动并运行,请使用相同的地址连接到它。