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编码]
相关推荐
The Mr.Nobody1 天前
如何配置群晖网盘客户端Synology Drive Client
服务器
学习者0071 天前
NE相关知识之------路由知识
运维·服务器
杨云龙UP1 天前
SQL Server定时自动备份配置:使用SSMS维护计划向导配置数据库每日自动备份_20260101
运维·服务器·数据库·sql·sqlserver·桌面
赵民勇1 天前
tr命令用法详解与技巧总结
linux·shell
学不完的路路路1 天前
IMX6ULL开发板固件烧录问题:添加设备树节点不成功
linux·ubuntu·设备树
大柏怎么被偷了1 天前
【Linux】进程间通信
linux·运维·服务器
Howrun7771 天前
Linux进程通信---6.1---进程信号屏蔽
linux·服务器
郑泰科技1 天前
SpringBoot项目实践:之前war部署到服务器好用,重新打包部署到服务器报404
服务器·spring boot·后端
一颗青果1 天前
五种IO模型
linux·服务器·网络
宋军涛1 天前
SqlServer性能优化
运维·服务器·性能优化