启动nacos命令

版本:naocs2.0.3
环境:windows
前置条件:环境变量中配置JAVA_HOME,否则会报以下错误:

Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better!

在这里插入图片描述

以单机模式启动:

startup.cmd -m standalone

常见启动错误:

  • Can’t find dependent libraries
org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'instanceOperatorClientImpl' defined in URL [jar:file:/E:/Software/nacos-server-2.0.3/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 with name 'clientOperationServiceProxy' defined in URL [jar:file:/E:/Software/nacos-server-2.0.3/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 with name 'persistentClientOperationServiceImpl' defined in URL [jar:file:/E:/Software/nacos-server-2.0.3/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: Failed to instantiate [com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: 
C:\Users\鐔婃€濇晱\AppData\Local\Temp\librocksdbjni4782214776874896024.dll: 
Can't find dependent libraries

关键信息是:Can’t find dependent libraries
原因是当前系统缺少运行库,安装最新的 Microsoft Visual C++ 可再发行程序包版本后就能成功启动了。

  • Fail to init node, please see the logs to find the reason.
org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'instanceOperatorClientImpl' defined in URL [jar:file:/E:/Software/nacos-server-2.0.3/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 with name 'clientOperationServiceProxy' defined in URL [jar:file:/E:/Software/nacos-server-2.0.3/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 with name 'persistentClientOperationServiceImpl' defined in URL [jar:file:/E:/Software/nacos-server-2.0.3/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: 
Failed to instantiate [com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]: Constructor threw exception; nested exception is java.lang.IllegalStateException: 
Fail to init node, please see the logs to find the reason.

关键信息是:Fail to init node, please see the logs to find the reason.
原因是naocs默认不能识别中文路径,解决办法就是避免nacos路径包含中文

在这里插入图片描述
最后,从图中可以看到nacos启动成功!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值