用原来的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
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。