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.CacheV1InnerServiceSMOImplFastClassBySpringCGLIB965b3ac8.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.CacheV1InnerServiceSMOImplEnhancerBySpringCGLIB9d2e020d.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      # 最小空闲连接数
相关推荐
这个DBA有点耶2 分钟前
索引优化深潜(下):索引合并、ICP 与索引设计的实战法则
数据库·mysql·架构
努力努力再努力wz19 分钟前
【内存管理与高并发内存池系列】从 mmap 到 malloc:文件映射、匿名映射与 glibc 内存分配机制详解
linux·c语言·数据结构·数据库·c++·qt·链表
JdSnE27zv40 分钟前
Qt 操作SQLite数据库
数据库·qt·sqlite
tedcloud1231 小时前
HyperFrames部署教程:用HTML生成MP4视频
前端·数据库·人工智能·html·音视频
布朗克1681 小时前
25 IO流高级操作——序列化、NIO与Files工具类
java·数据库·io·nio
阿演1 小时前
DataDjinn 新版本更新:新增 Oracle 支持,查询窗口、表预览和连接树继续打磨
数据库·oracle·ai编程·数据库连接工具
lixora1 小时前
Oracle 11g Active Data Guard Go 自动化部署工具 v1.0
数据库·oracle
Nturmoils1 小时前
自增主键别只会 auto_increment,先把值从哪来讲清楚
数据库·后端
叶小鸡1 小时前
Java 篇-项目实战-AI 天机学堂(从 0 到 1)-day5
数据库·redis·缓存
大模型最新论文速读1 小时前
小红书提出 RedKnot:分头处理 kv 缓存,延时降低 60%效果还提升
论文阅读·人工智能·深度学习·机器学习·缓存·自然语言处理