开发者

need help to solve solrj.SolrServerException

I am new to Solr, I am using Solr -1.5( nightly bulid) to index my data which is in xml format...

Here is my sample data,

<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>

I am getting the following error

 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(DefaultProtocolSocketFac开发者_JAVA技巧tory.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

Pls help me out, Thank you in advance.


A ConnectException means that either your Solr instance is not running or you're trying to connect to the wrong IP/port.


From the error, it appears your Solr instance is not running at the address you provided. Try to access your Solr instance directly. Once you determine it's up and running, use the same address to connect to it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