HC小区管理系统安装,提示redis连接错误

错误信息:

2026-02-03 16:49:55.412 [main] ERROR com.java110.boot.BootApplicationStart - 系统启动失败

org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketException: Connection reset; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset

at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67)

at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41)

at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)

at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)

at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:181)

at org.springframework.data.redis.connection.jedis.JedisConnection.close(JedisConnection.java:365)

at org.springframework.data.redis.core.RedisConnectionUtils.releaseConnection(RedisConnectionUtils.java:214)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:234)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184)

at org.springframework.data.redis.core.RedisTemplate.keys(RedisTemplate.java:840)

at com.java110.core.cache.JedisClientTemplate.keys(JedisClientTemplate.java:148)

at com.java110.utils.cache.BaseCache.removeData(BaseCache.java:35)

at com.java110.dev.smo.impl.DevServiceCacheSMOImpl.doFlushAppRoute(DevServiceCacheSMOImpl.java:427)

at com.java110.dev.smo.impl.DevServiceCacheSMOImpl.startFlush(DevServiceCacheSMOImpl.java:101)

at com.java110.dev.smo.impl.CacheV1InnerServiceSMOImpl.startFlush(CacheV1InnerServiceSMOImpl.java:42)

at com.java110.dev.smo.impl.CacheV1InnerServiceSMOImpl$$FastClassBySpringCGLIB$$965b3ac8.invoke(<generated>)

at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)

at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)

at com.java110.core.trace.Java110TraceLogAop.around(Java110TraceLogAop.java:49)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)

at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174)

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)

at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)

at com.java110.dev.smo.impl.CacheV1InnerServiceSMOImpl$$EnhancerBySpringCGLIB$$9d2e020d.startFlush(<generated>)

at com.java110.boot.BootApplicationStart.flushMainCache(BootApplicationStart.java:238)

at com.java110.boot.BootApplicationStart.main(BootApplicationStart.java:211)

Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset

at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:202)

at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)

at redis.clients.jedis.Protocol.process(Protocol.java:151)

at redis.clients.jedis.Protocol.read(Protocol.java:215)

at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)

at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:239)

at redis.clients.jedis.BinaryJedis.quit(BinaryJedis.java:253)

at org.springframework.data.redis.connection.jedis.JedisConnection.close(JedisConnection.java:355)

... 29 common frames omitted

Caused by: java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(SocketInputStream.java:210)

at java.net.SocketInputStream.read(SocketInputStream.java:141)

at java.net.SocketInputStream.read(SocketInputStream.java:127)

at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:196)

... 36 common frames omitted

在排除:

redis启动正常后,修改yam配置文件中redis的配置

由于使用的是jedis作为连接,配置应该在jedis下

正确配置如下:

复制代码
  redis:
    database: 0
    host: 127.0.0.1
    port: 6379
    password: 123456
    timeout: 3000  # 一级参数,连接超时时间(毫秒)
    jedis: # Jedis客户端专属节点,嵌套连接池配置
      pool:
        max-active: 16  # 推荐值8-16,适配Redis 7.x/8.x
        max-wait: 3000   # 最大等待时间(毫秒)
        max-idle: 8      # 最大空闲连接数
        min-idle: 2      # 最小空闲连接数
相关推荐
m0_748554813 小时前
golang如何实现用户订阅偏好管理_golang用户订阅偏好管理实现总结
jvm·数据库·python
早日退休!!!4 小时前
《数据结构选型指南》笔记
数据结构·数据库·oracle
xcLeigh4 小时前
KES数据库性能优化实战
数据库·sql·性能优化·sql优化·数据性能
阿正呀4 小时前
Redis怎样实现本地缓存的高效失效通知
jvm·数据库·python
yoyo_zzm4 小时前
Laravel9.x新特性全解析
数据库·mysql·nginx
2501_901200534 小时前
mysql如何设置InnoDB引擎参数_优化innodb_buffer_pool
jvm·数据库·python
m0_495496415 小时前
mysql处理复杂SQL性能_InnoDB优化器与MyISAM差异
jvm·数据库·python
forEverPlume6 小时前
PHP怎么使用Eloquent Attribute Composition属性组合_Laravel通过组合构建复杂属性【方法】
jvm·数据库·python
2301_809204706 小时前
mysql在docker容器中如何部署_利用docker-compose快速启动
jvm·数据库·python
虹科网络安全6 小时前
艾体宝产品|深度解读 Redis 8.4 新增功能:原子化 Slot 迁移(上)
数据库·redis·bootstrap