Open zizzfizzix opened 4 years ago
I have the same problem, first two time - redis trying connect to 127.0.0.1:6379
and got error
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection: Error: connect ECONNREFUSED 127.0.0.1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14)
but third reconnect - ioredis set correct url what i set in config.
This only happen when i try connect between two docker containers, in local environment - all ok
This is happening to us as well. It seems ioredis is making the assumption that a redis server exists on localhost, when that is not the case and sentinel connection strings are being provided.
@lukeescude how did you fix it? Having the same problem and it's super annoying...
I'm trying to connect to a sentinel with:
The debug log of ioredis shows me that it tries to connect to
localhost
first, though, and I'm gettingconnect ECONNREFUSED 127.0.0.1:6379
:I don't think it matters (commented it out) but later on, I'm using the ioredis connection in a bull queue
I've found the following 2 related issues but mine seems to be a little different: https://github.com/luin/ioredis/issues/796, https://github.com/luin/ioredis/issues/367
My
SENTINEL sentinels redis-cluster
output is:And this is my
get-master-addr-by-name
output:Any help will be much appreciated!