apache/cassandra · warning
Addresses differ: !=
Error message
Addresses differ: {} != {} What it means
WARN log from Directory.dumpDiff(Directory) indicating the addresses maps (NodeId to InetAddress) differ between two Directory snapshots. Divergent addresses mean one view maps a node ID to a different IP, or knows an address the other does not — often a symptom of node replacement or a peers-map divergence. Diagnostic output, not an exception.
Solutions
- Complete or replay the Replace transformation so both views record the new address for the node ID
- Replay missed cluster metadata log entries on the stale node
- Check broadcast_address/broadcast_address settings are correct on each node so registration addresses match expectations
- Restart the diverging node to resync cluster metadata from the CMS
Defensive patterns
Strategy: validation
Validate before calling
// Confirm replacement operations are fully committed before diffing addresses
if (dirA.addresses().entrySet().stream()
.allMatch(e -> e.getValue().equals(dirB.addresses().get(e.getKey()))))
// addresses agree; nothing to diff
return; Prevention
- Always perform node replacements via the Replace transformation so addresses update atomically in cluster metadata
- Validate broadcast_address configuration on every node
- Replay metadata on nodes that missed an address change
- Wait for metadata convergence after any IP change before comparing directories
When it happens
Trigger: dumpDiff(other) when Objects.equals(addresses, other.addresses) is false; commonly after a node was replaced (new IP, same logical node) in one view, or an address change was committed but not yet replicated.
Common situations: Replacement of a failed node with a new IP while another member still holds the old address; snapshots compared across a replace operation; incorrect broadcast_address configuration causing address registration mismatches.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Did not get response from
- Endpoints by dc differ
- Last modified differ
- Locations differ: !=
- nextId differ: !=
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/5e788073aaeffecb.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tcm/membership/Directory.java:935
dumpDiff(logger, states, other.states);
}
if (!Objects.equals(endpointsByDC, other.endpointsByDC))
{
logger.warn("Endpoints by dc differ: {} != {}", endpointsByDC, other.endpointsByDC);
dumpDiff(logger, endpointsByDC.asMap(), other.endpointsByDC.asMap());
}
if (!Objects.equals(racksByDC, other.racksByDC))
{
logger.warn("Racks by dc differ: {} != {}", racksByDC, other.racksByDC);
}
if (!Objects.equals(versions, other.versions))
{
logger.warn("Versions differ: {} != {}", versions, other.versions);
dumpDiff(logger, versions, other.versions);
}
if (!Objects.equals(addresses, other.addresses))
{
logger.warn("Addresses differ: {} != {}", addresses, other.addresses);
dumpDiff(logger, addresses, other.addresses);
}
}
public static <K, V> void dumpDiff(Logger logger, Map<K, V> l, Map<K, V> r)
{
for (K k : Sets.intersection(l.keySet(), r.keySet()))
{
V lv = l.get(k);
V rv = r.get(k);
if (!Objects.equals(lv, rv))
logger.warn("Values for key {} differ: {} != {}", k, lv, rv);
}
for (K k : Sets.difference(l.keySet(), r.keySet()))
logger.warn("Value for key {} is only present in the left set: {}", k, l.get(k));
for (K k : Sets.difference(r.keySet(), l.keySet()))
logger.warn("Value for key {} is only present in the right set: {}", k, r.get(k));
View on GitHub (pinned to 88fd0f6a0e)