[Solved] Solr error while hybris server startup

Scenario

Getting error creating a bean with name 'defaultSolrServerService', while Hybris server startup?
Error creating bean with name 'defaultSolrServerService' defined in class path resource [global-solrserver-spring.xml]: Invocation of init method fa ing Solr start command for instance: [name: default, port: 8983]
    ...
Solr server not yet started for instance: [name: default, port: 8983] [retry: 7, interval: 5000ms]

Root cause

OOTB (post hybris v5.5) default solr configuration ensures that a standalone Solr server is configured, started and stopped together with the platform.
When we use ctr + c to stop the Hybris instance it should also stop the solr instance. But sometime solr instance not stopped properly with it and again we try to start the Hybris server, which internally tries to instantiate solr server (which already running) again and that leads to such errors.

Troubleshoot steps to solve your issue

1. Stop and start Hybris server again - This solve the issue most of the time as hybris stopped solr instance properly this time.
2. Stop the Solr server manually - You can run the below ant command or find it's process and kill it.
ant stopSolrServer
3. Skip the Solr server error - If you really don't care about Solr for the current task you can simply add below the property. Which let you Hybris server start even there will be any error with solr server startup.
solrserver.failOnError=false
4. Setup standalone Solr server - which can be started/stopped independently from Hybris server. Refer this to setup standalone Solr server
solrserver.instances.default.autostart=false
5. try to change the port and restart
6. Check the Solr log - Still, you are not able to get the root cause, check ${HYBRIS_BIN}/ext-commerce/solrserver/resources/solr/server/logs and look for any more details.
Author Image

Ankitkumar Patel

Sr. SAP Hybris consultant, having 15+ years experience in SAP Commerce Cloud (Hybris), SAP Spartacus. Extensive experience in SAP Hybris development, third-party integrations, project architecture and design... Read more

Comments

  1. i have faced that issue by setting JAVA_HOME

    ReplyDelete

Post a Comment

Popular posts from this blog

Hybris flexible search query examples

How to remove or update all data records in Hybris?

How to Install temporary Hybris license?