0


nacos启动失败(解决方法汇总)

安装nacos 报错

org.springframework.beans.factory.UnsatisfiedDependencyException:Error creating bean withname 'instanceOperatorClientImpl' defined in URL[jar:file:/H:/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.3.jar!/com/alibaba/nacos/naming/core/InstanceOperatorClientImpl.class]:Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:Error creating bean withname 'clientOperationServiceProxy' defined in URL[jar:file:/H:/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.3.jar!/com/alibaba/nacos/naming/core/v2/service/ClientOperationServiceProxy.class]:Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException:Error creating bean withname 'persistentClientOperationServiceImpl' defined in URL[jar:file:/H:/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.3.jar!/com/alibaba/nacos/naming/core/v2/service/impl/PersistentClientOperationServiceImpl.class]:Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]:Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1338)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:514)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:866)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.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(NativeMethod)
        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.beans.factory.UnsatisfiedDependencyException:Error creating bean withname 'clientOperationServiceProxy' defined in URL[jar:file:/H:/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.3.jar!/com/alibaba/nacos/naming/core/v2/service/ClientOperationServiceProxy.class]:Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException:Error creating bean withname 'persistentClientOperationServiceImpl' defined in URL[jar:file:/H:/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.3.jar!/com/alibaba/nacos/naming/core/v2/service/impl/PersistentClientOperationServiceImpl.class]:Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]:Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1338)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:514)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1196)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)...27 common frames omitted
Caused by:org.springframework.beans.factory.BeanCreationException:Error creating bean withname 'persistentClientOperationServiceImpl' defined in URL[jar:file:/H:/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.3.jar!/com/alibaba/nacos/naming/core/v2/service/impl/PersistentClientOperationServiceImpl.class]:Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]:Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:304)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:285)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1338)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:514)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1196)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)...41 common frames omitted
Caused by:org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]:Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:187)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:300)...55 common frames omitted
Caused by:java.lang.ExceptionInInitializerError:null
        at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:64)
        at org.rocksdb.RocksDB.<clinit>(RocksDB.java:35)
        at com.alipay.sofa.jraft.storage.impl.RocksDBLogStorage.<clinit>(RocksDBLogStorage.java:75)
        at com.alipay.sofa.jraft.core.DefaultJRaftServiceFactory.createLogStorage(DefaultJRaftServiceFactory.java:50)
        at com.alipay.sofa.jraft.core.NodeImpl.initLogStorage(NodeImpl.java:571)
        at com.alipay.sofa.jraft.core.NodeImpl.init(NodeImpl.java:991)
        at com.alipay.sofa.jraft.core.NodeImpl.init(NodeImpl.java:138)
        at com.alipay.sofa.jraft.RaftServiceFactory.createAndInitRaftNode(RaftServiceFactory.java:47)
        at com.alipay.sofa.jraft.RaftGroupService.start(RaftGroupService.java:129)
        at com.alibaba.nacos.core.distributed.raft.JRaftServer.createMultiRaftGroup(JRaftServer.java:268)
        at com.alibaba.nacos.core.distributed.raft.JRaftProtocol.addRequestProcessors(JRaftProtocol.java:163)
        at com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl.<init>(PersistentClientOperationServiceImpl.java:95)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:175)...57 common frames omitted
Caused by:java.lang.UnsupportedOperationException:Cannot determine JNI library name forARCH='x86'OS='windows 10' name='rocksdb'
        at org.rocksdb.util.Environment.getJniLibraryName(Environment.java:88)
        at org.rocksdb.NativeLibraryLoader.<clinit>(NativeLibraryLoader.java:19)

就这一类问题

解决思路

1.检查本地jdk版本 是不是64位的

只需输入java -version您的控制台。

如果一个64位版本正在运行,您会收到如下消息:

java version “1.6.0_18”
Java™ SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot™ 64-Bit Server VM (build 16.0-b13, mixed mode)
一个32位版本将显示类似于:

java version “1.6.0_41”
Java™ SE Runtime Environment (build 1.6.0_41-b02)
Java HotSpot™ Client VM (build 20.14-b01, mixed mode, sharing)
请注意,Client而不是64-Bit Server在第三行。这Client/Server部分是无关紧要的,这是没有64-Bit重要的。

2.检查环境变量JAVA_HOME是否正确

3.检查本地mysql是否安装正常,并且给本地创建nacos文件夹里sql在这里插入图片描述

如果没有 那么给本地数据库创建一个名为 nacos 的数据库 然后执行这个sql文件,并且将application.properties文件中的改正确
在这里插入图片描述

注意:这个文件夹默认数据是被注释掉的,你得改回来!!!!

4.nacos路径不要放在包含中文的路径下

5.检查是否是standalone 启动

在这里插入图片描述

6.检查端口是否被占用

最后 大概率是版本不匹配导致的,jdk和nacos的版本!!!

nacos:

链接:https://pan.baidu.com/s/160gQjYfIRIhGh77oAj4SJA
提取码:fg7h

jdk:

链接:https://pan.baidu.com/s/12-YZ3AEPYJhaWWQQdssNNA
提取码:i8tf

mysql:

链接:https://pan.baidu.com/s/1qPQXidyeMwCcR7j8WGbf6g
提取码:8dnj


本文转载自: https://blog.csdn.net/qq_37182915/article/details/129148350
版权归原作者 一吃就胖的 所有, 如有侵权,请联系我们删除。

“nacos启动失败(解决方法汇总)”的评论:

还没有评论