Skip to Content

Error creating bean with name 'defaultSolrServerService' defined in class path resource [global-solrserver-spring.xml]

Hi , I am getting below error during the server start in OOTB V6.6.0.0 , Solr is not starting by default

INFO [localhost-startStop-1] [DefaultSolrServerService] Starting Solr server for instance [name: default, hostname: localhost, port: 8983] SET was unexpected at this time. ERROR [localhost-startStop-1] [DefaultSolrServerService] de.hybris.platform.solrserver.SolrServerException: Error while executing Solr start command for instance [name: default, hostname: localhost, port: 8983] WARN [localhost-startStop-1] [CloseAwareApplicationContext] **

**: Invocation of init method failed; nested exception is de.hybris.platform.solrserver.SolrServerException: Error while executing Solr start command for instance [name: default, hostname: localhost, port: 8983] WARN [localhost-startStop-1] [CloseAwareApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultSolrServerService' defined in class path resource [global-solrserver-spring.xml]: Invocation of init method failed; nested exception is de.hybris.platform.solrserver.SolrServerException: Error while executing Solr start command for instance [name: default, hostname: localhost, port: 8983] ERROR [localhost-startStop-1] [HybrisContextFactory] Error initializing global application context! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultSolrServerService' defined in class path resource [global-solrserver-spring.xml]: Invocation of init method failed; nested exception is de.hybris.platform.solrserver.SolrServerException: Error while executing Solr start command for instance [name: default, hostname: localhost, port: 8983] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 07, 2018 at 10:19 PM

    SOLVED link text

    I've been plagued with this issue for some time now and I'm happy to report that I have finally found the root cause of this issue.

    For a detailed explanation, including a temporary solution/workaround, root cause, steps to reproduce, versions affected, etc, please see attachment as I was unable to fit it all in this comment.

    Hope this helps!

    Thanks, Aaron


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2018 at 11:45 AM

    I had same issue after migration to 6.7.0. i solved it by deleting the folder "config/solr/instances/default"

    He is regenerated when the server is started

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 21, 2018 at 12:12 PM

    Sometimes a old solr process still lingers around, a quick killall -9 java usually fixes that and you can start the platform including solr again.

    If it doesn't fix it, please attach the full stacktrace (or startup log) to find the root cause.

    EDIT

    Looks like you get a non-zero exitcode when starting the solr.

    add the following to your local.properties:

     log4j2.logger.solr.name=de.hybris.platform.solrserver.impl.AbstractSolrServerController
     log4j2.logger.solr.level=ALL
    
    

    and then stgain. This should give you some more details.

    And also, try to use the latest pach version of 6.6. And please, use plain text files for logs, not PDFs

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 21, 2018 at 07:17 PM

    Hi Sai,

    There seems to be something wrong with your setup, could you please check in the gradle recipe if you have followed all the steps, have you installed all the addons required for the storefront. Also please check if you have included all the required extensions in the localextension.xml . I am sure there is some thing that you missed.

    thanks,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2018 at 11:01 AM

    I'm also facing same Issue please help me on this one ?

    Thanks, selva.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 05, 2018 at 01:28 PM

    HI,

    This issue seems to be like some other process is running on 8983 port, so solr cant use the specific port. try finding the pid (process-id) that is running on 8983 port and kill the process and then try again.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2019 at 08:05 PM

    I had the same error and when enabled the full log for solr, I saw a message related to not run solr with root user, I changed the user executing Hybris and it worked.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi I also got same exception while using Linux system
      WARNING: Starting Solr as the root user is a security risk and not considered best practice. Exiting. (it seems user doesn't have permission need to Start solr forcefully )

      I tried in different way ,it is also got Success by making Auto start up false: #properties solrserver.instances.default.autostart=false solrserver.instances.standalone.autostart=false solrserver.instances.cloud.autostart=false

      I have started Server Explicitly by putting autostart =false need to start server Explicitly from bellow Location forcefully hybris/bin/ext-commerce/solrserver/resources/solr/bin

      Command: ./solr start -p 8983 -force

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.