Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

igor.rmarinho avatar image
igor.rmarinho asked ·

Getting SolrException "SolrCore is not available due to init failure: null"

When I try to execute solr queries that use solr indexes that uses kubernetes I'm getting the error below:

INFO  [MemtableFlushWriter:113] 2020-12-03 23:53:03,061  AbstractSolrSecondaryIndex.java:374 - Flushing index commit log for Solr core reporting.shift_audit_by_id...
ERROR [Solr CQL query thread-0] 2020-12-03 23:55:22,705  CqlSolrQueryExecutor.java:149 - Error during solr query for index employee.employee_by_id
ERROR [Solr CQL query thread-0] 2020-12-03 23:55:22,706  Message.java:895 - Unexpected exception during request; channel = [id: 0x0f04d161, L:/10.11.139.11:9042 - R:/10.11.150.39:35936]
org.apache.solr.common.SolrException: SolrCore 'employee.employee_by_id' is not available due to init failure: null
    at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1080)
    at com.datastax.bdp.search.solr.core.CassandraCoreContainer.getCore(CassandraCoreContainer.java:150)
    at com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.doExecute(CqlSolrQueryExecutor.java:174)
    at com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.execute(CqlSolrQueryExecutor.java:131)
    at com.datastax.bdp.cassandra.cql3.SolrQueryOperationFactory.lambda$executeSolrStatement$1(SolrQueryOperationFactory.java:124)
Caused by: org.apache.solr.common.SolrException: null
    at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.readResource(SolrCoreResourceManager.java:249)
    at com.datastax.bdp.search.solr.core.CassandraResourceLoader.openResource(CassandraResourceLoader.java:54)
    at org.apache.solr.core.RequestParams.getMapAndVersion(RequestParams.java:177)
    at org.apache.solr.core.RequestParams.getFreshRequestParams(RequestParams.java:167)
    at org.apache.solr.core.SolrConfig.refreshRequestParams(SolrConfig.java:953)
    at org.apache.solr.core.SolrConfig.getRequestParams(SolrConfig.java:947)
    at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:217)
    at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:201)
    at com.datastax.bdp.search.solr.core.CassandraSolrConfig.<init>(CassandraSolrConfig.java:151)
    at com.datastax.bdp.search.solr.core.CassandraCoreContainer.load(CassandraCoreContainer.java:228)
    at com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex.enableIndex(AbstractSolrSecondaryIndex.java:890)
    at com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex.lambda$getPreJoinTask$2(AbstractSolrSecondaryIndex.java:351)
ERROR [Solr CQL query thread-1] 2020-12-03 23:55:42,459  CqlSolrQueryExecutor.java:149 - Error during solr query for index employee.employee_by_id
ERROR [Solr CQL query thread-1] 2020-12-03 23:55:42,460  Message.java:895 - Unexpected exception during request; channel = [id: 0x98276777, L:/10.11.139.11:9042 - R:/10.11.143.15:46056]
org.apache.solr.common.SolrException: SolrCore 'employee.employee_by_id' is not available due to init failure: null
    at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1080)
    at com.datastax.bdp.search.solr.core.CassandraCoreContainer.getCore(CassandraCoreContainer.java:150)
    at com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.doExecute(CqlSolrQueryExecutor.java:174)
    at com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.execute(CqlSolrQueryExecutor.java:131)
    at com.datastax.bdp.cassandra.cql3.SolrQueryOperationFactory.lambda$executeSolrStatement$1(SolrQueryOperationFactory.java:124)
Caused by: org.apache.solr.common.SolrException: null
    at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.readResource(SolrCoreResourceManager.java:249)

DSE version:6.8.3 and 6.8.7

kubernetessearch
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

This exception provides the reason exactly as it states:

ERROR [Solr CQL query thread-0] 2020-12-03 23:55:22,706  Message.java:895 - Unexpected exception during request; channel = [id: 0x0f04d161, L:/10.11.139.11:9042 - R:/10.11.150.39:35936]
org.apache.solr.common.SolrException: SolrCore 'employee.employee_by_id' is not available due to init failure: null

The node cannot execute the query because the Solr core is not available -- it literally means the core is not available. :)

In my experience, the most likely cause is the Solr core failed to initialise which means that it didn't load when DSE was started. You will need to review the logs for clues as to why the core didn't load. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I realized that as well :)

the issue how to debug this specific issue, I did not found any other log to help with it.

0 Likes 0 ·

You will need to go through the log and look for the entries where the Solr core employee.employee_by_id was attempted to start. The full error + full stack trace will give you a clue as to why DSE could not load the core. Cheers!

0 Likes 0 ·