Nacos启动报错

2年前 (2022) 程序员胖胖胖虎阿
474 0 0

Nacos启动报错问题的解决方案

nacos官网得知环境要求为jdk1.8+、maven3.2.x+,为了避免采坑,版本尽量使用官网推荐的

直接上报错,如下

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘instanceOperatorClientImpl’ defined in URL [jar:file:/G:/ad_app/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.1.0.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 with name ‘clientOperationServiceProxy’ defined in URL [jar:file:/G:/ad_app/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.1.0.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 with name ‘persistentClientOperationServiceImpl’ defined in URL [jar:file:/G:/ad_app/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.1.0.jar!/com/alibaba/nacos/naming/core/v2/service/impl/PersistentClientOperationServiceImpl.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: C:\Users\Administrator\AppData\Local\Temp\librocksdbjni7299637627324802538.dll: Can’t find dependent libraries
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$doGetBeanKaTeX parse error: Undefined control sequence: \Users at position 2985: …edLinkError: C:\̲U̲s̲e̲r̲s̲\Administrator\…doGetBeanKaTeX parse error: Undefined control sequence: \Users at position 1651: …edLinkError: C:\̲U̲s̲e̲r̲s̲\Administrator\…doGetBeanKaTeX parse error: Undefined control sequence: \Users at position 1267: …edLinkError: C:\̲U̲s̲e̲r̲s̲\Administrator\…NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:78)
at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:56)
at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:64)
at org.rocksdb.RocksDB.(RocksDB.java:35)
at com.alipay.sofa.jraft.storage.impl.RocksDBLogStorage.(RocksDBLogStorage.java:75)
at com.alipay.sofa.jraft.core.DefaultJRaftServiceFactory.createLogStorage(DefaultJRaftServiceFactory.java:50)
at com.alipay.sofa.jraft.core.NodeImpl.initLogStorage(NodeImpl.java:579)
at com.alipay.sofa.jraft.core.NodeImpl.init(NodeImpl.java:999)
at com.alipay.sofa.jraft.core.NodeImpl.init(NodeImpl.java:139)
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:269)
at com.alibaba.nacos.core.distributed.raft.JRaftProtocol.addRequestProcessors(JRaftProtocol.java:163)
at com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl.(PersistentClientOperationServiceImpl.java:95)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
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

原因分析:

系统缺少 vc++ 2015

解决方案:

1.下载地址:传送门. 下载后直接安装即可,安装完成后重启nacos 。
2.nacos默认启动为集群模式cluster,需要在启动命令后添加startup.cmd -m standalone,或者修改.bat文件
3.nacos所在路径不能有中文 。

版权声明:程序员胖胖胖虎阿 发表于 2022年10月3日 上午2:08。
转载请注明:Nacos启动报错 | 胖虎的工具箱-编程导航

相关文章

暂无评论

暂无评论...