启动hybris示例时无法启动solr服务器

dsekswqp  于 2021-10-10  发布在  Java
关注(0)|答案(1)|浏览(390)

由于以下错误,我无法启动solr服务器。
从终端我可以看到solr启动了,但几秒钟后又停止了。
我已尝试中止运行8983的进程,但在重新启动后,同样的问题仍然存在。
从终端观察到错误日志

Jun 23, 2021 11:43:54 AM de.hybris.platform.solr.controller.commands.StartSolrServersCommand executeCommand
INFO: Starting Solr servers ...
Jun 23, 2021 11:43:54 AM de.hybris.platform.solr.controller.commands.StartSolrServerCommand getSolrServerStatus
INFO: Checking Solr server status for instance [name: default, hostname: localhost, port: 8983, mode: STANDALONE]
Jun 23, 2021 11:43:55 AM de.hybris.platform.solr.controller.commands.StartSolrServerCommand startSolrServer
INFO: Starting Solr server for instance [name: default, hostname: localhost, port: 8983, mode: STANDALONE]
Waiting up to 180 seconds to see Solr running on port 8983 [|]  
 [\]  
 [\]  
 [|]  
Started Solr server on port 8983 (pid=13880). Happy searching!

Jun 23, 2021 11:44:42 AM de.hybris.platform.solr.controller.commands.StartSolrServerCommand getSolrServerStatus
INFO: Checking Solr server status for instance [name: standalone, hostname: localhost, port: 8983, mode: STANDALONE]
Jun 23, 2021 11:44:42 AM de.hybris.platform.solr.controller.commands.StartSolrServerCommand startSolrServer
INFO: Starting Solr server for instance [name: standalone, hostname: localhost, port: 8983, mode: STANDALONE]

Port 8983 is already being used by another process (pid: 13880)
Please choose a different port using the -p option.

Jun 23, 2021 11:44:43 AM de.hybris.platform.solr.controller.commands.StartSolrServersCommand apply
SEVERE: Failed to start Solr server for instance [name: standalone, hostname: localhost, port: 8983, mode: STANDALONE]
de.hybris.platform.solr.controller.SolrControllerException: Failed to start Solr server for instance [name: standalone, hostname: localhost, port: 8983, mode: STANDALONE]
    at de.hybris.platform.solr.controller.commands.StartSolrServerCommand.startSolrServer(StartSolrServerCommand.java:137)
    at de.hybris.platform.solr.controller.commands.StartSolrServerCommand.executeCommand(StartSolrServerCommand.java:108)
    at de.hybris.platform.solr.controller.commands.StartSolrServersCommand.executeCommand(StartSolrServersCommand.java:60)
    at de.hybris.platform.solr.controller.commands.StartSolrServersCommand.apply(StartSolrServersCommand.java:35)
    at de.hybris.platform.solr.controller.commands.StartSolrServersCommand.apply(StartSolrServersCommand.java:20)
    at de.hybris.platform.solrserver.strategies.impl.DefaultSolrServerCommandExecutor.executeExternalCommand(DefaultSolrServerCommandExecutor.java:87)
    at de.hybris.platform.solrserver.strategies.impl.DefaultSolrServerCommandExecutor.executeCommand(DefaultSolrServerCommandExecutor.java:59)
    at de.hybris.platform.solrserver.strategies.impl.DefaultSolrServerController.startServers(DefaultSolrServerController.java:29)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1922)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1864)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
    at de.hybris.platform.core.HybrisContextFactory.refreshContext(HybrisContextFactory.java:88)
    at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.build(HybrisContextFactory.java:166)
    at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(HybrisContextHolder.java:122)
    at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisContextHolder.java:101)
    at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext(Registry.java:1116)
    at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(RegionCacheAdapter.java:65)
    at de.hybris.platform.cache.impl.RegionCacheAdapter.getOrAddUnit(RegionCacheAdapter.java:197)
    at de.hybris.platform.tx.Transaction$DefaultTransactionAwareCache.getOrAddUnit(Transaction.java:2220)
    at de.hybris.platform.cache.AbstractCacheUnit.get(AbstractCacheUnit.java:167)
    at de.hybris.platform.persistence.meta.MetaInformation_HJMPWrapper$MetaInformationEntityStateCacheUnit.getEntityState(MetaInformation_HJMPWrapper.java:1622)
    at de.hybris.platform.persistence.meta.MetaInformation_HJMPWrapper.loadData(MetaInformation_HJMPWrapper.java:195)
    at de.hybris.platform.persistence.meta.MetaInformation_HJMPWrapper.ejbLoad(MetaInformation_HJMPWrapper.java:122)
    at de.hybris.platform.tx.Transaction.getOrLoadTxBoundEntityInstance(Transaction.java:1774)
    at de.hybris.platform.persistence.framework.PersistencePool.findEntityByPK(PersistencePool.java:277)
    at de.hybris.platform.persistence.meta.MetaInformationManagerEJB.getGlobalMetaInformation(MetaInformationManagerEJB.java:44)
    at de.hybris.platform.persistence.meta.MetaInformationManagerEJB.getGlobalMetaInformation(MetaInformationManagerEJB.java:35)
    at de.hybris.platform.persistence.meta.MetaInformationManagerEJB.getSystemInitUpdateTimestamp(MetaInformationManagerEJB.java:115)
    at de.hybris.platform.persistence.property.DBPersistenceManager.createInfoCache(DBPersistenceManager.java:177)
    at de.hybris.platform.persistence.property.DBPersistenceManager.cache(DBPersistenceManager.java:165)
    at de.hybris.platform.persistence.property.DBPersistenceManager.cacheInfo(DBPersistenceManager.java:1122)
    at de.hybris.platform.persistence.property.DBPersistenceManager.batchLoadPersistenceInfosInternalInTX(DBPersistenceManager.java:622)
    at de.hybris.platform.persistence.property.DBPersistenceManager.loadPersistenceInfosInternalInTX(DBPersistenceManager.java:594)
    at de.hybris.platform.persistence.property.DBPersistenceManager.loadPersistenceInfosSafe(DBPersistenceManager.java:562)
    at de.hybris.platform.persistence.property.DBPersistenceManager.loadPersistenceInfos(DBPersistenceManager.java:532)
    at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:779)
    at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:725)
    at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:650)
    at de.hybris.platform.core.Registry.activateTenant(Registry.java:711)
    at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:560)
    at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:619)
    at de.hybris.platform.core.Registry.startup(Registry.java:438)
    at de.hybris.platform.core.ClassLoaderUtils.executeWithWebClassLoaderParentIfNeeded(ClassLoaderUtils.java:35)
    at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(HybrisContextLoaderListener.java:319)
    at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplicationContext(HybrisContextLoaderListener.java:205)
    at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicationContext(HybrisContextLoaderListener.java:192)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
    at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitialized(HybrisContextLoaderListener.java:88)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
vbkedwbf

vbkedwbf1#

在启动服务器之前,请尝试以下命令:

ant stopSolrServer

这将关闭已启动的solr示例

相关问题