admin 管理员组文章数量: 1103785
nacos启动时报错:/alibaba/nacos/config/server/monitor/MemoryMonitor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncNotifyService': Unsatisfied dependency expressed through field 'dumpService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure :
No DataSource set
网上查询都指出是application.properties文件下mysql设置有问题导致连接失败,设置的连接地址、用户名密码等没有问题。尝试了以下方法未解决:
1、db.url、db.user、db.password后面都加.0,即改为:db.url.0=jdbc:mysql://127.0.0.1:3306,db.user.0=root,db.password.0=123456。在前面配置中有db.num=1,加.0以后指定数据库序号。出错时已有该配置,未解决
2、db.url增加配置:&serverTimezone=UTC,指定时区;或调大超时时间:&connectTimeout=1000,尝试增加配置并调大时间为5000秒,未解决
3、本地mysql数据库为8.0,增加配置:db.driver-class-name=com.mysql.cj.jdbc.Driver,未解决
按以下方式解决:
db.url.0增加配置:&allowPublicKeyRetrieval=true,保存后重新启动nacos解决。
以下方式未尝试:
修改default_authentication_plugin设置,在my.ini中增加[mysqld]default_authentication_plugin=mysql_native_password,然后mysql命令行执行ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';最后在url中添加时区参数serverTimezone=Asia/Shanghai。
本文标签: 报错 解决方法 dependency Unsatisfied Nacos
版权声明:本文标题:nacos启动报错解决方法:Unsatisfied dependency expressed through constructor parameter 0; nested exception is 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.520sys.cn/xp/1755026811a1458448.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论