Nacos2.2.1版本启动的时候报错:the length of secret key must great than or equal 32 bytes

提问者:帅平 问题分类:运维
今天给某个业务部署新的系统,因为是微服务,所以直接在线上下载的最新版的nacos,版本是2.2.1版本的,首先配置数据库,完了使用./startup.sh -m standalone启动后失败了,看日志报错:
the length of secret key must great than or equal 32 bytes

错误信息如下图:
Nacos2.2.1版本启动的时候报错:the length of secret key must great than or equal 32 bytes
1 个回答
你我这辈子最的依靠
你我这辈子最的依靠
Nacos2.x版本在部署安装的时候目前需要配置一个随机参数作为nacos的加密密钥,这一般是没有配置导致,可以在${nacos_home}/conf/application.properties文件中找到nacos.core.auth.plugin.nacos.token.secret.key 这个key进行配置即可,配置的话,可以在后面随便填写两个个md5值,例如:
nacos.core.auth.plugin.nacos.token.secret.key=3989b2a6810ec51b6bb07468c7112cac3989b2a6810ec51b6bb07468c7112cac

然后再启动即可,注意这里是写2个md5,只有1个md5会导致长度不够,仍然启动不起来。
发布于:1年前 (2023-03-08) IP属地:四川省
我来回答