gtag

Hybris Server Startup issue


 Hybris Server Startup issue : Detected different Solr server running on the same port for instance

Log:

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: Detected different Solr server running on the same port for instance: [name: default, port: 8983]


Explanation:


The solr comes as a standalone server. When we stop hybris server by ctrl+c from the command prompt, the hybris server communicates to the solr server to stop. Sometimes, due to this hard stop, the communication might not be established from the hybris server to the solr server, which in turn results in a a hung state. Now, when we restart the hybris server the (already) started solr server is not able to instantiate/register the (bean) services which are required by the hybris server to communicate with the solr and hence the hybris server does not gets back the signal that the (solr) services have been initialized in the solr context.
You can check in the processlist of the server on the port (default 8983) and you will find the solr server running (in actually a non-responsive mode)
Solution: Please do ant clean all and try again. You would be able to successfully restart the server

Under the following folder directory, you can see the solr.xml. In that you can modify the port number of solr server.

hybris\config\solr\instances\default\solr.xml

<solr>
    <str name="configSetBaseDir">${configSetBaseDir:./configsets}</str>
    <str name="coreRootDirectory">${coreRootDirectory:./cores}</str>

    <solrcloud>
        <str name="host">${host:}</str>
        <int name="hostPort">${jetty.port:8983}</int>
        <str name="hostContext">${hostContext:solr}</str>

        <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>

        <int name="zkClientTimeout">${zkClientTimeout:30000}</int>
        <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int>
        <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int>
    </solrcloud>

    <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
        <int name="socketTimeout">${socketTimeout:600000}</int>
        <int name="connTimeout">${connTimeout:60000}</int>
    </shardHandlerFactory>
</solr>

 

4 comments:

  1. stiil I am faxing the issue after ant clean all.any solution

    ReplyDelete
  2. In my case, there were two opened command lines for different hybris copies. After closed one of them, the server started succesfully

    ReplyDelete
  3. got same error after "ant clean all"
    any alternate solution is there

    ReplyDelete