apache/cassandra · error · ProtocolException
Rejecting Protocol Version
Error message
Rejecting Protocol Version %s < %s.
What it means
Thrown when a client requests a valid but older protocol version while the server is configured to disallow downgrades (allowOlderProtocols is false). The version itself is recognized, but decode() rejects it because it is smaller than the current protocol version (CURRENT). This enforces a minimum protocol version floor on the connection.
Solutions
- Upgrade the client driver or set its protocol version to >= ProtocolVersion.CURRENT
- Re-enable older protocol versions in server config if legacy clients must be supported temporarily
- Check cassandra.yaml / system properties controlling native protocol min/max version on the server
- Audit which clients still use old versions via logs before raising the version floor
Example fix
// before Cluster.builder().withProtocolVersion(ProtocolVersion.V3).build(); // after Cluster.builder().withProtocolVersion(ProtocolVersion.V4).build();
Defensive patterns
Strategy: validation
Validate before calling
if (clientProtocolVersion < minSupportedServerProtocol)
throw new IllegalArgumentException("protocol v" + clientProtocolVersion + " rejected; use >= " + minSupportedServerProtocol); Type guard
boolean allowedOlder(ProtocolVersion v, boolean allowOlderProtocols) { return allowOlderProtocols || !v.isSmallerThan(ProtocolVersion.CURRENT); } Prevention
- Before lowering max/min protocol versions on the server, inventory all clients' protocol versions
- Set driver protocol version explicitly rather than relying on deprecated defaults
- Plan client upgrades before server hardening changes
- Alert on old-version connection attempts in server logs
When it happens
Trigger: A client sends a frame with a valid but deprecated protocol version (e.g. v1/v2/v3) while this server channel requires >= ProtocolVersion.CURRENT; decode() is called with allowOlderProtocols=false and ret.isSmallerThan(CURRENT) is true.
Common situations: Legacy drivers pinned to old protocol versions, ops teams hardening clusters by disabling old protocol versions (native_transport_protocol versions settings), or clients reconnecting with cached old-version connections after a server upgrade.
Related errors
- Altering column types is no longer supported
- Beta version of server used
- Cannot decode string as UTF8: '" +…
- Cannot read value of length
- Cassandra system property flag
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/c261ba735784a047.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/transport/ProtocolVersion.java:131
for (ProtocolVersion version : UNSUPPORTED)
{
// if it is an old version that is no longer supported this ensures that we respond
// with that same version
if (version.num == versionNum)
throw new ProtocolException(ProtocolVersion.invalidVersionMessage(versionNum), version);
}
for (int dseVersion : KNOWN_INVALID_VERSIONS)
{
if (versionNum == dseVersion)
throw ProtocolException.toSilentException(new ProtocolException(ProtocolVersion.invalidVersionMessage(versionNum)));
}
// If the version is invalid reply with the channel's version
throw new ProtocolException(invalidVersionMessage(versionNum));
}
if (!allowOlderProtocols && ret.isSmallerThan(CURRENT))
throw new ProtocolException(String.format("Rejecting Protocol Version %s < %s.", ret, ProtocolVersion.CURRENT));
return ret;
}
public boolean isBeta()
{
return beta;
}
public static String invalidVersionMessage(int version)
{
return String.format("Invalid or unsupported protocol version (%d); supported versions are (%s)",
version, String.join(", ", ProtocolVersion.supportedVersions()));
}
public int asInt()
{
return num;View on GitHub (pinned to 88fd0f6a0e)