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 版本一致
相关推荐
燃犀知不可乎骤得28 分钟前
qt控制台程序与qt窗口程序在读取数据库中文字段的差异!!巨坑
开发语言·数据库·qt
是数学系的小孩儿1 小时前
20250531MATLAB三维绘图
开发语言·数学·matlab·电脑
oioihoii1 小时前
C++和C#界面开发方式的全面对比
开发语言·c++·c#
2301_768350231 小时前
Redis缓存-数据淘汰策略
数据库·redis·缓存
x_feng_x1 小时前
Java从入门到精通 - 常用API(一)
java·开发语言·python
Dovis(誓平步青云)1 小时前
C++ Vector算法精讲与底层探秘:从经典例题到性能优化全解析
开发语言·c++·经验分享·笔记·算法
GUIQU.2 小时前
【Oracle】DCL语言
数据库·oracle
钢铁男儿3 小时前
C# 类和继承(使用基类的引用)
java·javascript·c#
czliutz3 小时前
NiceGUI 是一个基于 Python 的现代 Web 应用框架
开发语言·前端·python
HHBon5 小时前
判断用户输入昵称是否存在(Python)
linux·开发语言·python