Nacos 2.2.1启动报错

错误信息:

The specified key byte array is 248 bits which is not secure enough

for any JWT HMAC-SHA algorithm. The JWT JWA Specification (RFC 7518,

Section 3.2) states that keys used with HMAC-SHA algorithms MUST have

a size >= 256 bits (the key size must be greater than or equal to the

hash output size). See

https://tools.ietf.org/html/rfc7518#section-3.2 for more information.

翻译如下:

指定的密钥字节数组是248位,这对于任何JWT HMAC-SHA算法来说都不够安全。JWT JWA规范(RFC

7518,第3.2节)规定,与HMAC-SHA算法一起使用的密钥必须具有>=256位的大小(密钥大小必须大于或等于哈希输出大小)。看见https://tools.ietf.org/html/rfc7518#section-3.2了解更多信息。

解决办法:

修改 Nacos/config 文件夹里面 application.properties 文件,在大约第156行:

yaml 复制代码
### The default token (Base64 String):
nacos.core.auth.plugin.nacos.token.secret.key= [建议50位以上base64编码]
相关推荐
丸子哥哥6 分钟前
同一个域名,如何添加多个网站?
服务器·前端·nginx·微服务
J***516830 分钟前
Linux安装Redis以及Redis三种启动方式
linux·redis·bootstrap
4***175435 分钟前
Linux 下安装 Golang环境
linux·运维·golang
Lenyiin36 分钟前
《 Linux 修炼全景指南: 七 》 指尖下的利刃:深入理解 Vim 的高效世界
linux·运维·服务器·vim·lenyiin
sulikey3 小时前
Linux基础指令与权限管理深度解析:从入门到精通
linux·运维·服务器·ubuntu·centos·linux命令·linux权限
s***46983 小时前
linux 设置tomcat开机启动
linux·运维·tomcat
xu_yule3 小时前
网络和Linux网络-3(套接字编程)TCP网络通信代码
linux·网络·tcp/ip
周杰伦fans4 小时前
C# - Task 是什么?想象一下你在餐厅点餐
服务器·开发语言·c#
HalvmånEver5 小时前
Linux:进程的切换与调度(进程四)
linux·运维·服务器
LCG元5 小时前
终端里的"黑客帝国":htop, glances, bpytop 系统监控工具横评
linux