cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Solr issue

Former Member
5,393

Hi All,

I am getting following exception in console. Can anyone help me resolve this?

 WARN  [backofficeSolrIndexerDeleteCronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (backofficeSolrIndexerDeleteCronJob) [AbstractBackofficeSolrIndexerJob] Solr synchronization failed for type: Product
 de.hybris.platform.solrfacetsearch.solr.exceptions.SolrIndexNotFoundException: de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: Active index not found: {indexedType=SolrIndexedTypeModel (8796093089951@2), active=true, facetSearchConfig=SolrFacetSearchConfigModel (8796093089944@1)}
         at de.hybris.platform.solrfacetsearch.solr.impl.DefaultSolrIndexService.getActiveIndex(DefaultSolrIndexService.java:218) ~[solrfacetsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.BackofficeSolrIndexerDeleteJob.synchronizeIndexForType(BackofficeSolrIndexerDeleteJob.java:65) ~[backofficesolrsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.AbstractBackofficeSolrIndexerJob.synchronizeIndexForConfig(AbstractBackofficeSolrIndexerJob.java:110) ~[backofficesolrsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.AbstractBackofficeSolrIndexerJob.synchronizeIndexAndRemoveModifiedItems(AbstractBackofficeSolrIndexerJob.java:78) [backofficesolrsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.AbstractBackofficeSolrIndexerJob.performIndexingJob(AbstractBackofficeSolrIndexerJob.java:56) [backofficesolrsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.cron.AbstractIndexerJob.perform(AbstractIndexerJob.java:40) [solrfacetsearchserver.jar:?]
         at de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob.performCronJob(ServicelayerJob.java:38) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1390) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:814) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job.access$1(Job.java:767) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job$JobRunable.run(Job.java:686) [processingserver.jar:?]
         at de.hybris.platform.util.threadpool.PoolableThread.internalRun(PoolableThread.java:208) [coreserver.jar:?]
         at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:135) [coreserver.jar:?]
 Caused by: de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: Active index not found: {indexedType=SolrIndexedTypeModel (8796093089951@2), active=true, facetSearchConfig=SolrFacetSearchConfigModel (8796093089944@1)}
         at de.hybris.platform.servicelayer.util.ServicesUtil.validateSingleResultWithType(ServicesUtil.java:88) ~[coreserver.jar:?]
         at de.hybris.platform.servicelayer.util.ServicesUtil.validateIfSingleResult(ServicesUtil.java:47) ~[coreserver.jar:?]
         at de.hybris.platform.solrfacetsearch.daos.impl.DefaultSolrIndexDao.findActiveIndexByConfigAndType(DefaultSolrIndexDao.java:73) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.solr.impl.DefaultSolrIndexService.getActiveIndex(DefaultSolrIndexService.java:214) ~[solrfacetsearchserver.jar:?]
         ... 12 more
 INFO  [update-syngentaIndex-cronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (update-syngentaIndex-cronJob) [SolrIndexerJob] Finished indexer cronjob.
 INFO  [update-backofficeIndex-CronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (update-backofficeIndex-CronJob) [SolrIndexerJob] Started indexer cronjob.
 INFO  [update-backofficeIndex-CronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (update-backofficeIndex-CronJob) [AbstractIndexerStrategy] No active index found, FULL indexer operation must be performed before any other operation
 INFO  [update-backofficeIndex-CronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (update-backofficeIndex-CronJob) [SolrIndexerJob] Finished indexer cronjob.
 INFO  [update-syngentaIndex-cronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (update-syngentaIndex-cronJob) [SolrIndexerJob] Started indexer cronjob.
 INFO  [update-syngentaIndex-cronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (update-syngentaIndex-cronJob) [SolrIndexerJob] Finished indexer cronjob.
 WARN  [backofficeSolrIndexerDeleteCronJob::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (backofficeSolrIndexerDeleteCronJob) [AbstractBackofficeSolrIndexerJob] Solr synchronization failed for type: Product
 de.hybris.platform.solrfacetsearch.solr.exceptions.SolrIndexNotFoundException: de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: Active index not found: {indexedType=SolrIndexedTypeModel (8796093089951@2), active=true, facetSearchConfig=SolrFacetSearchConfigModel (8796093089944@1)}
         at de.hybris.platform.solrfacetsearch.solr.impl.DefaultSolrIndexService.getActiveIndex(DefaultSolrIndexService.java:218) ~[solrfacetsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.BackofficeSolrIndexerDeleteJob.synchronizeIndexForType(BackofficeSolrIndexerDeleteJob.java:65) ~[backofficesolrsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.AbstractBackofficeSolrIndexerJob.synchronizeIndexForConfig(AbstractBackofficeSolrIndexerJob.java:110) ~[backofficesolrsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.AbstractBackofficeSolrIndexerJob.synchronizeIndexAndRemoveModifiedItems(AbstractBackofficeSolrIndexerJob.java:78) [backofficesolrsearchserver.jar:?]
         at com.hybris.backoffice.solrsearch.indexer.cron.AbstractBackofficeSolrIndexerJob.performIndexingJob(AbstractBackofficeSolrIndexerJob.java:56) [backofficesolrsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.cron.AbstractIndexerJob.perform(AbstractIndexerJob.java:40) [solrfacetsearchserver.jar:?]
         at de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob.performCronJob(ServicelayerJob.java:38) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1390) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:814) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job.access$1(Job.java:767) [processingserver.jar:?]
         at de.hybris.platform.cronjob.jalo.Job$JobRunable.run(Job.java:686) [processingserver.jar:?]
         at de.hybris.platform.util.threadpool.PoolableThread.internalRun(PoolableThread.java:208) [coreserver.jar:?]
         at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:135) [coreserver.jar:?]
 Caused by: de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: Active index not found: {indexedType=SolrIndexedTypeModel (8796093089951@2), active=true, facetSearchConfig=SolrFacetSearchConfigModel (8796093089944@1)}
         at de.hybris.platform.servicelayer.util.ServicesUtil.validateSingleResultWithType(ServicesUtil.java:88) ~[coreserver.jar:?]
         at de.hybris.platform.servicelayer.util.ServicesUtil.validateIfSingleResult(ServicesUtil.java:47) ~[coreserver.jar:?]
         at de.hybris.platform.solrfacetsearch.daos.impl.DefaultSolrIndexDao.findActiveIndexByConfigAndType(DefaultSolrIndexDao.java:73) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.solr.impl.DefaultSolrIndexService.getActiveIndex(DefaultSolrIndexService.java:214) ~[solrfacetsearchserver.jar:?]
         ... 12 more

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member625836
Active Contributor

Hi ,

No search can be performed on SOlr without full indexing. Please perform it by clocking on link in warning bar in Backoffice or by triggering Index action for Solr Config for Backoffice (System > Search and Navigation > Facet Search Configurations).

You can turn on debug log level on com.hybris.backoffice.solrsearch.dataaccess.facades.DefaultSolrFieldSearchFacadeStrategy to error's stacktrace if needed.

Cheers, Jacek

Former Member

Hi

In the newer hybris version, hybris saves the solr index core information in the "SolrIndex" itemtype, where it relates the facetSearchConfig , indexType and active flag for a given core (qualifier i,e, flip,flop or direct).

You can search for instances of "SolrIndex" itemtype , for your given index type and check if the active flag is true or not. If not, either run a successful full indexing job or you can manually set active flag true on one of the instances, and then run update indexing job.

Ususally, in the 2-phase mode,when you run a full-index job for the first time, it will create a "flip" core and, after its successful completion, the "SolrIndex" object coressponding to the flip core is created and is marked as active. On second run of the full index, another core, "flop" is created, and coressponding "SolrIndex" object is created, and this one is marked as active, (Note: Active flag is removed from the previous flip->"SolrIndex" object). That, the last successful full index derives the active flag, and it keeps on toggling between flip and flop.

To run the update and delete indexing job, hybris needs to identify the active core, to perform update/delete operations. Hence, you first need to run full-indexing before you can run update/delete indexing jobs.

Hope this helps you !

Regards,

Former Member
0 Likes

, did you check if there were any instances of "SolrIndex" itemtype? We had a similar issue, when migration from old hybris 5.7 to 6.5. Might be the full indexing job is never finisihed sucessfully. There are schema changes in solr, a new field, "indexOperationid" has been added. You can check if your solr's schema.xml for backoffice and default configset has it.

Also, can you check your solr logs, when you start indexing from backoffice ?

Former Member
0 Likes

The exception is about the fact that there is no active index, that can result from a failing full indexing operation or might be other reasons. I would recommend running full indexing operations and making sure that it is successful. In case the indexing operation is not successful, the failure cause should be investigated, because this is the real problem.

Former Member
0 Likes

Not able to do indexing. Whenever I click on index button in backoffice, nothing happens.

Former Member
0 Likes

any exception in the logs?

VinayKumarS
Active Contributor
0 Likes

can you please query in below table... i think the entries were missing.

 select * from  {SolrFacetSearchConfig}


also please check if the solr server is up and running or not.

Former Member
0 Likes

There are entries in the table. and solr is running on port 8983