我用的当前最新版 nacos-server-2.2.1.tar.gz
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
很明显,报错原因是secret key参数 长度不够
打开nacos文件夹 -> conf -> application.properties
vim conf/application.properties
- 找到以下配置:
nacos.core.auth.plugin.nacos.token.secret.key=
在后面添加随机参数作为nacos的加密密钥,规则是加密密钥长度 >=256
bits 或者 >= 32 bytes


网友评论