Problems connecting to service!

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems connecting to service!

Erik Holstad
Hi!
I'm trying to use solrj to work with solr and tried the example on
http://e-mats.org/tag/solrj/
but I get this error message:

Sep 1, 2008 9:49:09 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing
request: Connection refused
Sep 1, 2008 9:49:09 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: Retrying request
Sep 1, 2008 9:49:09 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing
request: Connection refused
Sep 1, 2008 9:49:09 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: Retrying request
Sep 1, 2008 9:49:09 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing
request: Connection refused
Sep 1, 2008 9:49:09 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: Retrying request
org.apache.solr.client.solrj.SolrServerException: Error executing query
    at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:96)
    at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:109)
    at tester.<init>(tester.java:215)
    at tester.main(tester.java:245)
Caused by: org.apache.solr.client.solrj.SolrServerException:
java.net.ConnectException: Connection refused
    at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:391)
    at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:183)
    at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
    ... 3 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at java.net.Socket.<init>(Socket.java:366)
    at java.net.Socket.<init>(Socket.java:240)
    at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
    at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
    at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:335)
    ... 5 more


Seems like I can't connect to the server. When I'm using the web interface
everything works, so solr is up and running.

Any thoughts?

Regards Erik
Reply | Threaded
Open this post in threaded view
|

Re: Problems connecting to service!

Erik Hatcher
Erik - is the issue the Solr URL?  The example you pointed to uses  
port 8080, but Solr's example configuration uses port 8983.

        Erik

On Sep 1, 2008, at 1:15 PM, Erik Holstad wrote:

> Hi!
> I'm trying to use solrj to work with solr and tried the example on
> http://e-mats.org/tag/solrj/
> but I get this error message:
>
> Sep 1, 2008 9:49:09 AM  
> org.apache.commons.httpclient.HttpMethodDirector
> executeWithRetry
> INFO: I/O exception (java.net.ConnectException) caught when processing
> request: Connection refused
> Sep 1, 2008 9:49:09 AM  
> org.apache.commons.httpclient.HttpMethodDirector
> executeWithRetry
> INFO: Retrying request
> Sep 1, 2008 9:49:09 AM  
> org.apache.commons.httpclient.HttpMethodDirector
> executeWithRetry
> INFO: I/O exception (java.net.ConnectException) caught when processing
> request: Connection refused
> Sep 1, 2008 9:49:09 AM  
> org.apache.commons.httpclient.HttpMethodDirector
> executeWithRetry
> INFO: Retrying request
> Sep 1, 2008 9:49:09 AM  
> org.apache.commons.httpclient.HttpMethodDirector
> executeWithRetry
> INFO: I/O exception (java.net.ConnectException) caught when processing
> request: Connection refused
> Sep 1, 2008 9:49:09 AM  
> org.apache.commons.httpclient.HttpMethodDirector
> executeWithRetry
> INFO: Retrying request
> org.apache.solr.client.solrj.SolrServerException: Error executing  
> query
>    at
> org
> .apache
> .solr.client.solrj.request.QueryRequest.process(QueryRequest.java:96)
>    at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:
> 109)
>    at tester.<init>(tester.java:215)
>    at tester.main(tester.java:245)
> Caused by: org.apache.solr.client.solrj.SolrServerException:
> java.net.ConnectException: Connection refused
>    at
> org
> .apache
> .solr
> .client
> .solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:
> 391)
>    at
> org
> .apache
> .solr
> .client
> .solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:
> 183)
>    at
> org
> .apache
> .solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
>    ... 3 more
> Caused by: java.net.ConnectException: Connection refused
>    at java.net.PlainSocketImpl.socketConnect(Native Method)
>    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:
> 195)
>    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>    at java.net.Socket.connect(Socket.java:519)
>    at java.net.Socket.connect(Socket.java:469)
>    at java.net.Socket.<init>(Socket.java:366)
>    at java.net.Socket.<init>(Socket.java:240)
>    at
> org
> .apache
> .commons
> .httpclient
> .protocol
> .DefaultProtocolSocketFactory
> .createSocket(DefaultProtocolSocketFactory.java:80)
>    at
> org
> .apache
> .commons
> .httpclient
> .protocol
> .DefaultProtocolSocketFactory
> .createSocket(DefaultProtocolSocketFactory.java:122)
>    at
> org
> .apache.commons.httpclient.HttpConnection.open(HttpConnection.java:
> 707)
>    at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
> $HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:
> 1361)
>    at
> org
> .apache
> .commons
> .httpclient
> .HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
>    at
> org
> .apache
> .commons
> .httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:
> 171)
>    at
> org
> .apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:
> 397)
>    at
> org
> .apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:
> 323)
>    at
> org
> .apache
> .solr
> .client
> .solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:
> 335)
>    ... 5 more
>
>
> Seems like I can't connect to the server. When I'm using the web  
> interface
> everything works, so solr is up and running.
>
> Any thoughts?
>
> Regards Erik

Reply | Threaded
Open this post in threaded view
|

Re: Problems connecting to service!

Erik Holstad
Thanks for the quick reply!
I thought that 8983 only was for the web interface, but that
is not the case?

Regards Erik
Reply | Threaded
Open this post in threaded view
|

Re: Problems connecting to service!

Erik Hatcher

On Sep 1, 2008, at 1:51 PM, Erik Holstad wrote:
> I thought that 8983 only was for the web interface, but that
> is not the case?

Solr's services and web interface all operate from a single web  
application.  It's all one port for the example configuration, 8983.

Note that in some cases, like Solr's admin/stats.jsp view, it is  
returning XML no matter what (and rendered to HTML via client-side XSL).

        Erik

Reply | Threaded
Open this post in threaded view
|

Re: Problems connecting to service!

Erik Holstad
Thanks a lot!!

Regards Erik