You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by roySolr <ro...@gmail.com> on 2011/09/29 14:55:45 UTC

Errors in requesthandler statistics

Hello,

I was taking a look to my SOLR statistics and i see in part of the
requesthandler a count of 23 by errors. How can i see which requests returns
this errors? Can i log this somewhere?

Thanks
Roy

--
View this message in context: http://lucene.472066.n3.nabble.com/Errors-in-requesthandler-statistics-tp3379163p3379163.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Errors in requesthandler statistics

Posted by "Jaeger, Jay - DOT" <Ja...@dot.wi.gov>.
If you are asking how to tell which of 94000 records failed in a SINGLE HTTP update request, I have no idea, but I suspect that you cannot necessarily tell.

It might help if you copied and pasted what you find in the solr log for the failure (see my previous response for how to figure out where that might be -- look for a file solr0.log).

-----Original Message-----
From: roySolr [mailto:royrutten1989@gmail.com] 
Sent: Thursday, September 29, 2011 8:43 AM
To: solr-user@lucene.apache.org
Subject: RE: Errors in requesthandler statistics

Hi,

Thanks for your answer.

I have some logging by jetty. Every request looks like this:

<record>
  <date>2011-09-29T12:28:47</date>
  <millis>1317292127479</millis>
  <sequence>18470</sequence>
  <logger>org.apache.solr.core.SolrCore</logger>
  <level>INFO</level>
  <class>org.apache.solr.core.SolrCore</class>
  <method>execute</method>
  <thread>20</thread>
  <message>[] webapp=/solr path=/select/
params={spellcheck=true&amp;facet=true&amp;sort=geodist()+asc&amp;sfield=coord&amp;spellcheck.q=test&amp;facet.limit=20&amp;version=2.2&amp;fl=id,what,where}
hits=0 status=0 QTime=12 </message>
</record>

How can i see which <record> gives an error? The file has stored 94000
requests

Roy

--
View this message in context: http://lucene.472066.n3.nabble.com/Errors-in-requesthandler-statistics-tp3379163p3379288.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Errors in requesthandler statistics

Posted by Shawn Heisey <so...@elyograg.org>.
On 9/29/2011 7:42 AM, roySolr wrote:
> I have some logging by jetty. Every request looks like this:
>
> <record>
>    <date>2011-09-29T12:28:47</date>
>    <millis>1317292127479</millis>
>    <sequence>18470</sequence>
>    <logger>org.apache.solr.core.SolrCore</logger>
>    <level>INFO</level>
>    <class>org.apache.solr.core.SolrCore</class>
>    <method>execute</method>
>    <thread>20</thread>
>    <message>[] webapp=/solr path=/select/
> params={spellcheck=true&amp;facet=true&amp;sort=geodist()+asc&amp;sfield=coord&amp;spellcheck.q=test&amp;facet.limit=20&amp;version=2.2&amp;fl=id,what,where}
> hits=0 status=0 QTime=12</message>
> </record>
>
> How can i see which<record>  gives an error? The file has stored 94000
> requests

Looks like your Solr installation is probably using 
java.util.logging.XMLFormatter.  I'm using java.util.logging.FileHandler 
and below is what I get in my log for one of my request errors.  This 
comes from the search application sending "tag_id:" (without the quotes) 
to Solr.  This is an invalid query.  I don't know what happens with XML 
formatting, but it's probably similar.  Try searching all your logfiles 
for "SEVERE" or "error" strings.

Sep 24, 2011 2:56:48 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: 
org.apache.lucene.queryParser.ParseException: Cannot parse 'tag_id:': 
Encountered "<EOF>" at line 1, column 7.
Was expecting one of:
     "(" ...
     "*" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
     "[" ...
     "{" ...
<NUMBER> ...

         at 
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:108)
         at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
         at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:208)
         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1360)
         at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
         at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
         at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
         at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
         at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
         at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
         at 
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
         at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
         at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
         at org.mortbay.jetty.Server.handle(Server.java:326)
         at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
         at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
         at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
         at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse 
'tag_id:': Encountered "<EOF>" at line 1, column 7.
Was expecting one of:
     "(" ...
     "*" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
     "[" ...
     "{" ...
<NUMBER> ...

         at 
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:211)
         at 
org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:80)
         at org.apache.solr.search.QParser.getQuery(QParser.java:142)
         at 
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:84)
         ... 22 more
Caused by: org.apache.lucene.queryParser.ParseException: Encountered 
"<EOF>" at line 1, column 7.
Was expecting one of:
     "(" ...
     "*" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
     "[" ...
     "{" ...
<NUMBER> ...

         at 
org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1818)
         at 
org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1700)
         at 
org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1327)
         at 
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1237)
         at 
org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1226)
         at 
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
         ... 25 more


RE: Errors in requesthandler statistics

Posted by roySolr <ro...@gmail.com>.
Hi,

Thanks for your answer.

I have some logging by jetty. Every request looks like this:

<record>
  <date>2011-09-29T12:28:47</date>
  <millis>1317292127479</millis>
  <sequence>18470</sequence>
  <logger>org.apache.solr.core.SolrCore</logger>
  <level>INFO</level>
  <class>org.apache.solr.core.SolrCore</class>
  <method>execute</method>
  <thread>20</thread>
  <message>[] webapp=/solr path=/select/
params={spellcheck=true&amp;facet=true&amp;sort=geodist()+asc&amp;sfield=coord&amp;spellcheck.q=test&amp;facet.limit=20&amp;version=2.2&amp;fl=id,what,where}
hits=0 status=0 QTime=12 </message>
</record>

How can i see which <record> gives an error? The file has stored 94000
requests

Roy

--
View this message in context: http://lucene.472066.n3.nabble.com/Errors-in-requesthandler-statistics-tp3379163p3379288.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Errors in requesthandler statistics

Posted by "Jaeger, Jay - DOT" <Ja...@dot.wi.gov>.
I am not expert, but based on my experience, the information you are looking for should indeed be in your logs.

There are at least three logs you might look for / at:

- An HTTP request log
- The solr log
- Logging by the application server / JVM

Some information is available at http://wiki.apache.org/solr/SolrLogging, but it is pretty sparse.  For Jetty, more detailed information is available at http://wiki.apache.org/solr/LoggingInDefaultJettySetup 

If you have an HTTP server out in front of your application server, or if your application server logs HTTP requests (like Jetty does, for example), you can spot errors via the HTTP status code returned, but there is no detail.

Otherwise errors are also logged in the Solr log.  It is (or at least can be) pretty detailed.  See the links above.  

We created a logging.properties entry to put the logs where we wanted them, per the LoggingInDefaultJettySetup link, above.

The application server log is system dependent.  For our prototype we started Jetty as a Windows service, and the logs end up in the jetty-service.log defined by the service wrapper.  For other application servers, the place, and what is in the log, may vary.

It is a good idea to find out where your logs live before you need them.  ;^)

JRJ

-----Original Message-----
From: roySolr [mailto:royrutten1989@gmail.com] 
Sent: Thursday, September 29, 2011 7:56 AM
To: solr-user@lucene.apache.org
Subject: Errors in requesthandler statistics

Hello,

I was taking a look to my SOLR statistics and i see in part of the
requesthandler a count of 23 by errors. How can i see which requests returns
this errors? Can i log this somewhere?

Thanks
Roy

--
View this message in context: http://lucene.472066.n3.nabble.com/Errors-in-requesthandler-statistics-tp3379163p3379163.html
Sent from the Solr - User mailing list archive at Nabble.com.