alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.39k stars 12.87k forks source link

m1 pro monterey nacos 启动失败 #7152

Closed banmajio closed 2 years ago

banmajio commented 3 years ago

m1 pro。 系统为Monterey,jdk为 zulu-8。nacos 版本2.0.1 启动失败

/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java  -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -Dnacos.member.list= -Djava.ext.dirs=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/lib/ext -Xloggc:/Users/banmajio/Devtool/nacos/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dloader.path=/Users/banmajio/Devtool/nacos/nacos/plugins/health,/Users/banmajio/Devtool/nacos/nacos/plugins/cmdb -Dnacos.home=/Users/banmajio/Devtool/nacos/nacos -jar /Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar  --spring.config.additional-location=file:/Users/banmajio/Devtool/nacos/nacos/conf/ --logging.config=/Users/banmajio/Devtool/nacos/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288

         ,--.
       ,--.'|
   ,--,:  : |                                           Nacos 2.0.1
,`--.'`|  ' :                       ,---.               Running in stand alone mode, All function modules
|   :  :  | |                      '   ,'\   .--.--.    Port: 8848
:   |   \ | :  ,--.--.     ,---.  /   /   | /  /    '   Pid: 4146
|   : '  '; | /       \   /     \.   ; ,. :|  :  /`./   Console: http://10.152.12.155:8848/nacos/index.html
'   ' ;.    ;.--.  .-. | /    / ''   | |: :|  :  ;_
|   | | \   | \__\/: . ..    ' / '   | .; : \  \    `.      https://nacos.io
'   : |  ; .' ," .--.; |'   ; :__|   :    |  `----.   \
|   | '`--'  /  /  ,.  |'   | '.'|\   \  /  /  /`--'  /
'   : |     ;  :   .'   \   :    : `----'  '--'.     /
;   |.'     |  ,     .-./\   \  /            `--'---'
'---'        `--`---'     `----'

2021-10-30 16:14:12,441 INFO Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@30457e14' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2021-10-30 16:14:12,444 INFO Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2021-10-30 16:14:12,671 INFO Tomcat initialized with port(s): 8848 (http)

2021-10-30 16:14:12,921 INFO Root WebApplicationContext: initialization completed in 2774 ms

2021-10-30 16:14:14,994 WARN Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'instanceOperatorClientImpl' defined in URL [jar:file:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)

2021-10-30 16:14:15,019 INFO Nacos Log files: /Users/banmajio/Devtool/nacos/nacos/logs

2021-10-30 16:14:15,019 INFO Nacos Log files: /Users/banmajio/Devtool/nacos/nacos/conf

2021-10-30 16:14:15,019 INFO Nacos Log files: /Users/banmajio/Devtool/nacos/nacos/data

