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 Peter Markey <su...@gmail.com> on 2012/07/12 23:36:55 UTC

Solr ids query parameter

Hello,

I am trying to do a distributed search with solr and for some reason I get
an internal server error. The set up is like this: I have 4 solr servers
that index data (say daily each with 10 cores) and I use another bunch of
solr instances (lets call one of them as L1aggregator) that does a
distributed request to all the 40 cores of 4 solr servers. I also have
another solr instance (lets call it L2aggregator) that would be collecting
data from multiple L1aggregator solr instances. Its like a multi-level
structure. I am just trying out an architecture which has daily solr
servers at the lowest level followed by aggregators at each level. Hence,
an aggregator node does not have data of its own. The problem is while the
L1aggregator seem to work perfectly fine, the L2Aggregator seem to throw
internal server error (stack trace posted below). I specify the address of
shards in the aggregator's config file. Also, all the documents have a
unique ids. While I was trying to debug the error, I noticed that a L2
aggregator solr makes two calls to L1 aggregator: one to get the docs' ids
and the other to get data for thos doc ids. While the first call works, the
second call seems to throw the error pasted below. Any help would be highly
appreciated. Thanks





HTTP Status 500 - Internal Server Error Internal Server Error request:
http://l1aggregator:8080/solr/core-00/selectorg.apache.solr.common.SolrException:
Internal Server Error Internal Server
Error request: http://l1aggregator:8080/solr/core-00/select at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
------------------------------

*type* Status report

*message* *Internal Server Error Internal Server Error request:
http://l1aggregator:8080/solr/core-00/selectorg.apache.solr.common.SolrException:
Internal Server Error Internal Server
Error request: http://**l1aggregator**:8080/solr/core-00/select at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)*

*description* *The server encountered an internal error (Internal Server
Error Internal Server Error request:
http://**l1aggregator**:8080/solr/core-00/select
org.apache.solr.common.SolrException: Internal Server Error Internal Server
Error request: http://**l1aggregator**:8080/solr/core-00/select at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662) ) that prevented it from
fulfilling this request.*
*
*

Re: Solr ids query parameter

Posted by Peter Markey <su...@gmail.com>.
well it's an interesting solution but my use case is such that any of the
daily servers could hold the data for a query and hence i need an
aggregator to sum up the results. The only issue is, an aggregator could
sum up only certain number (I heard around 200) of cores. Hence I would
need to manually sum results from different aggregators if for some reason
my query spans more than 200 cores. Digging more into the issue I found
that solr does distributed searching in two steps. First it queries for doc
ids and then gets the data corresponding to those doc ids. I am seeing the
error when it is trying to compare the score of two documents. Below is a
better stack trace and its similar to
https://issues.apache.org/jira/browse/SOLR-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
.

SEVERE: java.lang.NullPointerException
  at
org.apache.solr.handler.component.ShardFieldSortedHitQueue$1.compare(ShardDoc.java:236)
  at
org.apache.solr.handler.component.ShardFieldSortedHitQueue.lessThan(ShardDoc.java:160)
at
org.apache.solr.handler.component.ShardFieldSortedHitQueue.lessThan(ShardDoc.java:101)
  at org.apache.lucene.util.PriorityQueue.upHeap(PriorityQueue.java:223)
at org.apache.lucene.util.PriorityQueue.add(PriorityQueue.java:132)
at
org.apache.lucene.util.PriorityQueue.insertWithOverflow(PriorityQueue.java:148)
  at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:786)
  at
org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:587)
at
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:566)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:283)
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:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
  at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)


On Thu, Jul 12, 2012 at 2:46 PM, Michael Della Bitta <
michael.della.bitta@appinions.com> wrote:

