You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Joseph Tech <ja...@gmail.com> on 2016/04/12 12:07:30 UTC

DSE Search : NPE when executing Solr CQL queries using solr_query

hi,

I am facing an issue where Solr queries executed from cqlsh using the
solr_query field is throwing an NPE in system.log, while cqlsh shows the
following error:

Unable to complete request: one or more nodes were unavailable.

These queries work fine thru the Solr admin console UI.

Below is the stacktrace when executing the wildcard query :

select * from user where solr_query='user_id:*ABCD-**';

The line in bold (from custom Output FT) shows that the key corresponding
to ABCD-* was identified, but results are not returned. I noticed some
JIRAs like SOLR-7254 with similar stacktraces, but doesnt mention a fix.
Please suggest if there's anything on the Cassandra side to be checked for
this.

 INFO [http-8983-exec-1] 2016-04-12 04:46:13,061
SolrCoreResourceManager.java (line 553) Trying to load resource schema.xml
for core XYZ.user by querying from local node with CL QUORUM
 INFO [http-8983-exec-1] 2016-04-12 04:46:13,065
SolrCoreResourceManager.java (line 563) Successfully loaded resource
schema.xml for core XYZ.user by querying from local node.
 INFO [LocalShardServer query worker - 0] 2016-04-12 04:46:32,127
*UserFieldOutputTransformer.java
(line 28) name: user_id, value: ABCD-a552-47c0-b4c1-66ce3db11496*
ERROR [Thrift:5] 2016-04-12 04:46:32,130 SolrException.java (line 124)
java.lang.NullPointerException
at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:896)
at
org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:642)
at
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:621)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:319)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1891)
at
com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.executeSolrQuery(CqlSolrQueryExecutor.java:174)
at
com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.execute(CqlSolrQueryExecutor.java:96)
at
com.datastax.bdp.cassandra.cql3.DseQueryHandler$SolrStatementExecution.execute(DseQueryHandler.java:464)
at
com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithTiming(DseQueryHandler.java:190)
at
com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithAuditLogging(DseQueryHandler.java:223)
at
com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:103)
at
org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
at com.datastax.bdp.server.DseServer.execute_cql3_query(DseServer.java:543)
at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:204)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Re: DSE Search : NPE when executing Solr CQL queries using solr_query

Posted by Joseph Tech <ja...@gmail.com>.
hi,

I have posted this as the latest "answer" (though it isn't really) with all
details on stackoverflow
http://stackoverflow.com/questions/27966440/normal-query-on-cassandra-using-datastax-enterprise-works-but-not-solr-query
. Hope someone from DS can help.

Thanks,
Joseph

On Tue, Apr 12, 2016 at 9:09 PM, Jack Krupansky <ja...@gmail.com>
wrote:

> You'll have to use StackOverflow or DataStax for support on DSE Search.
>
> It looks like you have a Field Output Transformer (
> *UserFieldOutputTransformer.java*). The NPE might be related to
> processing that occurs there - try removing this FOT and see if the NPE
> still occurs. For example, maybe the FOT is setting an output column value
> to NULL.
>
> Also, see if there is a "Caused By" entry elsewhere in the Java stack
> trace.
>
> -- Jack Krupansky
>
> On Tue, Apr 12, 2016 at 6:07 AM, Joseph Tech <ja...@gmail.com>
> wrote:
>
>> hi,
>>
>> I am facing an issue where Solr queries executed from cqlsh using the
>> solr_query field is throwing an NPE in system.log, while cqlsh shows the
>> following error:
>>
>> Unable to complete request: one or more nodes were unavailable.
>>
>> These queries work fine thru the Solr admin console UI.
>>
>> Below is the stacktrace when executing the wildcard query :
>>
>> select * from user where solr_query='user_id:*ABCD-**';
>>
>> The line in bold (from custom Output FT) shows that the key corresponding
>> to ABCD-* was identified, but results are not returned. I noticed some
>> JIRAs like SOLR-7254 with similar stacktraces, but doesnt mention a fix.
>> Please suggest if there's anything on the Cassandra side to be checked for
>> this.
>>
>>  INFO [http-8983-exec-1] 2016-04-12 04:46:13,061
>> SolrCoreResourceManager.java (line 553) Trying to load resource schema.xml
>> for core XYZ.user by querying from local node with CL QUORUM
>>  INFO [http-8983-exec-1] 2016-04-12 04:46:13,065
>> SolrCoreResourceManager.java (line 563) Successfully loaded resource
>> schema.xml for core XYZ.user by querying from local node.
>>  INFO [LocalShardServer query worker - 0] 2016-04-12 04:46:32,127 *UserFieldOutputTransformer.java
>> (line 28) name: user_id, value: ABCD-a552-47c0-b4c1-66ce3db11496*
>> ERROR [Thrift:5] 2016-04-12 04:46:32,130 SolrException.java (line 124)
>> java.lang.NullPointerException
>> at
>> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:896)
>> at
>> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:642)
>> at
>> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:621)
>> at
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:319)
>> at
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140)
>> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1891)
>> at
>> com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.executeSolrQuery(CqlSolrQueryExecutor.java:174)
>> at
>> com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.execute(CqlSolrQueryExecutor.java:96)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler$SolrStatementExecution.execute(DseQueryHandler.java:464)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithTiming(DseQueryHandler.java:190)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithAuditLogging(DseQueryHandler.java:223)
>> at
>> com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:103)
>> at
>> org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
>> at
>> com.datastax.bdp.server.DseServer.execute_cql3_query(DseServer.java:543)
>> at
>> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
>> at
>> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
>> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>> at
>> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:204)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> at java.lang.Thread.run(Thread.java:745)
>>
>>
>>
>

Re: DSE Search : NPE when executing Solr CQL queries using solr_query

Posted by Jack Krupansky <ja...@gmail.com>.
You'll have to use StackOverflow or DataStax for support on DSE Search.

It looks like you have a Field Output Transformer (
*UserFieldOutputTransformer.java*). The NPE might be related to processing
that occurs there - try removing this FOT and see if the NPE still occurs.
For example, maybe the FOT is setting an output column value to NULL.

Also, see if there is a "Caused By" entry elsewhere in the Java stack trace.

-- Jack Krupansky

On Tue, Apr 12, 2016 at 6:07 AM, Joseph Tech <ja...@gmail.com> wrote:

> hi,
>
> I am facing an issue where Solr queries executed from cqlsh using the
> solr_query field is throwing an NPE in system.log, while cqlsh shows the
> following error:
>
> Unable to complete request: one or more nodes were unavailable.
>
> These queries work fine thru the Solr admin console UI.
>
> Below is the stacktrace when executing the wildcard query :
>
> select * from user where solr_query='user_id:*ABCD-**';
>
> The line in bold (from custom Output FT) shows that the key corresponding
> to ABCD-* was identified, but results are not returned. I noticed some
> JIRAs like SOLR-7254 with similar stacktraces, but doesnt mention a fix.
> Please suggest if there's anything on the Cassandra side to be checked for
> this.
>
>  INFO [http-8983-exec-1] 2016-04-12 04:46:13,061
> SolrCoreResourceManager.java (line 553) Trying to load resource schema.xml
> for core XYZ.user by querying from local node with CL QUORUM
>  INFO [http-8983-exec-1] 2016-04-12 04:46:13,065
> SolrCoreResourceManager.java (line 563) Successfully loaded resource
> schema.xml for core XYZ.user by querying from local node.
>  INFO [LocalShardServer query worker - 0] 2016-04-12 04:46:32,127 *UserFieldOutputTransformer.java
> (line 28) name: user_id, value: ABCD-a552-47c0-b4c1-66ce3db11496*
> ERROR [Thrift:5] 2016-04-12 04:46:32,130 SolrException.java (line 124)
> java.lang.NullPointerException
> at
> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:896)
> at
> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:642)
> at
> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:621)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:319)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1891)
> at
> com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.executeSolrQuery(CqlSolrQueryExecutor.java:174)
> at
> com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.execute(CqlSolrQueryExecutor.java:96)
> at
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$SolrStatementExecution.execute(DseQueryHandler.java:464)
> at
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithTiming(DseQueryHandler.java:190)
> at
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.executeOperationWithAuditLogging(DseQueryHandler.java:223)
> at
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:103)
> at
> org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
> at com.datastax.bdp.server.DseServer.execute_cql3_query(DseServer.java:543)
> at
> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
> at
> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at
> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:204)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
>
>