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.
127.0.0.1:6379> AUTH default redis123
OK
127.0.0.1:6379> PING
PONG
6379/tcp -> 0.0.0.0:6379
6379/tcp -> [::]:6379
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?
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-cli127.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 c0c696379/tcp -> 0.0.0.0:6379
6379/tcp -> [::]:6379
container logs
...etc7: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?