nacos启动报错信息
ERROR Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException.
Message: 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:/D:/all_software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.1.jar!
/com/alibaba/nacos/plugin/auth/impl/NacosAuthConfig.class]: Unsatisfied dependency expressed through constructor parameter 1;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tokenManagerDelegate':
Unsatisfied dependency expressed through field 'jwtTokenManager'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'jwtTokenManager' defined in URL [jar:file:/D:/all_software/nacos/target/nacos-server.jar
!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.1.jar!/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManager.class]:
Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
[com.alibaba.nacos.plugin.auth.impl.token.impl.JwtTokenManager]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException:
the length of secret key must great than or equal 32 bytes; And the secret key must be encoded by base64.Please see
https://nacos.io/zh-cn/docs/v2/guide/user/auth.html
原因:
缺少配置了nacos.core.auth.plugin.nacos.token.secret.key
解决方案:
找到文件application.properties,编辑填写一下内容
标签:exception,启动,nacos2.2,plugin,jar,nacos,springframework,Key,impl From: https://www.cnblogs.com/niuniu0108/p/18277500