首页 > 其他分享 >nacos2.2.1之后需配置安全Key才能启动

nacos2.2.1之后需配置安全Key才能启动

时间:2024-07-01 10:20:55浏览次数:1  
标签:exception 启动 nacos2.2 plugin jar nacos springframework Key impl

nacos启动报错信息

ERROR Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. 
Message: Error creating bean with name 'basicAuthenticationFilter' defined in class path resource
[com/alibaba/nacos/prometheus/filter/PrometheusAuthFilter.class]: Unsatisfied dependency expressed through method 'basicAuthenticationFilter' parameter 0;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig'
defined in URL [jar:file:/D:/all_software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.1.jar!
/com/alibaba/nacos/plugin/auth/impl/NacosAuthConfig.class]: Unsatisfied dependency expressed through constructor parameter 1;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tokenManagerDelegate':
Unsatisfied dependency expressed through field 'jwtTokenManager'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'jwtTokenManager' defined in URL [jar:file:/D:/all_software/nacos/target/nacos-server.jar
!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.1.jar!/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManager.class]:
Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
[com.alibaba.nacos.plugin.auth.impl.token.impl.JwtTokenManager]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException:
the length of secret key must great than or equal 32 bytes; And the secret key must be encoded by base64.Please see
https://nacos.io/zh-cn/docs/v2/guide/user/auth.html

 

原因:

缺少配置了nacos.core.auth.plugin.nacos.token.secret.key

解决方案:

找到文件application.properties,编辑填写一下内容

 

标签:exception,启动,nacos2.2,plugin,jar,nacos,springframework,Key,impl
From: https://www.cnblogs.com/niuniu0108/p/18277500

相关文章

  • ABAP 新语法-ITAB[ idx ]、ITAB[ key ]
    这段ABAP代码主要演示了使用新的ABAP语法内表表达式的用法,其中核心点如下:索引和关键字读取:使用gt_student[1]进行索引读取,获取内表的第一个元素。使用gt_student[id='0000000005'age=15]进行关键字读取,根据指定条件获取内表中的元素。结构字段读取:通过gt_student[1]......
  • Linux Redis 服务设置开机自启动
    @目录前言一、准备工作二、操作步骤2.1修改redis.conf文件2.2创建启动脚本2.3设置redis脚本权限2.4设置开机启动2.5验证总结前言请各大网友尊重本人原创知识分享,谨记本人博客:南国以南i、提示:以下是本篇文章正文内容,下面案例可供参考一、准备工作注意:准备已安装好的Re......
  • 解读MySQL 8.0数据字典的初始化与启动
    本文分享自华为云社区《MySQL全文索引源码剖析之Insert语句执行过程》,作者:GaussDB数据库。本文主要介绍MySQL8.0数据字典的基本概念和数据字典的初始化与启动加载的主要流程。MySQL8.0数据字典简介数据字典(DataDictionary,DD)用来存储数据库内部对象的信息,这些信息也被称......
  • SUSE linux的启动过程介绍
    引导Linux系统涉及不同的组件和任务。在固件和硬件初始化过程(取决于机器的架构)之后,内核通过引导加载程序GRUB2启动。此后,引导过程完全由操作系统控制并由systemd处理。systemd提供了一组“target”,用于为日常使用、维护或紧急情况启动配置。1术语init有两种不同的进程会......
  • GBase 8s 通过systemd实现自启动与关闭
    在RHEL7/CENTOS7/SUSE12及最新的Ubuntu等linux发行版本中,均使用systemd进行服务控制管理(ServiceControlManager)。使用systemd,不再需要编写shell脚本程序来控制启动、关闭。以下是通过systemd方式实现GBase8s数据库的自启动与关闭。适用于操作系统:RHEL7/CENTOS7,以及......
  • A15 汇编启动阶段-BSP
    MSRCPSR_c,#Mode_SVC|I_Bit|F_Bit //SVCmode //setupvectormode /*BIT[13]: 0:选择低端异常中断向量0x0~0x1c 1:选择高端异常中断向量0xffff0000~0xffff001c*/ MRC p15,0,r0,c1,c0,0 //ReadControlRegister BIC r0,r0,#(1<<13) //u......
  • 软件测试——稳定性测试:adb & Monkey
    Monkey1.Monkey1.1Monkey是什么1.2Monkey测试场景1.3Monkey特点1.4Monkey在哪里1.5测试准备事项1.6Monkey参数列表2.基本命令3.常用参数4.事件类型5.调试参数6.日志管理7.日志错误定位8.Monkey测试可以发现的问题1.Monkey1.1Monkey是什么 ......
  • [Tkey] 与非
    解法原理1首先我们需要明白\(\operatorname{nand}\)的运算:\[\operatorname{not}(a\operatorname{nand}b)=a\operatorname{and}b\tag{1}\]这个很好理解,因为\(\operatorname{nand}\)就是这么定义的(从中文名字可以看出来)。\[(\operatorname{not}a)\operatorname{nand}(\opera......
  • Oracle 11gR2 RAC 集群服务启动与关闭总结
      关闭过程(CRS集群关闭->关闭数据库)1.关闭数据库:用oracl用户执行srvctl命令语法:srvctlstopdatabase-ddbname[-oimmediate]作用:可以一次性关闭dbname的所有实例[oracle@rac1 ~]$ srvctl stop database -d racdb  -停止所有节点上的实例然后查看状态:[oracle@ra......
  • Mac 本地启动 Dify
    本地启动dify拉取dify文件gitclonehttps://github.com/langgenius/dify.git启动底层服务cddify/dockerdocker-compose-fdocker-compose.middleware.yaml-pdifyup-d启动后端API安装poetrybrewinstallpoetry配置cd../apicp.env.example.env......