• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

nacos启动报错 Error creating bean with name ‘authFilterRegistration‘ defined in class path resource

武飞扬头像
薛定猫ynufehmh
帮助3

今天启动nacos的时候突然报错,nacos启动界面报错信息如下:

  1.  
    Error creating bean with name 'authFilterRegistration' defined in class path resource
  2.  
    [com/alibaba/nacos/core/auth/AuthConfig.class]:
  3.  
    Bean instantiation via factory method failed;
  4.  
    nested exception is org.springframework.beans.BeanInstantiationException:
  5.  
    Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]:
  6.  
    Factory method 'authFilterRegistration' threw exception;
  7.  
    nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
  8.  
    Error creating bean with name 'authFilter':
  9.  
    Unsatisfied dependency expressed through field 'authManager';
  10.  
    nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
  11.  
    Error creating bean with name 'nacosAuthManager':
  12.  
    Unsatisfied dependency expressed through field 'authenticationManager';
  13.  
    nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
  14.  
    Error creating bean with name 'nacosAuthConfig':
  15.  
    Unsatisfied dependency expressed through field 'userDetailsService';
  16.  
    nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
  17.  
    Error creating bean with name 'nacosUserDetailsServiceImpl':
  18.  
    Unsatisfied dependency expressed through field 'userPersistService';
  19.  
    nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
  20.  
    Error creating bean with name 'externalUserPersistServiceImpl':
  21.  
    Unsatisfied dependency expressed through field 'persistService';
  22.  
    nested exception is org.springframework.beans.factory.BeanCreationException:
  23.  
    Error creating bean with name 'externalStoragePersistServiceImpl':
  24.  
    Invocation of init method failed; nested exception is java.lang.RuntimeException:
  25.  
    java.lang.RuntimeException: [db-load-error]load jdbc.properties error
学新通

 idea后台打印错误信息:

[NACOS SocketTimeoutException httpGet] currentServerAddr:http://localhost:8848, err : connect timed out

原因分析:项目可能没有正确加载nacos相关文件

解决办法:删除现有nacos文件夹,重新解压或下载nacos压缩包,启动startup.cmd,问题解决

  

若还报错,可能是startup.cmd文件中set MODE = ""不恰当

  1.  
    set BASE_DIR="SE_DIR:~0,-5%"
  2.  
     
  3.  
    set CUSTOM_SEARCH_LOCATIONS=file:SE_DIR%/conf/
  4.  
     
  5.  
    set MODE="cluster"
  6.  
    set FUNCTION_MODE="all"
  7.  
    set SERVER=nacos-server
  8.  
    set MODE_INDEX=-1
  9.  
    set FUNCTION_MODE_INDEX=-1
  10.  
    set SERVER_INDEX=-1
  11.  
    set EMBEDDED_STORAGE_INDEX=-1
  12.  
    set EMBEDDED_STORAGE=""

解决办法:将set MODE="cluster"改为set MODE="standalone"即可。

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfckegk
系列文章
更多 icon
同类精品
更多 icon
继续加载