redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.co

    科技2024-10-29  15

    redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException

    1. 在springboot整合redis时,redis是运行在linux上。进行test测试时,出现以下错误

    2. 试了网上说的在application.yml文件中,设置timeout=5000尝试后,仍然错误。最后想到可能是linux中的防火墙原因,在linux系统的命令行中输入serivice iptables stop

    3. 最后重新进行test测试,发现成功。**

    4.如有错误之处,感谢指正

    Processed: 0.055, SQL: 8