随笔 - 253,  文章 - 0,  评论 - 29,  阅读 - 25万
nacos启动报错信息
1
ERROR Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. <br>Message: Error creating bean with name 'basicAuthenticationFilter' defined in class path resource <br>[com/alibaba/nacos/prometheus/filter/PrometheusAuthFilter.class]: Unsatisfied dependency expressed through method 'basicAuthenticationFilter' parameter 0; <br>nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig' <br>defined in URL [jar:file:/D:/all_software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.1.jar!<br>/com/alibaba/nacos/plugin/auth/impl/NacosAuthConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; <br>nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tokenManagerDelegate': <br>Unsatisfied dependency expressed through field 'jwtTokenManager'; nested exception is org.springframework.beans.factory.BeanCreationException: <br>Error creating bean with name 'jwtTokenManager' defined in URL [jar:file:/D:/all_software/nacos/target/nacos-server.jar<br>!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.1.jar!/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManager.class]: <br>Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate <br>[com.alibaba.nacos.plugin.auth.impl.token.impl.JwtTokenManager]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: <br>the length of secret key must great than or equal 32 bytes; And the secret key  must be encoded by base64.Please see <br>https://nacos.io/zh-cn/docs/v2/guide/user/auth.html

 

原因:

缺少配置了nacos.core.auth.plugin.nacos.token.secret.key

解决方案:

找到文件application.properties,编辑填写一下内容

 

posted on   田坤坤  阅读(260)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示