> I'm pretty sure a sharded query/response gets tagged in a special way
> that might be incompatible with multiple tiers like this.
>
> Had you considered a single tier that consisted of a load-balanced
> pool of 'aggregator' servers?
>
> Michael Della Bitta
>
> ------------------------------------------------
> Appinions, Inc. -- Where Influence Isn’t a Game.
> http://www.appinions.com
>
>
> On Thu, Jul 12, 2012 at 5:36 PM, Peter Markey <su...@gmail.com> wrote:
> > Hello,
> >
> > I am trying to do a distributed search with solr and for some reason I
> get
> > an internal server error. The set up is like this: I have 4 solr servers
> > that index data (say daily each with 10 cores) and I use another bunch of
> > solr instances (lets call one of them as L1aggregator) that does a
> > distributed request to all the 40 cores of 4 solr servers. I also have
> > another solr instance (lets call it L2aggregator) that would be
> collecting
> > data from multiple L1aggregator solr instances. Its like a multi-level
> > structure. I am just trying out an architecture which has daily solr
> > servers at the lowest level followed by aggregators at each level. Hence,
> > an aggregator node does not have data of its own. The problem is while
> the
> > L1aggregator seem to work perfectly fine, the L2Aggregator seem to throw
> > internal server error (stack trace posted below). I specify the address
> of
> > shards in the aggregator's config file. Also, all the documents have a
> > unique ids. While I was trying to debug the error, I noticed that a L2
> > aggregator solr makes two calls to L1 aggregator: one to get the docs'
> ids
> > and the other to get data for thos doc ids. While the first call works,
> the
> > second call seems to throw the error pasted below. Any help would be
> highly
> > appreciated. Thanks
> >
> >
> >
> >
> >
> > HTTP Status 500 - Internal Server Error Internal Server Error request:
> >
> http://l1aggregator:8080/solr/core-00/selectorg.apache.solr.common.SolrException
> :
> > Internal Server Error Internal Server
> > Error request: http://l1aggregator:8080/solr/core-00/select at
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
> > at
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> > java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at
> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> > java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > ------------------------------
> >
> > *type* Status report
> >
> > *message* *Internal Server Error Internal Server Error request:
> >
> http://l1aggregator:8080/solr/core-00/selectorg.apache.solr.common.SolrException
> :
> > Internal Server Error Internal Server
> > Error request: http://**l1aggregator**:8080/solr/core-00/select at
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
> > at
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> > java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at
> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> > java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)*
> >
> > *description* *The server encountered an internal error (Internal Server
> > Error Internal Server Error request:
> > http://**l1aggregator**:8080/solr/core-00/select
> > org.apache.solr.common.SolrException: Internal Server Error Internal
> Server
> > Error request: http://**l1aggregator**:8080/solr/core-00/select at
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
> > at
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> > java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at
> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> > java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662) ) that prevented it from
> > fulfilling this request.*
> > *
> > *
>

Re: Solr ids query parameter

Posted by Michael Della Bitta <mi...@appinions.com>.
I'm pretty sure a sharded query/response gets tagged in a special way
that might be incompatible with multiple tiers like this.

Had you considered a single tier that consisted of a load-balanced
pool of 'aggregator' servers?

Michael Della Bitta

------------------------------------------------
Appinions, Inc. -- Where Influence Isn’t a Game.
http://www.appinions.com


On Thu, Jul 12, 2012 at 5:36 PM, Peter Markey <su...@gmail.com> wrote:
> Hello,
>
> I am trying to do a distributed search with solr and for some reason I get
> an internal server error. The set up is like this: I have 4 solr servers
> that index data (say daily each with 10 cores) and I use another bunch of
> solr instances (lets call one of them as L1aggregator) that does a
> distributed request to all the 40 cores of 4 solr servers. I also have
> another solr instance (lets call it L2aggregator) that would be collecting
> data from multiple L1aggregator solr instances. Its like a multi-level
> structure. I am just trying out an architecture which has daily solr
> servers at the lowest level followed by aggregators at each level. Hence,
> an aggregator node does not have data of its own. The problem is while the
> L1aggregator seem to work perfectly fine, the L2Aggregator seem to throw
> internal server error (stack trace posted below). I specify the address of
> shards in the aggregator's config file. Also, all the documents have a
> unique ids. While I was trying to debug the error, I noticed that a L2
> aggregator solr makes two calls to L1 aggregator: one to get the docs' ids
> and the other to get data for thos doc ids. While the first call works, the
> second call seems to throw the error pasted below. Any help would be highly
> appreciated. Thanks
>
>
>
>
>
> HTTP Status 500 - Internal Server Error Internal Server Error request:
> http://l1aggregator:8080/solr/core-00/selectorg.apache.solr.common.SolrException:
> Internal Server Error Internal Server
> Error request: http://l1aggregator:8080/solr/core-00/select at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
> at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
> at
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
> at
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> ------------------------------
>
> *type* Status report
>
> *message* *Internal Server Error Internal Server Error request:
> http://l1aggregator:8080/solr/core-00/selectorg.apache.solr.common.SolrException:
> Internal Server Error Internal Server
> Error request: http://**l1aggregator**:8080/solr/core-00/select at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
> at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
> at
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
> at
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)*
>
> *description* *The server encountered an internal error (Internal Server
> Error Internal Server Error request:
> http://**l1aggregator**:8080/solr/core-00/select
> org.apache.solr.common.SolrException: Internal Server Error Internal Server
> Error request: http://**l1aggregator**:8080/solr/core-00/select at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
> at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:249)
> at
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:129)
> at
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:103)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
> java.util.concurrent.FutureTask.run(FutureTask.java:138) at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662) ) that prevented it from
> fulfilling this request.*
> *
> *