redis/jedis · error · JedisException
Unknown endpoint type:
Error message
Unknown endpoint type:
What it means
resolveEndpointType maps a JedisEndpointType enum to its wire-format string (e.g. external-ip, external-fqdn, none). Hitting the default branch means an endpoint type value was encountered that this Jedis version does not know how to serialize, so it throws JedisException.
Solutions
- Upgrade jedis to a version whose resolveEndpointType handles the endpoint type in use
- Check which endpoint type is being configured and use a supported one (EXTERNAL_IP, EXTERNAL_FQDN, NONE)
- If a new type was added upstream, add a case for it in the switch
Example fix
// before Endpoint endpoint = Endpoint.builder().type(SomeNewType.RDS).build(); // unknown to this jedis version // after Endpoint endpoint = Endpoint.builder().type(JedisEndpointType.EXTERNAL_FQDN).build(); // supported type
Defensive patterns
Strategy: type-guard
Validate before calling
// Ensure the configured endpoint type is one the client maps
Set<String> supported = Set.of("external-ip", "external-fqdn", "none");
if (!supported.contains(endpointTypeString)) {
throw new IllegalArgumentException("Unsupported endpoint type: " + endpointTypeString);
} Type guard
boolean isKnownEndpointType(JedisEndpointType t) {
return t == JedisEndpointType.EXTERNAL_IP
|| t == JedisEndpointType.EXTERNAL_FQDN
|| t == JedisEndpointType.NONE;
} Prevention
- Keep client and server/managed-Redis SDK versions aligned so endpoint type enums match
- Only use enum constants documented for your jedis version
- Add a default-mapping case when introducing new endpoint types upstream
When it happens
Trigger: visitAfterHandshake resolving the endpoint type of a connection whose Endpoint carries an unrecognized/unknown enum constant — typically an enum value from a newer server or client version being processed by an older code path, or a custom Endpoint implementation returning an unexpected type.
Common situations: Version skew between client and server extension enums; a newly added endpoint type not yet handled by the installed Jedis version; hand-constructed endpoints with null or exotic type values.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- null is not a valid argument.
- Failed to create socket.
- HashImport ' ' has been discarded
- HashImport ' ' expects values but got
- Cannot use Jedis when in Multi. Please use Transaction or…
AI-assisted analysis of redis/jedis@6dac31d4c2 (2026-09-08).
Data as JSON: /api/errors/00f24b1f94a77667.
Report an issue: GitHub.
Appendix: source
Thrown at src/main/java/redis/clients/jedis/MaintenanceAwareVisitor.java:145
// TLS as declared by the client config: enabled when either ssl(true) or sslOptions is set,
// mirroring DefaultJedisSocketFactory#createSocket.
JedisClientConfig clientConfig = builder.getClientConfig();
boolean sslEnabled = clientConfig.isSsl() || clientConfig.getSslOptions() != null;
MaintenanceNotificationsConfig.EndpointType endpointType = config.getEndpointTypeResolver()
.getEndpointType(connection.getRemoteSocketAddress(), sslEnabled);
switch (endpointType) {
case INTERNAL_IP:
return "internal-ip";
case INTERNAL_FQDN:
return "internal-fqdn";
case EXTERNAL_IP:
return "external-ip";
case EXTERNAL_FQDN:
return "external-fqdn";
case NONE:
return "none";
default:
throw new JedisException("Unknown endpoint type: " + endpointType);
}
}
/** Pool-wide MOVING rebind overlay: active while the controller reports a valid rebind window. */
private static final class RebindTimeoutSource extends ChainedTimeoutSource {
private final MaintenanceEventController controller;
RebindTimeoutSource(MaintenanceEventController controller) {
super(null, controller);
this.controller = controller;
}
@Override
protected TimeoutInfo getOwnInfo() {
return controller.getTimeoutSupplier().get();
}
}View on GitHub (pinned to 6dac31d4c2)