Unable to connect to redis database externally
I've created a redis database service in my project and deployed it.
But when I try to access the database through its external credentials I get 'Error: connection reset by peer'
redis-cli -h 12.345.678.9 -p 6379
67.219.102.83:6379> AUTH default redis123 Error: Connection reset by peer (15.47s) I can access the database as expected if I ssh into the server and shell into the running container. commands within running container root@pig:~# docker exec -it c0c69 redis-cli 127.0.0.1:6379> AUTH default redis123 OK 127.0.0.1:6379> PING PONG The ports also seem open when I run docker port on the redis container: root@pig:~# docker port c0c69
6379/tcp -> 0.0.0.0:6379 6379/tcp -> [::]:6379 container logs ...etc 7:M 04 Mar 2025 04:53:37.616 * DB loaded from disk: 0.003 seconds 7:M 04 Mar 2025 04:53:37.616 * Ready to accept connections tcp I don't have any firewalls on my server and I can connect fine to my mariadb service. I don't have any extra config or scripts for the redis service. It's completely default. I am using the same port for internal and external connections but I don't think this would cause an issue would it?
67.219.102.83:6379> AUTH default redis123 Error: Connection reset by peer (15.47s) I can access the database as expected if I ssh into the server and shell into the running container. commands within running container root@pig:~# docker exec -it c0c69 redis-cli 127.0.0.1:6379> AUTH default redis123 OK 127.0.0.1:6379> PING PONG The ports also seem open when I run docker port on the redis container: root@pig:~# docker port c0c69
6379/tcp -> 0.0.0.0:6379 6379/tcp -> [::]:6379 container logs ...etc 7:M 04 Mar 2025 04:53:37.616 * DB loaded from disk: 0.003 seconds 7:M 04 Mar 2025 04:53:37.616 * Ready to accept connections tcp I don't have any firewalls on my server and I can connect fine to my mariadb service. I don't have any extra config or scripts for the redis service. It's completely default. I am using the same port for internal and external connections but I don't think this would cause an issue would it?
1 Reply
Bruh after 3hrs troubleshooting this I just deleted that instance and created a new one and its working now 😠😠I did use a different port for the external connection than the internal one so maybe that did something