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编码]
相关推荐
AZ996ZA几秒前
自学linux的二十天【DNS 服务从入门到实战】
linux·运维·服务器
wdfk_prog1 分钟前
[Linux]学习笔记系列 -- [drivers][mmc]mmc_sd
linux·笔记·学习
qinyia2 分钟前
**使用AI助手在智慧运维中快速定位并修复服务异常:以Nginx配置错误导致502错误为例**
linux·运维·服务器·数据库·mysql·nginx·自动化
❀͜͡傀儡师3 分钟前
CentOS 7部署FTP服务
linux·运维·centos·ftp
济6176 分钟前
ARM Linux 驱动开发篇----字符设备驱动开发(2)--字符设备驱动开发步骤---- Ubuntu20.04
linux·运维·服务器
以太浮标11 分钟前
华为eNSP模拟器综合实验之- DHCP Option 43 解析
服务器·网络·华为·云计算
仗剑天涯 回首枉然12 分钟前
Linux 和 windows 共享文件
linux·运维·windows
zzzsde14 分钟前
【Linux】进程(3):进程状态
linux·运维·服务器
Mr_liu_66614 分钟前
ubuntu:beyond compare 4 This license key has been revoked——————转载拼接
linux·运维·ubuntu
无聊的小坏坏15 分钟前
补充:使用 /etc/cron.d 管理定时任务
linux·定时任务