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.

Unhandled error event: Error: All sentinels are unreachable. Retrying from scratch after 10ms.

See original GitHub issue

Hello. Can you help me with this issue? This already spammed my logs My connect options:

{
 lazyConnect: true,
  sentinels: [
    { host: "xx.xx.x.41", port: 26379 }, { host: "xx.xx.x.42", port: 26379 }, { host: "xx.xx.x.43", port: 26379 },
  ],
  name: "mymaster",
}

Version: “ioredis”: “4.27.6”, Logs:

`2021-07-25 17:44:07.988: 2021-07-25T14:44:07.987Z ioredis:redis status[xx.xx.x.41:6379]: ready -> close
2021-07-25 17:44:07.988: 2021-07-25T14:44:07.988Z ioredis:connection reconnect in 50ms
2021-07-25 17:44:07.988: 2021-07-25T14:44:07.988Z ioredis:redis status[xx.xx.x.41:6379]: close -> reconnecting
2021-07-25 17:44:07.988: 2021-07-25T14:44:07.988Z ioredis:redis status[xx.xx.x.41:6379]: ready -> close
2021-07-25 17:44:07.988: 2021-07-25T14:44:07.988Z ioredis:connection reconnect in 50ms
2021-07-25 17:44:07.988: 2021-07-25T14:44:07.988Z ioredis:redis status[xx.xx.x.41:6379]: close -> reconnecting
2021-07-25 17:44:08.038: 2021-07-25T14:44:08.038Z ioredis:redis status[xx.xx.x.41:6379]: reconnecting -> connecting
2021-07-25 17:44:08.038: 2021-07-25T14:44:08.038Z ioredis:SentinelConnector All sentinels are unreachable. Retrying from scratch after 10ms.
2021-07-25 17:44:08.039: [ioredis] Unhandled error event: Error: All sentinels are unreachable. Retrying from scratch after 10ms.
2021-07-25 17:44:08.039:     at SentinelConnector.<anonymous> (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:73:31)
2021-07-25 17:44:08.039:     at Generator.next (<anonymous>:null:null)
2021-07-25 17:44:08.039:     at /opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:8:71
2021-07-25 17:44:08.039:     at new Promise (<anonymous>:null:null)
2021-07-25 17:44:08.039:     at __awaiter (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:4:12)
2021-07-25 17:44:08.039:     at connectToNext (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:59:37)
2021-07-25 17:44:08.039:     at SentinelConnector.connect (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:128:16)
2021-07-25 17:44:08.039:     at /opt/www/company/node_modules/ioredis/built/redis/index.js:282:55
2021-07-25 17:44:08.039:     at new Promise (<anonymous>:null:null)
2021-07-25 17:44:08.039:     at Redis.connect (/opt/www/company/node_modules/ioredis/built/redis/index.js:258:21)
2021-07-25 17:44:08.039:     at Timeout._onTimeout (/opt/www/company/node_modules/ioredis/built/redis/event_handler.js:165:18)
2021-07-25 17:44:08.039:     at listOnTimeout (internal/timers.js:554:17)
2021-07-25 17:44:08.039:     at processTimers (internal/timers.js:497:7)
2021-07-25 17:44:08.039:
2021-07-25 17:44:08.040: 2021-07-25T14:44:08.040Z ioredis:redis status[xx.xx.x.41:6379]: reconnecting -> connecting
2021-07-25 17:44:08.040: 2021-07-25T14:44:08.040Z ioredis:SentinelConnector All sentinels are unreachable. Retrying from scratch after 10ms.
2021-07-25 17:44:08.041: [ioredis] Unhandled error event: Error: All sentinels are unreachable. Retrying from scratch after 10ms.
2021-07-25 17:44:08.041:     at SentinelConnector.<anonymous> (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:73:31)
2021-07-25 17:44:08.041:     at Generator.next (<anonymous>:null:null)
2021-07-25 17:44:08.041:     at /opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:8:71
2021-07-25 17:44:08.041:     at new Promise (<anonymous>:null:null)
2021-07-25 17:44:08.041:     at __awaiter (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:4:12)
2021-07-25 17:44:08.041:     at connectToNext (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:59:37)
2021-07-25 17:44:08.041:     at SentinelConnector.connect (/opt/www/company/node_modules/ioredis/built/connectors/SentinelConnector/index.js:128:16)
2021-07-25 17:44:08.041:     at /opt/www/company/node_modules/ioredis/built/redis/index.js:282:55
2021-07-25 17:44:08.041:     at new Promise (<anonymous>:null:null)
2021-07-25 17:44:08.041:     at Redis.connect (/opt/www/company/node_modules/ioredis/built/redis/index.js:258:21)
2021-07-25 17:44:08.041:     at Timeout._onTimeout (/opt/www/company/node_modules/ioredis/built/redis/event_handler.js:165:18)
2021-07-25 17:44:08.041:     at listOnTimeout (internal/timers.js:554:17)
2021-07-25 17:44:08.041:     at processTimers (internal/timers.js:497:7)
2021-07-25 17:44:08.041:
2021-07-25 17:44:08.050: 2021-07-25T14:44:08.049Z ioredis:redis status[xx.xx.x.41:26379]: [empty] -> connecting
2021-07-25 17:44:08.050: 2021-07-25T14:44:08.050Z ioredis:redis queue command[xx.xx.x.41:26379]: 0 -> sentinel([ 'get-master-addr-by-name', 'mymaster' ])
2021-07-25 17:44:08.050: 2021-07-25T14:44:08.050Z ioredis:redis status[xx.xx.x.41:26379]: [empty] -> connecting
2021-07-25 17:44:08.051: 2021-07-25T14:44:08.051Z ioredis:redis queue command[xx.xx.x.41:26379]: 0 -> sentinel([ 'get-master-addr-by-name', 'mymaster' ])
2021-07-25 17:44:08.051: 2021-07-25T14:44:08.051Z ioredis:redis status[xx.xx.x.41:26379]: connecting -> connect
2021-07-25 17:44:08.051: 2021-07-25T14:44:08.051Z ioredis:redis status[xx.xx.x.41:26379]: connect -> ready
2021-07-25 17:44:08.051: 2021-07-25T14:44:08.051Z ioredis:connection send 1 commands in offline queue
2021-07-25 17:44:08.052: 2021-07-25T14:44:08.051Z ioredis:redis write command[xx.xx.x.41:26379]: 0 -> sentinel([ 'get-master-addr-by-name', 'mymaster' ])
2021-07-25 17:44:08.052: 2021-07-25T14:44:08.052Z ioredis:redis status[xx.xx.x.41:26379]: connecting -> connect
2021-07-25 17:44:08.052: 2021-07-25T14:44:08.052Z ioredis:redis status[xx.xx.x.41:26379]: connect -> ready
2021-07-25 17:44:08.052: 2021-07-25T14:44:08.052Z ioredis:connection send 1 commands in offline queue
2021-07-25 17:44:08.052: 2021-07-25T14:44:08.052Z ioredis:redis write command[xx.xx.x.41:26379]: 0 -> sentinel([ 'get-master-addr-by-name', 'mymaster' ])
2021-07-25 17:44:08.052: 2021-07-25T14:44:08.052Z ioredis:redis write command[xx.xx.x.41:26379]: 0 -> sentinel([ 'sentinels', 'mymaster' ])
2021-07-25 17:44:08.053: 2021-07-25T14:44:08.053Z ioredis:redis write command[xx.xx.x.41:26379]: 0 -> sentinel([ 'sentinels', 'mymaster' ])
2021-07-25 17:44:08.053: 2021-07-25T14:44:08.053Z ioredis:SentinelConnector Updated internal sentinels: [{"host":"xx.xx.x.41","port":26379},{"host":"xx.xx.x.42","port":26379},{"host":"xx.xx.x.43","port":26379}] @1
2021-07-25 17:44:08.053: 2021-07-25T14:44:08.053Z ioredis:SentinelConnector resolved: xx.xx.x.41:6379 from sentinel xx.xx.x.41:26379
2021-07-25 17:44:08.054: 2021-07-25T14:44:08.054Z ioredis:SentinelConnector Updated internal sentinels: [{"host":"xx.xx.x.41","port":26379},{"host":"xx.xx.x.42","port":26379},{"host":"xx.xx.x.43","port":26379}] @1
2021-07-25 17:44:08.054: 2021-07-25T14:44:08.054Z ioredis:SentinelConnector resolved: xx.xx.x.41:6379 from sentinel xx.xx.x.41:26379
2021-07-25 17:44:08.055: 2021-07-25T14:44:08.055Z ioredis:redis status[xx.xx.x.41:6379]: connecting -> connect
2021-07-25 17:44:08.055: 2021-07-25T14:44:08.055Z ioredis:redis write command[xx.xx.x.41:6379]: 0 -> info([])
2021-07-25 17:44:08.055: 2021-07-25T14:44:08.055Z ioredis:redis status[xx.xx.x.41:26379]: ready -> close
2021-07-25 17:44:08.055: 2021-07-25T14:44:08.055Z ioredis:connection skip reconnecting since the connection is manually closed.
2021-07-25 17:44:08.055: 2021-07-25T14:44:08.055Z ioredis:redis status[xx.xx.x.41:26379]: close -> end
2021-07-25 17:44:08.056: 2021-07-25T14:44:08.056Z ioredis:redis status[xx.xx.x.41:6379]: connect -> ready
2021-07-25 17:44:08.057: 2021-07-25T14:44:08.057Z ioredis:redis status[xx.xx.x.41:6379]: connecting -> connect
2021-07-25 17:44:08.057: 2021-07-25T14:44:08.057Z ioredis:redis write command[xx.xx.x.41:6379]: 0 -> info([])
2021-07-25 17:44:08.057: 2021-07-25T14:44:08.057Z ioredis:redis status[xx.xx.x.41:26379]: ready -> close
2021-07-25 17:44:08.057: 2021-07-25T14:44:08.057Z ioredis:connection skip reconnecting since the connection is manually closed.
2021-07-25 17:44:08.058: 2021-07-25T14:44:08.057Z ioredis:redis status[xx.xx.x.41:26379]: close -> end
2021-07-25 17:44:08.059: 2021-07-25T14:44:08.059Z ioredis:redis status[xx.xx.x.41:6379]: connect -> ready`

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

4reactions
FilippGorbunovcommented, Jan 5, 2022

Getting the same issue on the same ioredis version. Any update?

0reactions
Alsaheemcommented, Jun 22, 2022

Hi Has anyone fixed this issue yet ? @zry754331875

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERR unknown command `sentinel`, with args beginning with ...
I'm trying to establish a connectivity but getting error - Debug log: ... ERROR Error: All sentinels are unreachable. Retrying from scratch after...
Read more >
redis: all sentinels specified in configuration are unreachable
First I thought this is fine - connection is being cancelled/closed and context is cancelled. But looking at the volume of the errors,...
Read more >
[ioredis] Unhandled error event: Error: All sentinels are ...
[ioredis] Unhandled error event: Error: All sentinels are unreachable. Retrying from scratch after 10ms Last error: Connection is closed.
Read more >
LI80807: API CONNECT 2018.4.1.4 API GATEWAY LOGS ...
Gateway Peering encountered error: Error: All sentinels are unreachable. Retrying from scratch after 10ms Last error: Connection is closed.
Read more >
Error when trying to connect to sentinel with password using ...
I have get error when try add password to connection options [ioredis] Unhandled error event: Error: All sentinels are unreachable. Retrying ...
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