lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyer, James" <James.D...@ingramcontent.com>
Subject RE: Problem with ping handler, SolrJ 4.1-SNAPSHOT, Solr 3.5.0
Date Thu, 08 Nov 2012 22:25:09 GMT
Shawn,

Could this be a side-effect from SOLR-4019, in branch_4.0 this was commit r1405894 ?  Prior
to this commit, PingRequestHandler would throw a SolrException for 503/Bad Request.  The change
is that the exception isn't actually thrown but rather sent in place of the response.  This
prevents the container from logging huge stack traces just because PingrequestHandler is in
a "disabled" state.  Prior to this, SolrException had logging disabled for 503's with hardcoding,
but this broke other uses of 503 SE's.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: Shawn Heisey [mailto:solr@elyograg.org] 
Sent: Tuesday, November 06, 2012 1:25 AM
To: solr-user@lucene.apache.org
Subject: Problem with ping handler, SolrJ 4.1-SNAPSHOT, Solr 3.5.0

If I send a ping request to Solr 4.1 from SolrJ 4.1, it works.  I don't 
have an exact revision number from branch_4x, I don't know how to get it 
from SolrJ.  The 4.1 server is running solr-impl 4.1-SNAPSHOT 1401798M 
with the patch from SOLR-1972 applied, and it's somewhat newer than SolrJ.


Java code snippets:

private static final String PING_HANDLER = "/admin/ping";

query.setRequestHandler(PING_HANDLER);
response = _querySolr.query(query);


If I use this exact same code to talk to a Solr 3.5.0 server (older 
version of the SOLR-1972 patch applied) with the ping handler in the 
"enabled" state, I get the following exception.  The /admin/ping handler 
works in a browser on both Solr versions:

Caused by: org.apache.solr.client.solrj.SolrServerException: Error 
executing query
     at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:98)
     at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)
     at com.newscom.common.solr.Core.ping(Core.java:396)
     ... 4 more
Caused by: java.lang.RuntimeException: Invalid version (expected 2, but 
60) or the data in not in 'javabin' format
     at 
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:109)
     at 
org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(BinaryResponseParser.java:41)
     at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:384)
     at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:181)
     at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
     ... 6 more

If I use the XMLResponseParser instead, then I get a different exception:

Caused by: org.apache.solr.common.SolrException: parsing error
     at 
org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:143)
     at 
org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:104)
     at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:384)
     at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:181)
     at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
     at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)
     at com.newscom.common.solr.Core.ping(Core.java:398)
     ... 4 more
Caused by: java.lang.Exception: really needs to be response or result.  
not:html
     at 
org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:134)
     ... 10 more

I'm already dealing with the expected "Service Unavailable" exception, 
this is something different.  Is it going to be possible to make this 
work?  Should I file an issue in Jira?  Is the problem in the newer 
SolrJ or in the older Solr?  At this time I do not really need the 
information in the response, I just need to be able to judge success 
(Solr is up and working) by nothing being thrown, and be able to look 
into any exception thrown to see whether I've got a disabled handler or 
an error condition.

Thanks,
Shawn




Mime
View raw message