首页 > 其他分享 >Nacos 2.2.1 版本下载启动报错问题解决

Nacos 2.2.1 版本下载启动报错问题解决

时间:2023-03-22 22:36:38浏览次数:49  
标签:core Nacos auth nacos token 报错 2.2 server ###

先上错误问题

这个报错我在网上找了~~~ 每个人都在说五花八门的, 接近真相但却不是!!!!!

接下来 由我补充

  1. nacos-server-2.2.1\nacos\bin\startup.cmd 文件 修改nacos模式

修改的好处在win下 你可以直接双击启动 不需要 .\startup.cmd -m standalone 命令

当然也可以直接.\startup.cmd -m standalone 命令启动

  1. nacos-server-2.2.1\nacos\conf\application.properties 文件 看名字就知道是配置文件

先上官方文档 https://nacos.io/zh-cn/docs/v2/guide/user/auth.html

截图出重点

按照文档修改

### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false.
### 翻译:  从 1.4.1 开始,在 nacos.core.auth.enabled=true 和 nacos.core.auth.enable.userAgentAuthWhite=false 时工作。
### The two properties is the white list for auth and used by identity the request from other server.
### 翻译:  这两个属性是用于身份验证的白名单,用于标识来自其他服务器的请求。
nacos.core.auth.server.identity.key=xxxx
nacos.core.auth.server.identity.value=xxxx

### worked when nacos.core.auth.system.type=nacos
### The token expiration in seconds:
nacos.core.auth.plugin.nacos.token.cache.enable=true
nacos.core.auth.plugin.nacos.token.expire.seconds=18000

### The default token (Base64 String): 自定义密钥时  官方在2.2.1版本后,社区发布版本将移除以文档如下值作为默认值,需要自行填充,否则无法启动节点。 此处采用官方默认
nacos.core.auth.plugin.nacos.token.secret.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg

到此 完美启动

                                                                                                              

标签:core,Nacos,auth,nacos,token,报错,2.2,server,###
From: https://www.cnblogs.com/freedomlog/p/17245722.html

相关文章