marcel-dempers / docker-development-youtube-series

5.24k stars 4.04k forks source link

Sentinel is unable to promote slave to master #144

Closed Adi-Senpai closed 1 year ago

Adi-Senpai commented 2 years ago

Hello,

I have used this repository to create the redis architecture. After applying all the yaml files, when I delete the master pod, the sentinel doesn't promote the slave pods to master. I have also followed your youtube video https://youtu.be/JmCn7k0PlV4 for this architecture.

Also what i noticed is all the redis pods (redis-0, redis-1 and redis-2 ) becomes slave. Is there any way you can help me troubleshoot further, that would be grest 😁.

I am using AWS EKS.

Thank you in advance.

This is the github link https://github.com/marcel-dempers/docker-development-youtube-series/tree/master/storage/redis/kubernetes

Adi-Senpai commented 2 years ago

logs from sentinel pod even after deleting the master redis pod: X 10 Jun 2022 16:33:21.070 # +monitor master mymaster redis-0.redis.redis-conf.svc.cluster.local 6379 quorum 2

Logs from the redis-0 pod which was configured as master: Connecting to MASTER redis-0.redis.redis-conf.svc.cluster.local:6379 1:S 10 Jun 2022 16:38:15.581 MASTER <-> REPLICA sync started 1:S 10 Jun 2022 16:38:15.581 Non blocking connect for SYNC fired the event. 1:S 10 Jun 2022 16:38:15.581 Master replied to PING, replication can continue... 1:S 10 Jun 2022 16:38:15.582 Partial resynchronization not possible (no cached master) 1:S 10 Jun 2022 16:38:15.582 * Master is currently unable to PSYNC but should be in the future: -NOMASTERLINK Can't SYNC while not connected with my master

marcel-dempers commented 1 year ago

Did you manage to solve this ? I would recommend to take a look at other closed issues around Redis in this repo as many of these types of issues have been solved already. I would recommend to check the logs on the init containers to see why the master was not initialized correctly. You should see redis-0 as a master unless something went wrong in the init container.