[Solved] SpringBoot integration with Redis error: java.net.ConnectException: Connection refused: no further information

Error message


springboot integrated redis error reason:
you need to modify the bind in the redis.conf configuration file to your own IP address in Linux

redis.conf configuration file

start the service (123 is the password set by myself, set in redis.conf)

Finally, don’t forget to modify the redis configuration file

# Redis database index (default is 0)
spring.redis.database=0
# Redis server address
spring.redis.host=192.168.20.128
# Redis server connection port
spring.redis.port=6379
# Redis server connection password (default is empty)
spring.redis.password=123
# Maximum number of connections to the connection pool (use negative values to indicate no limit)
spring.redis.pool.max-active=8
# Maximum connection pool blocking wait time (use negative values to indicate no limit)
spring.redis.pool.max-wait=-1
# The maximum idle connections in the connection pool
spring.redis.pool.max-idle=8
# The minimum idle connections in the connection pool
spring.redis.pool.min-idle=0
# Connection timeout (milliseconds)
spring.redis.timeout=5000


Read More: