You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andrzej Bialecki (JIRA)" <ji...@apache.org> on 2018/06/04 12:18:00 UTC

[jira] [Created] (SOLR-12446) Misleading client response when IllegalArgumentException is thrown in SolrIndexSearcher

Andrzej Bialecki  created SOLR-12446:
----------------------------------------

             Summary: Misleading client response when IllegalArgumentException is thrown in SolrIndexSearcher
                 Key: SOLR-12446
                 URL: https://issues.apache.org/jira/browse/SOLR-12446
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: master (8.0)
            Reporter: Andrzej Bialecki 


Running SolrCloud example and submitting a query that results in IllegalArgumentException produces a misleading response claiming that "No live SolrServers available to handle this request".

I can't provide data and query to reproduce this - but it's easy to simulate by throwing IllegalArgumentException from {{SolrIndexSearcher.buildAndRunCollectorChain}}.

Here's the original stacktrace found in the server log:
{code}
2018-05-31 14:27:09.678 ERROR (qtp761960786-25858) [c:company s:shard1 r:core_node5 x:company_shard1_replica1] o.a.s.s.HttpSolrCall null:java.lang.IllegalArgumentException: Less than 2 subSpans.size():1
    at org.apache.lucene.search.spans.ConjunctionSpans.<init>(ConjunctionSpans.java:38)
    at org.apache.lucene.search.spans.NearSpansOrdered.<init>(NearSpansOrdered.java:54)
    at org.apache.lucene.search.spans.SpanNearQuery$SpanNearWeight.getSpans(SpanNearQuery.java:222)
    at org.apache.lucene.search.spans.SpanWeight.scorer(SpanWeight.java:133)
    at org.apache.lucene.search.spans.SpanWeight.scorer(SpanWeight.java:38)
    at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:126)
    at org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:400)
    at org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:400)
    at org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:400)
    at org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:381)
    at org.apache.lucene.search.Weight.bulkScorer(Weight.java:160)
    at org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:375)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:665)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:472)
    at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:217)
    at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1582)
    at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1399)
    at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:566)
    at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:545)
    at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:296)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
    at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
{code}

Here's the response produced using a simulated exception with "test" message:
{code}
{
    "responseHeader": {
        "zkConnected": true,
        "status": 500,
        "QTime": 14,
        "params": {
            "q": "*:*"
        }
    },
    "error": {
        "metadata": [
            "error-class",
            "org.apache.solr.common.SolrException",
            "root-error-class",
            "org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException"
        ],
        "msg": "org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://192.168.0.221:8983/solr/gettingstarted_shard1_replica_n2, http://192.168.0.221:7574/solr/gettingstarted_shard2_replica_n4, http://192.168.0.221:7574/solr/gettingstarted_shard1_replica_n1]",
        "trace": "org.apache.solr.common.SolrException: org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://192.168.0.221:8983/solr/gettingstarted_shard1_replica_n2, http://192.168.0.221:7574/solr/gettingstarted_shard2_replica_n4, http://192.168.0.221:7574/solr/gettingstarted_shard1_replica_n1]\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:413)\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2539)\n\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:378)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:324)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:531)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:760)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:678)\n\tat java.lang.Thread.run(Thread.java:745)\nCaused by: org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://192.168.0.221:8983/solr/gettingstarted_shard1_replica_n2, http://192.168.0.221:7574/solr/gettingstarted_shard2_replica_n4, http://192.168.0.221:7574/solr/gettingstarted_shard1_replica_n1]\n\tat org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:462)\n\tat org.apache.solr.handler.component.HttpShardHandlerFactory.makeLoadBalancedRequest(HttpShardHandlerFactory.java:279)\n\tat org.apache.solr.handler.component.HttpShardHandler.lambda$submit$507(HttpShardHandler.java:175)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)\n\tat org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$323(ExecutorUtil.java:209)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\t... 1 more\nCaused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://192.168.0.221:7574/solr/gettingstarted_shard1_replica_n1: test\n\tat org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:643)\n\tat org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255)\n\tat org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244)\n\tat org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:483)\n\tat org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:413)\n\t... 10 more\n",
        "code": 500
    }
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org