2021-10-30 16:14:15,020 ERROR Startup errors : {}

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'instanceOperatorClientImpl' defined in URL [jar:file:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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(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.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'clientOperationServiceProxy' defined in URL [jar:file:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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 with name 'persistentClientOperationServiceImpl' defined in URL [jar:file:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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: Failed to instantiate [com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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.UnsatisfiedLinkError: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832)
    at java.lang.Runtime.load0(Runtime.java:811)
    at java.lang.System.load(System.java:1088)
    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.<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:92)
    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
2021-10-30 16:14:16,524 WARN [WatchFileCenter] start close

2021-10-30 16:14:16,524 WARN [WatchFileCenter] start to shutdown this watcher which is watch : /Users/banmajio/Devtool/nacos/nacos/conf

2021-10-30 16:14:16,524 WARN [WatchFileCenter] start to shutdown this watcher which is watch : /Users/banmajio/Devtool/nacos/nacos/data/tps

2021-10-30 16:14:16,524 WARN [WatchFileCenter] start to shutdown this watcher which is watch : /Users/banmajio/Devtool/nacos/nacos/data/loader

2021-10-30 16:14:16,525 WARN [WatchFileCenter] already closed

2021-10-30 16:14:16,525 WARN [NotifyCenter] Start destroying Publisher

2021-10-30 16:14:16,525 WARN [NotifyCenter] Destruction of the end

2021-10-30 16:14:16,525 ERROR Nacos failed to start, please see /Users/banmajio/Devtool/nacos/nacos/logs/nacos.log for more details.

2021-10-30 16:14:16,550 INFO 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2021-10-30 16:14:16,552 ERROR Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'instanceOperatorClientImpl' defined in URL [jar:file:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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(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.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'clientOperationServiceProxy' defined in URL [jar:file:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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 with name 'persistentClientOperationServiceImpl' defined in URL [jar:file:/Users/banmajio/Devtool/nacos/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.1.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: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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: Failed to instantiate [com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    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.UnsatisfiedLinkError: /private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib: dlopen(/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib, 0x0001): tried: '/private/var/folders/y5/wdkt9wtx34sdx26kxvdp7qxh0000gn/T/librocksdbjni7009795431277206760.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni7009795431277206760.jnilib' (no such file)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832)
    at java.lang.Runtime.load0(Runtime.java:811)
    at java.lang.System.load(System.java:1088)
    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.<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:92)
    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
2021-10-30 16:18:17,557 WARN [ThreadPoolManager] Start destroying ThreadPool

2021-10-30 16:18:17,557 WARN [ThreadPoolManager] Destruction of the end
onewe commented 3 years ago

@banmajio I'm sorry about that, I don't have M1. 😢 but I guess that is problem of the rocksDB. you can see this issue https://github.com/facebook/rocksdb/issues/7720

xuxingyin commented 3 years ago

@banmajio 我也遇到了 请问有找到解决办法吗?

bwangll commented 3 years ago

同样的问题,什么时候可以有解决方案

EpLiar commented 3 years ago

我在 M1 Pro Monterey 上成功启动了 nacos,以下是我的步骤,希望对你有所帮助:

  1. https://www.oracle.com/java/technologies/downloads/#java8 下载 JDK 8
  2. 安装 JDK,记下安装的位置,应该会在 /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/java
  3. 执行 sh bin/startup.sh -m standalone,然后获取启动参数,不出意外这里的虚拟机是其他方式安装的 (Homebrew, IDEA 等等)
  4. 删除启动参数中的 -Xlog:gc* 这部分
  5. 修改完后,启动 nacos

image

上图作为参考,希望对你有所帮助

yoyo837 commented 2 years ago

目的是用arm jdk 运行, 而不仅仅是运行。

Toifyx commented 2 years ago

+1 同样的问题

WeiMingzhi commented 2 years ago

同样的问题

KomachiSion commented 2 years ago

duplicate with #4336

blackwhitechen commented 2 years ago

@

我在 M1 Pro Monterey 上成功启动了 nacos,以下是我的步骤,希望对你有所帮助:

  1. https://www.oracle.com/java/technologies/downloads/#java8 下载 JDK 8
  2. 安装 JDK,记下安装的位置,应该会在 /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/java
  3. 执行 sh bin/startup.sh -m standalone,然后获取启动参数,不出意外这里的虚拟机是其他方式安装的 (Homebrew, IDEA 等等)
  4. 删除启动参数中的 -Xlog:gc* 这部分
  5. 修改完后,启动 nacos

image

上图作为参考,希望对你有所帮助

it work well

Decucin commented 1 year ago

我在装有M1芯片的mac上也遇到了这个问题,我使用的JDK版本是JDK11。 nacos官网有两种使用nacos的方式(Quick Start for Nacos里面),我在使用第二种方式(去release里面下载)的时候遇到了此问题,在我使用第一种方式(下载code,使用maven安装)后此问题得以解决,希望能帮到您。

LCBsCanBin commented 1 year ago

我在装有M1芯片的mac上也遇到了这个问题,我使用的JDK版本是JDK11。 nacos官网有两种使用nacos的方式(Quick Start for Nacos里面),我在使用第二种方式(去release里面下载)的时候遇到了此问题,在我使用第一种方式(下载code,使用maven安装)后此问题得以解决,希望能帮到您。

我通过你的方法解决了问题,感谢分享