zoukankan      html  css  js  c++  java
  • spring boot 无法启动 相关问题

    用原来的dev能正常启动,但换成自己新添加的yml文件,却无法启动

    一行日志都没有,直接报:
    Disconnected from the target VM, address: '127.0.0.1:63190', transport: 'socket'

    原来有日志,只是logback-sprint中根据yml环境配置了日志级别,而我新添的yml没有配置进去。

    SpringBoot的redis启动报错:ERR This instance has cluster support disabled

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationAspect': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionHelper': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserAccessTokenCacheOperator': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheInvoker': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in class path resource [com/yangdj/sa/japi/commons/config/RedisConfig.class]: Unsatisfied dependency expressed through method 'redisTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/JedisConnectionConfiguration.class]: Invocation of init method failed; nested exception is redis.clients.jedis.exceptions.JedisDataException: ERR This instance has cluster support disabled

    从报错误的信息ERR This instance has cluster support disabled很明显看得出来,是没有启动redis集群功能,可是我项目配置的集群的配置方式,要么修改代码为单机配置,要么修改redis为集群方式。

    解决办法:
    1、可以修改配置为单机redis配置:
    spring:
    redis:
    host: qianxunclub.com
    port: 6666

    2、或者在安装redis的目录找到redis配置文件redis.conf,里面会找到配置:
    # cluster-enabled yes
    把注释去掉就可以了
    cluster-enabled yes

  • 相关阅读:
    【MFC初学】
    【递归】【3月周赛1】【Problem B】
    不管ACM是不是屠龙之技
    【贪心+背包】【HDU2546】【饭卡】
    【精度问题】【HDU2899】Strange fuction
    【泛化物品】【HDU1712】【ACboy needs your help】
    【递推】【HDU2585】【hotel】
    【二进制拆分多重背包】【HDU1059】【Dividing】
    【水:最长公共子序列】【HDU1159】【Common Subsequence】
    【递推+矩阵快速幂】【HDU2604】【Queuing】
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/15412871.html
Copyright © 2011-2022 走看看