question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection error not thrown when Sentinel master name is wrong

See original GitHub issue

Hi! I happened to have a wrong master name in my config. ioredis kept reconnecting and didn’t throw error event. If I enable debug mode, I can see error:

ioredis:redis write command[0] -> sentinel(sentinels,redis-beta1111) +0ms   ioredis:SentinelConnector failed to connect to sentinel xxx.xxx.xxx.xxx:yyy because ReplyError: ERR No such master with that name +1ms   ioredis:SentinelConnector All sentinels are unreachable. Retrying from scratch after 122 +0ms

But how can I catch it in my application?

P.S. using ioredis v 2.4.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jehycommented, Nov 16, 2016

Oops. My bad. Sentinel really listened only on 26379. Stupid mistake, sorry for taking your time. Thank you very much!

1reaction
luincommented, Nov 16, 2016

It shows 127.0.0.1:26380 refuse the connection ECONNREFUSED instead of returning ERR No such master with that name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

redis-sentinel throws error: " Can't resolve master instance ...
I think it's probably because redis_node doesn't resolve to an IP address. Perhaps try putting the IP address in sentinel.conf instead. The ...
Read more >
Error message when you connect to an instance of SQL ...
The connection succeeds without any error message. Cannot open user default database. Login failed.
Read more >
Could not connect to redis connection refused - Fix it easily
The most common reason for the connection refused error is that the Redis-Server is not started. Redis server should be started to use...
Read more >
Problems and Solutions - Sentinel Product Documentation
>The key is not connected properly to the USB port. ... You receive an error message indicating that Sentinel License Manager was not...
Read more >
Redis (error) NOAUTH Authentication required
Setting the requirepass configuration directive causes the server to require password authentication with the AUTH command before sending other commands.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found