LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-04-2016, 10:20 AM   #1
hairysocks
Member
 
Registered: May 2002
Location: Thorverton, Near Exeter, Devon, England
Distribution: Ubuntu 10.04 (used to be Red Hat 7.1, then Red Hat 9, then FC 2, FC 5, FC 6, FC 9 and Ubuntu 8.04)
Posts: 105

Rep: Reputation: 16
Redis with IPsec, sentinels do not promote slave when IPsec is flushed


I have three redis servers, each one is also running a redis sentinel. The comms between the servers is encrypted with IPsec. When all IPsec connections are working, then stopping the redis replication master is recognised by the sentinels and they promote a slave to be the new master.

But when I flush IPsec (using setkey -F and setkey -FP) then the comms between the master and slaves is broken, but the sentinels do NOT promote a slave to become a new master.

The redis slaves recognise the fact that their master appears to be unavailable, because I can see this type of stuff in the redis server log:

11002:S 04 Apr 15:49:49.258 * Connecting to MASTER 192.168.106.246:6379
11002:S 04 Apr 15:49:49.259 * MASTER <-> SLAVE sync started
11002:S 04 Apr 15:50:50.425 # Timeout connecting to the MASTER...


If I subsequently activate IPsec again on the redis master, then the replication catches up, and the master remains as the master.

But while IPsec is flushed, then updates on the master can happen and they are not replicated to slaves.

Is there a setting for the sentinels that will recognise that the master is down?

Last edited by hairysocks; 04-07-2016 at 07:11 AM. Reason: Added solved tag to subject
 
Old 04-07-2016, 07:10 AM   #2
hairysocks
Member
 
Registered: May 2002
Location: Thorverton, Near Exeter, Devon, England
Distribution: Ubuntu 10.04 (used to be Red Hat 7.1, then Red Hat 9, then FC 2, FC 5, FC 6, FC 9 and Ubuntu 8.04)
Posts: 105

Original Poster
Rep: Reputation: 16
I have solved the problem by adding another redis sentinel. I think the problem was that when one of the three sentinels could no longer communicate, then the remaining two could not agree to promote a slave to be the new master for replication. The redis sentinel documentation says don't try a setup with just two sentinels. But adding a fourth sentinel, then when the master, and its sentinel, became inaccessible, then there were still three sentinels left to vote up a new replication master.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openswan - include statement in ipsec.conf & ipsec.secrets readmore Linux - Security 0 10-16-2014 07:44 AM
how to promote openldap slave server to master invincible General 1 05-30-2012 09:36 PM
vpn-ipsec : Failed to parse config setup portion of ipsec.conf hari85 Linux - Newbie 1 07-17-2010 08:12 PM
ipsec help ankscorek Linux - Networking 1 03-30-2006 03:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration