美文网首页
mac 上启动nacos报错

mac 上启动nacos报错

作者: ag4kd | 来源:发表于2023-03-27 11:08 被阅读0次

我用的当前最新版 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

image.png

https://base64.us/

image-20230324152920946.png

http://localhost:8848/nacos/index.html#/login

相关文章

网友评论

      本文标题:mac 上启动nacos报错

      本文链接:https://www.haomeiwen.com/subject/iqqzrdtx.html