Nishant Dani
2018-05-28 00:40:38 UTC
I am running redis-server inside a docker container. It is running on
127.0.0.1 port 6379.
*In Container:*
I am able to connect to the redis-server when within the container and
process commands without a problem.
*From Host:*
When I do redis-cli from the host to the container using redis-cli monitor
it gives
Error: Server closed the connection.
If I just do redis-cli , it gives the prompt;
127.0.0.1:6379>
127.0.0.1:6379> set www yee
Error: Server closed the connection
This seems that the docker has the right port exposed and the docker port
mapping is working. The failure is not at establishing the connection, but
the connection gets terminated soon after.
*From another container on the same docker network:*
redis.on('error', function(err) {
logger.error('Redis error: ' + err);
} );
Redis error: Redis connection to 127.0.0.1:6379 failed - connect
ECONNREFUSED 127.0.0.1:6379
So any command sent to the redis-server the redis-server closes the
connection.
My redis.conf file has protected-mode no.
The logging is set to debug but there is no information on the log either
that shows that a connection was attempted and declined.
If there are any tips for debugging this would be very helpful;
127.0.0.1 port 6379.
*In Container:*
I am able to connect to the redis-server when within the container and
process commands without a problem.
*From Host:*
When I do redis-cli from the host to the container using redis-cli monitor
it gives
Error: Server closed the connection.
If I just do redis-cli , it gives the prompt;
127.0.0.1:6379>
127.0.0.1:6379> set www yee
Error: Server closed the connection
This seems that the docker has the right port exposed and the docker port
mapping is working. The failure is not at establishing the connection, but
the connection gets terminated soon after.
*From another container on the same docker network:*
redis.on('error', function(err) {
logger.error('Redis error: ' + err);
} );
Redis error: Redis connection to 127.0.0.1:6379 failed - connect
ECONNREFUSED 127.0.0.1:6379
So any command sent to the redis-server the redis-server closes the
connection.
My redis.conf file has protected-mode no.
The logging is set to debug but there is no information on the log either
that shows that a connection was attempted and declined.
If there are any tips for debugging this would be very helpful;
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.