当前位置: 代码迷 >> 综合 >> nacos-serve:2.0.3使用
  详细解决方案

nacos-serve:2.0.3使用

热度:88   发布时间:2023-12-13 04:10:16.0

从官网下载nacos:2.0.3,官网地址:https://github.com/alibaba/nacos/releases

本来想下最新的2.0.4,但是github一直下载失败,就下了2.0.3版本的。

解压后直接运行nacos/bin/startup.cmd,报错: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

解决方法:先把cluster集群启动模式,改成单机模式,修改startup.cmd文件

rem set MODE="cluster"
set MODE="standalone"

再启动服务,继续报错如下

Error creating bean with name 'instanceOperatorClientImpl' defined in URL [jar:file:/D:/JAVAWEB/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:/D:/JAVAWEB/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:/D:/JAVAWEB/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.

把网上各种方式尝试一遍都不好用,最后对比1.4.3版本的能正常启动的,发现是项目路径上有中文,修改路径在启动,一切正常。

参考链接:https://www.cnblogs.com/rookiemzl/p/13814919.html

  相关解决方案