Nacos 启动失败 Failed to instantiate [com.alibaba.nacos.core.c luster.ServerMemberManager]: Constructor threw exception; nested exception is ErrCode:500, ErrMsg:jmenv.t bsite.net
Nacos启动失败:
Failed to instantiate [com.alibaba.nacos.core.c luster.ServerMemberManager]: Constructor threw exception; nested exception is ErrCode:500, ErrMsg:jmenv.t bsite.net
原因:
集群环境,nacos
启动时候报错,原因:缺少cluster.conf
文件
解决办法:
在conf下创建cluster.conf
文件
报错详情:
2022-11-10 17:46:55,042 ERROR Startup errors :
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is
org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(Serv
letWebServerApplicationContext.java:156)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationCont
ext.java:544)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(Servle
tWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204)
at com.alibaba.nacos.Nacos.main(Nacos.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:1
24)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(
TomcatServletWebServerFactory.java:416)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(Tomcat
ServletWebServerFactory.java:180)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServe
r(ServletWebServerApplicationContext.java:180)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(Serv
letWebServerApplicationContext.java:153)
... 16 common frames omitted
n instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiatio
nException: Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory
method 'distroFilterRegistration' threw exception; nested exception is org.springframework.beans.factory.
UnsatisfiedDependencyException: Error creating bean with name 'distroFilter': Unsatisfied dependency expr
essed through field 'distroMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDepe
ndencyException: Error creating bean with name 'distroMapper' defined in URL [jar:file:/data/app/nacos/ta
rget/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.4.jar!/com/alibaba/nacos/naming/core/DistroMapper.cl
ass]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springfra
mework.beans.factory.BeanCreationException: Error creating bean with name 'serverMemberManager' defined i
n URL [jar:file:/data/app/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-core-2.0.4.jar!/com/alibaba/n
acos/core/cluster/ServerMemberManager.class]: Bean instantiation via constructor failed; nested exception
is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.core.c
luster.ServerMemberManager]: Constructor threw exception; nested exception is ErrCode:500, ErrMsg:jmenv.t
bsite.net
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.
java:627)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(Co
nstructorResolver.java:456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingF
actoryMethod(AbstractAutowireCapableBeanFactory.java:1318)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstanc
e(AbstractAutowireCapableBeanFactory.java:1158)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(Abst
ractAutowireCapableBeanFactory.java:554)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Abstra
ctAutowireCapableBeanFactory.java:514)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanF
actory.java:321)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSin
gletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.ja
va:319)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java
:204)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(Serv
letContextInitializerBeans.java:211)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(Serv
letContextInitializerBeans.java:202)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializ
erBeans(ServletContextInitializerBeans.java:96)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextIniti
alizerBeans.java:85)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletCont
extInitializerBeans(ServletWebServerApplicationContext.java:253)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize
(ServletWebServerApplicationContext.java:227)
at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5128)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:1
05)
... 21 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframewo
rk.boot.web.servlet.FilterRegistrationBean]: Factory method 'distroFilterRegistration' threw exception; n
ested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean
with name 'distroFilter': Unsatisfied dependency expressed through field 'distroMapper'; nested exception
is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dist
roMapper' defined in URL [jar:file:/data/app/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0
.4.jar!/com/alibaba/nacos/naming/core/DistroMapper.class]: Unsatisfied dependency expressed through const
ructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error cr
eating bean with name 'serverMemberManager' defined in URL [jar:file:/data/app/nacos/target/nacos-server.
jar!/BOOT-INF/lib/nacos-core-2.0.4.jar!/com/alibaba/nacos/core/cluster/ServerMemberManager.class]: Bean i
nstantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationExcep
tion: Failed to instantiate [com.alibaba.nacos.core.cluster.ServerMemberManager]: Constructor threw excep
tion; nested exception is ErrCode:500, ErrMsg:jmenv.tbsite.net
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstan
--More--
改行去放羊