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

Solr - Unable to reference by IP

nicolabeghin-263
Product and Topic Expert
Product and Topic Expert
0 Kudos
866

Hi everyone we're facing a strange issue with an Hybris Commerce 6.6.0.3 Solr server. We need to switch our SolrConfig from localhost reference

from https://localhost:8983 to https://10.0.50.21:8983

The latter is not working, even if IP address points to the local machine. Networking issues have been checked already. Any hint about this?

 ERROR [0000040K::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (0000040K) [SolrStandaloneSearchProvider] org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: https://10.0.50.21:8983/solr
 WARN  [0000040K::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (0000040K) [SolrIndexerJob] Error during indexer call: clientIndex
  de.hybris.platform.solrfacetsearch.indexer.exceptions.IndexerException: de.hybris.platform.solrfacetsearch.solr.exceptions.SolrServiceException: Could not check index status: index=master_client_Product_default, nodes=[https://10.0.50.21:8983/solr]
         at de.hybris.platform.solrfacetsearch.indexer.listeners.IndexerOperationListener.afterPrepareContext(IndexerOperationListener.java:97) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexerContextFactory.executeAfterPrepareListeners(DefaultIndexerContextFactory.java:168) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexerContextFactory.prepareContext(DefaultIndexerContextFactory.java:97) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.strategies.impl.AbstractIndexerStrategy.doExecute(AbstractIndexerStrategy.java:156) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.strategies.impl.AbstractIndexerStrategy.execute(AbstractIndexerStrategy.java:124) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexerService.performFullIndex(DefaultIndexerService.java:68) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.cron.SolrIndexerJob.indexItems(SolrIndexerJob.java:78) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.cron.SolrIndexerJob.performIndexingJob(SolrIndexerJob.java:57) [solrfacetsearchserver.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.solrfacetsearch.solr.exceptions.SolrServiceException: Could not check index status: index=master_client_Product_default, nodes=[https://10.0.50.21:8983/solr]
         at de.hybris.platform.solrfacetsearch.solr.impl.SolrStandaloneSearchProvider.createIndex(SolrStandaloneSearchProvider.java:144) ~[solrfacetsearchserver.jar:?]
         at de.hybris.platform.solrfacetsearch.indexer.listeners.IndexerOperationListener.afterPrepareContext(IndexerOperationListener.java:86) ~[solrfacetsearchserver.jar:?]
         ... 15 more
 

thanks nicola

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, are you using SSL?

nicolabeghin-263
Product and Topic Expert
Product and Topic Expert
0 Kudos

hi yes we are, with standard hybris-provided certificate. we tried with http://10.0.50.21:8983/solr too (without httpS) but the error is the same

Former Member
0 Kudos

Yes, standard hybris certificates were generated only for a development purposes and will work only on localhost. While generating you need to specify the URL. In this case you either need to use localhost or generate new certificates.

nicolabeghin-263
Product and Topic Expert
Product and Topic Expert
0 Kudos

thanks for the clarification, but I assumed this wasn't the case since we tried to access without httpS too. shouldn't that take certificates out from the equation?

Former Member
0 Kudos

try with removing all the authentication and ssl. remove security.json from the file system (../config/solr/instances/default) and in the local.properties set:

solrserver.instances.default.ssl.enabled=false solrserver.instances.default.ssl.keyStorePassword= solrserver.instances.default.ssl.trustStorePassword= solrserver.instances.default.zk.prop.urlScheme=http

where default is a name of the instance. then you need to reconfigure in the backoffice - urls (http://10.0.50.21:8983/solr) and client configuration - empty login and password.

nicolabeghin-263
Product and Topic Expert
Product and Topic Expert
0 Kudos

thanks A LOT!!!

Answers (1)

Answers (1)

nicolabeghin-263
Product and Topic Expert
Product and Topic Expert
0 Kudos

As suggested by it's enough to disable Solr SSL to get the Solr server working as expected when invoked by IP, since the self-signed certificate is issues for localhost only. In our case the Solr server is behind the LAN so no need for SSL. ref. https://help.hybris.com/6.7.0/hcd/21f689cf7c71485c9a45df03c74064e6.html

 solrserver.instances.default.ssl.enabled=false
 solrserver.instances.default.ssl.keyStorePassword=
 solrserver.instances.default.ssl.trustStorePassword=
 solrserver.instances.default.zk.prop.urlScheme=http

If you still need to use SSL for Solr, generate a new self-signed SSL certificate binded to all the IPs you need http://lucene.apache.org/solr/guide/7_1/enabling-ssl.html

nicolabeghin-263
Product and Topic Expert
Product and Topic Expert
0 Kudos

As an additional pointer for issues with Solr after ant production: these 2 lines made Solr not reachable anymore.

 #don't use additional trust store on the production environment
 additional.javax.net.ssl.trustStore=
 additional.javax.net.ssl.trustStorePassword=