-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentinel connection error not emitting #200
Comments
Yes, it's a bug. Released in 1.11.1, now it will emit |
Awesome, thanks! |
this seems to work properly only in the case if sentinelRetryStrategy is given as above.
the error is never fired, maybe this is expected but not intuative. |
@Gorokhov Yes, by default ioredis will keep reconnecting to Redis until the connection has been made. This behaviour is important when it's used in production, that even redis servers are down for several seconds, ioredis will still connect to them once they are online again. |
Hi luin, I have the same question, I already set my ioredis version to 1.14.0 or 1.11.1, but neither does it work out. var Redis = require('ioredis'); var opts = { I can get error from retryStrategy(if sentinel runs well and related nodes down), but not sentinelRetryStrategy(if sentinel down). |
@kunth |
yeah, I noticed that. I killed all sentinels when I try this. |
@kunth and |
@luin , sentinelRetryStrategy never invoked in my case. ioredis:redis status[localhost:6379]: [empty] -> connecting +0ms |
That helps. It seems |
@luin , yeah I manually set the delay to 1000 in sentinelRetryStrategy function. |
ioredis only emits |
Well, so there is a difference between retryStrategy and sentinelRetryStrategy. |
Yes, that's correct. |
Well, a little weird. Thanks very much, @luin , you save me lots of time. |
Hi!
I'm unable to get an error when ioredis can not connect to sentinel. Code:
Output:
The output is only ioredis debug, no consoles log, the error event was never emitted, is these a bug or am i doing something wrong?
Thanks, awesome work!
The text was updated successfully, but these errors were encountered: