ERR FAILOVER requires connected replicas.: FAILOVER requires connected replicas
Redis의미
조정된(graceful) 페일오버를 시작하기 위해 FAILOVER를 실행했지만, primary에 연결되어 역할을 넘겨받을 적합한 replica가 없어 거부되었다. 역할을 넘길 대상 없이는 페일오버가 일어날 수 없다.
원인
primary에 현재 연결된 replica가 없거나(replica가 다운, 네트워크 단절, 동기화되지 않음), 지정한 대상 replica가 적격하지 않거나 연결되어 있지 않다. 수동 FAILOVER(Redis 6.2+)를 호출할 때 복제 토폴로지가 필요한 조건을 충족하지 않는다. 참고: FAILOVER는 standalone(master/replica) 복제에서만 동작하며, Redis Cluster에서는 replica에서 CLUSTER FAILOVER를 사용한다.
해결 방법
정상이고 연결되어 있으며 최신 상태인 replica가 하나 이상 있는지 확인한다(INFO replication으로 connected_slaves와 동기화 상태 확인). replica의 네트워크/접근 문제를 해결해 primary에 연결되도록 한다. 특정 대상으로 페일오버하려면 FAILOVER TO host port를 사용하고 해당 replica가 적격한지 확인한다.
같은 데이터베이스의 다른 항목
- ERR Background append only file rewriting already in progressAOF rewrite already in progress
- IOERR error or timeout reading from target instanceMIGRATE: I/O error or timeout to target
- ERR Error compiling script (new function)Error compiling Lua script
- ERR invalid expire time in 'set' commandinvalid expire time in SET