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

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

svintha
Explorer
0 Likes
7,291

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]

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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

mpern
Product and Topic Expert
Product and Topic Expert
0 Likes

Cool! Thank you for the writeup of the steps you took.

FYI, ls -la should shows all files, no need for sudo ;)

Former Member
0 Likes

Thanks Markus, good call!

Answers (7)

Answers (7)

Former Member

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

former_member690226
Discoverer
0 Likes

Thanks its helped me

arvind-kumar_avinash
Active Contributor
0 Likes

Isn't the answer by worth your upvote? :)

0 Likes

I am facing this issue when i am migrating from hybris 6.4 to 6.7 I copied the solr folder from 6.4 to 6.7 and now its giving this issue solr didnt start in 30 secs , i checked the logs and it says

[ x:master_sps_Product_flip] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: ERROR: [doc=ProductCatalog_2017-2018/Staged/BSK] unknown field 'spellcheck_nl'

Former Member
0 Likes

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.

former_member637190
Discoverer
0 Likes

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

0 Likes

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.

svintha
Explorer
0 Likes

Hi If the process is already running then it would give an error saying that the port is currently being used by other process . This is some thing different than that . In fact we have changed the solr running process id but no luck . solrserver.instances.default.port=8984

Former Member
0 Likes

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

Thanks, selva.

Former Member
0 Likes

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,

svintha
Explorer
0 Likes

Hi thanks for your reply . We installed the recipe in a correct way. In fact OOTB store front and search is everything is working fine for few days . But all of sudden it started showing this error during the server start up .

0 Likes

Do you have multiple hybris instances running in your local? Are you switching between two hybris instances? Like stopping hybris in one installation and starting hybris in another installation. In such cases Solr might not shutdown correctly. Make sure to invoke https://localhost:8983/solr/#/ from browser and find out which hybris installation solr is running. You coud stop solr manually using ant stopSolrServer from the command line.

Former Member
0 Likes

Hi Nagaraju,

I had same issue with my toolkit, i gone through your comment and did the same like stopped the solr server and restlso has been done. But getting same exception while doing server startup.

Please help me on this if there is any alternative to omit the exception .

Thanks in Advance.

0 Likes

Hi Prasad, Can you post the complete stack trace of your error?

Thank you!

mpern
Product and Topic Expert
Product and Topic Expert
0 Likes

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

svintha
Explorer
0 Likes

Hi , Still the same problem, I have killed the java from the running processed from the task manager . please find the attached file which is exactly taken during the server startup time. Hybris Tomcat error file

Former Member
0 Likes

Hello sai i'm also facing same issue please tell me how to solve this issue .

Note i tried: solrserver.instances.default.autostart=false default it's true

Thanks, selva.