nacos3启动问题

nacos3从官网下载下来后解压

加压后单机启动

bin目录下单机启动命令 

  • startup.cmd -m standalone

启动会遇见3个配置  那是因为conf目录下的application.properties文件没有配置Key value 和秘钥

这是具体配置信息

nacos.core.auth.server.identity.key=bmFjb3M=
nacos.core.auth.server.identity.value=bmFjb3M=

### worked when nacos.core.auth.system.type=nacos or nacos.core.auth.console.enabled=true
### The token expiration in seconds:
nacos.core.auth.plugin.nacos.token.cache.enable=false
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
### The default token (Base64 string):
#nacos.core.auth.plugin.nacos.token.secret.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
nacos.core.auth.plugin.nacos.token.secret.key=f0b214342669982f3f5b0963aa382b16b8e30c348a2af524b3401032c33f61fe

 

上边的秘钥要Base64编码 32字节以上才符合官网要求 这里用Python生成一份

import secrets

# 生成一个 32 字节的密钥(256 位)
key = secrets.token_hex(32)
print(key)
posted @ 2025-06-18 10:11  嚼_嚼_籽  阅读(125)  评论(0)    收藏  举报