nacos启动报错 java.lang.RuntimeException: [db-load-error]load jdbc.properties error

以standalone mode sh startup.sh -m standalone 为例子 启动nacos 报错:

java 复制代码
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:142)
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:104)
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:479)
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:211)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:182)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160)
	... 16 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'basicAuthenticationFilter' defined in class path resource [com/alibaba/nacos/prometheus/filter/PrometheusAuthFilter.class]: Unsatisfied dependency expressed through method 'basicAuthenticationFilter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig' defined in URL [jar:file:/Users/edison/software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.3.jar!/com/alibaba/nacos/plugin/auth/impl/NacosAuthConfig.class]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)

去到nacos/conf/application.properties 查看配置信息

  1. 检查配置nacos文件中的 db 连接信息是否正确
  2. 是否全部放开mySQL的配置信息
  3. 查看你当前nacos版本中 nacos-server.jar 的mysql 驱动是否和你的mysql 版本一致
相关推荐
咖啡啡不加糖4 分钟前
暴力破解漏洞与命令执行漏洞
java·后端·web安全
风象南7 分钟前
SpringBoot敏感配置项加密与解密实战
java·spring boot·后端
九皇叔叔16 分钟前
【7】PostgreSQL 事务
数据库·postgresql
DKPT17 分钟前
Java享元模式实现方式与应用场景分析
java·笔记·学习·设计模式·享元模式
kk在加油19 分钟前
Mysql锁机制与优化实践以及MVCC底层原理剖析
数据库·sql·mysql
Percep_gan26 分钟前
idea的使用小技巧,个人向
java·ide·intellij-idea
缘来是庄26 分钟前
设计模式之迭代器模式
java·设计模式·迭代器模式
Humbunklung28 分钟前
Rust方法语法:赋予结构体行为的力量
开发语言·后端·rust
Liudef0632 分钟前
基于HTML与Java的简易在线会议系统实现
java·前端·html
萧曵 丶34 分钟前
Rust 内存结构:深入解析
开发语言·后端·rust