-
Notifications
You must be signed in to change notification settings - Fork 18
connect ETIMEDOUT 172.17.0.6:7000 #19
Comments
Could you connect redis with |
Yes I can connect to using cli. I can connect from the node app also, but the connection is not reliable. It hangs couple of times, and does not return anything. |
@zensh any debugging help would be appreciated. |
@sparachi I think that this option killed the client. |
I have removed the entry in the redis.conf and restarted the docker container. But the issue still persists. |
@sparachi I got the problem: redis internal IP and external IP are different. when connect: const cli = redis.createClient([
"127.0.0.1:7000",
"127.0.0.1:7001",
"127.0.0.1:7002",
"127.0.0.1:7003",
"127.0.0.1:7004",
"127.0.0.1:7005",
"127.0.0.1:7006",
"127.0.0.1:7007"
]) but
that means: You can try this with
|
I can resolve it with a new option |
@zensh I still the see the same behavior. Below is my modified createClient method. I exposed all the 6 ports (Ideally I think I need to do writes on master i.e. 7000 - 7002, reads on slaves 7003-7005. But for now in dev I exposed all the 6 ports since all are running on the same instance of docker container) let clusterNodes = [ let options = { let redisClient = redis.createClient(clusterNodes, options); In my GET method I do this return new Promise(function(resolve, reject) { In my SET method I do this below return new Promise(function(resolve, reject) {
}); Even though if it works, I have some questions around the production setup.
|
@sparachi Currently no way to announce different IP/port. redis/redis#2704 |
redis/redis#2527 (comment) |
|
I wrote an node api using thunk-redis, and testing from POSTman. The data get or set works sometimes and sometimes it just hangs in there, and times out with the error message "connect ETIMEDOUT 172.17.0.6:7000"
I followed steps here in https://github.com/Grokzen/docker-redis-cluster to create a docker image with 7000 -> 7002 exposed for clients.
The documentation is not so helpful w.r.t cluster configuration. How do I debug and isolate the issue?
The text was updated successfully, but these errors were encountered: