Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)

Connecting to localhost is not the same as connecting to 127.0.0.1

Is Redis both listening on IPv4 127.0.0.1 and IPv6 ::1 loopback addresses? Check with:

ss -tunapl|grep 6379

Is localhost configured as the hostname for both IPv4 and IPv6 loopback addresses? Check with:

host localhost

Also, what is the status of the Redis service? Check with:

systemctl status redis
4 Likes