[ 
https://issues.apache.org/jira/browse/SOLR-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13638625#comment-13638625
 ] 

Ravi Kiran Bhaskar commented on SOLR-4743:
------------------------------------------

I apologize for pushing you into this wild goose chase, We blocked all group 
queries that don't have group.field or group.query but still our issue 
persisted. After some sleuthing I traced the issue back to the empty queries. I 
was able to reproduce the empty queries by just hitting the url 
"http://server:port/solr/select"; (yes, without any params). However I was not 
able to simulate the same empty query with solrj.

We use a single static HttpSolrServer instance in our code, so, assuming that 
if it's possible to generate empty query via solrj, since wt and version are 
not available in the solr params, HttpSolrSever will respond with and XML 
instead of javabin format which will cause the SolrJ's JavaBinCodec's method to 
throw an "expected 2 but got 60" exception. So the question is, if there are 
lot of errors like that will the HttpSolrServer or underlying HttpClient go 
into inconsistent state ? If yes, that would explain why only a restart seems 
to make it work normally again. Is there a way we can configure HttpSolrServer 
or its underlying HttpClient to recover itself from such errors ?
                
> Group query crashes server
> --------------------------
>
>                 Key: SOLR-4743
>                 URL: https://issues.apache.org/jira/browse/SOLR-4743
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6.2
>         Environment: CentOS release 5.9, Sun GlassFish Enterprise Server 
> v2.1.1 Patch15
>            Reporter: Ravi Kiran Bhaskar
>            Priority: Critical
>         Attachments: server.log_2013-04-20T09-53-28, solrconf.xml
>
>
> If you specify group=true but don't specify group.query or group.field SOLR 
> throws a SEVERE exception following which we see the empty queries and 
> finally no responses via solrj and admin console gives numFound always equal 
> to total number of docs in index (it's 21692 as shown below). Looks like the 
> searcher goes for a spin once it encounters the exception. Such situation 
> should have been gracefully handled
> EXCEPTION and QUERY
> --------------------
> [#|2013-04-19T23:47:53.363-0400|SEVERE|sun-appserver2.1.1|org.apache.solr.core.SolrCore|_ThreadID=26;_ThreadName=httpSSLWorkerThread-9001-17;_RequestID=2f
> 933642-cad0-40e5-86c6-65b00be9bb97;|org.apache.solr.common.SolrException: 
> Specify at least one field, function or query to group by.
> at org.apache.solr.search.Grouping.execute(Grouping.java:228)
> at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:372)
> at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:186)
> at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
> at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)
> at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
> at 
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
> at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at 
> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
> at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
> at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
> at 
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:670)
> at 
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:601)
> at 
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:875)
> at 
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:365)
> at 
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:285)
> at 
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:221)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:269)
> at 
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:111)
> |#]
> [#|2013-04-19T23:47:53.365-0400|INFO|sun-appserver2.1.1|org.apache.solr.core.SolrCore|_ThreadID=26;_ThreadName=httpSSLWorkerThread-9001-17;|[core1]
>  webapp=/solr path=/select 
> params={q=astronomy\+&rows=10&start=0&facet=true&fq=source:"xxx.com"&fq=locations:("Maryland")&sort=score+desc&group=true}
>  status=400 QTime=9 |#]
> EMPTY QUERY
> ------------
> [#|2013-04-20T17:35:50.933-0400|INFO|sun-appserver2.1.1|org.apache.solr.core.SolrCore|_ThreadID=26;_ThreadName=httpSSLWorkerThread-9001-6;|[core1]
>  webapp=/solr path=/select params={} hits=21692 status=0 QTime=16 |#]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to