Introduction
Redis cluster node cannot join when cluster meet fails or config epoch conflict. This guide provides step-by-step diagnosis and resolution.
Symptoms
Typical error output:
bash
Error: Node 10.0.0.2:6379 is not empty
Cannot join cluster: config epoch conflict
Node already knows another clusterCommon Causes
- 1.Node already has data from different cluster
- 2.Config epoch conflict with existing nodes
- 3.CLUSTER MEET not executed correctly
- 4.Network partition during join
Step-by-Step Fix
Step 1: Check Current State
bash
redis-cli cluster meet <ip> <port>
redis-cli cluster nodes
redis-cli cluster infoStep 2: Identify Root Cause
bash
redis-cli INFO
redis-cli CONFIG GET "*"
redis-cli SLOWLOG GET 10Step 3: Apply Primary Fix
bash
# Reset node and join cluster
redis-cli -h <new-node> FLUSHALL
redis-cli -h <new-node> CLUSTER RESET HARD
redis-cli -h <existing-node> CLUSTER MEET <new-node-ip> 6379Step 4: Apply Alternative Fix
```bash # Alternative fix: Check configuration redis-cli CONFIG GET "*memory*" redis-cli CONFIG GET "*timeout*"
# Update settings redis-cli CONFIG SET parameter value
# Verify the fix redis-cli INFO ```
Step 5: Verify the Fix
bash
redis-cli cluster nodes
redis-cli cluster info
# Node should appear in clusterCommon Pitfalls
- Not using connection pooling for high-throughput applications
- Setting maxmemory without eviction policy
- Using KEYS command in production
- Not monitoring replication lag
Best Practices
- Monitor Redis memory and fragmentation regularly
- Use SCAN instead of KEYS for key enumeration
- Configure appropriate eviction policy for workload
- Implement proper backup strategy (RDB or AOF)
Related Issues
- Redis Connection Refused
- Redis High Latency
- Redis Cluster Down
- Redis Persistence Failed