Unable to connect to MASTER: Resource temporarily unavailable : Connecting to MASTER no:0in slave syslog.
####################################################################
First off, I need to explain the design concept & layout little here, cause I have no clue about what’s behind this error message above.
I'm currently working on a highly available redis cluster for query caching using Redis + Keepalived. ( I don’t use Redis cluster. )
Tools
Layout
reddis2 ( belongs to host2 server )
( I plant to use supervisor to revive processes but not implemented yet. )
How do we reach 100% availability using the above set up?
Keepalived is not able to either switch Redis state or failover as default, so I made some scripts triggered whenever notify_master/notify_backup/notify_fault called by Keepalived.
So each hosts has notify_master/notify_backup/notify_fall scripts.
Within the scripts,
notify_master.shtriggers the command : `redid-cli slaveof no one`, and
rewrite redis config with the same state as above.( redid-cli slaveof no one )
notify_backup.shtriggers the command : `redid-cli slaveof <IP> <PORT>`
rewrite redis config with the same state as above.( `redid-cli slaveof <IP> <PORT>`)
notify_fault.shtriggers the command : service keepalived stop ( force to failover.)
Keepalived also has check_script for health checking whether Redis is alive.
redis_health_checker.sh ( Send ping and get pong periodically )#!/bin/bash
REDIS_CLI='/usr/local/bin/redis-cli'
for TRIES in $(seq 1 2)
do
RESULT=$($REDIS_CLI ping)
if [ "${RESULT}" = "PONG" ]; then
exit 0
fi
echo "Ping failed ${TRIES}" | logger -t redis-health-checker
sleep 1
done
exit 1 # Makes Keepalived FALL
####################################################################
The suspected issue
For testing I shuts down&starts ( restarts ) whichever server having redis (master) state, and is supported to start replication with redis (slave), but I found it sometimes fail. ( It’s not always but sometimes, I mean irregularly.)
However I found in redis ( slave ) outputs below in syslog.
Unable to connect to MASTER: Resource temporarily unavailable : Connecting to MASTER no:0
I doubt something like
But it didn’t work in this case.
I just wonder why this happens irregularly.
What can I do to find out what went wrong? I couldn’t figure out Unable to connect to MASTER: Resource temporarily unavailable : Connecting to MASTER no:0 in this situation.
Does anyone ever encounter this kind of an issue with Redis?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.