nacos启动失败
1.集群cluster模式改为单机standalone
修改bin/startup.cmd文件 set MODE="cluster" 改为 set MODE="standalone"
2.密钥长度不够“the length of secret key must great than or equal 32 bytes; ”
转到官网查看一些配置,发现 nacos.core.auth.plugin.nacos.token.secret.key
这项配置在 2.2.0.1 版本中不再配置默认值
参数名 | 默认值 | 启止版本 | 说明 |
---|---|---|---|
nacos.core.auth.plugin.nacos.token.secret.key | SecretKey012345678901234567890123456789012345678901234567890123456789(2.2.0.1后无默认值) | 2.1.0 ~ latest | 默认鉴权插件用于生成用户登陆临时accessToken所使用的密钥,使用默认值有安全风险 |
了解这些后在 nacos/conf/application.properties
配置文件中配置它再启动就可以了:
nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789