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编码]
相关推荐
物理与数学8 分钟前
linux内核 struct super_block
linux·linux内核
Getgit12 分钟前
Linux 下查看 DNS 配置信息的常用命令详解
linux·运维·服务器·面试·maven
zhangrelay1 小时前
Linux(ubuntu)如何锁定cpu频率工作在最低能耗模式下
linux·笔记·学习
_OP_CHEN1 小时前
【Linux系统编程】(二十)揭秘 Linux 文件描述符:从底层原理到实战应用,一篇吃透 fd 本质!
linux·后端·操作系统·c/c++·重定向·文件描述符·linux文件
捷智算云服务1 小时前
告别运维割裂!捷智算GPU维修中心重新定义“全栈式”维修新标准
运维·服务器·性能优化
chem41112 小时前
玩客云 边缘AI模型 本地搭建部署 llama.cpp qwen
linux·人工智能·llama
一个平凡而乐于分享的小比特2 小时前
Linux内核中的BogoMIPS详解
linux·bogomips
橘颂TA2 小时前
【Linux 网络】TCP 拥塞控制与异常处理:从原理到实践的深度剖析
linux·运维·网络·tcp/ip·算法·职场和发展·结构与算法
zbguolei2 小时前
CentOS 7.6离线安装Nginx
linux·nginx·centos
苏宸啊2 小时前
Linux开发工具(二)
linux