redis/jedis · info
Jedis does not support RESP3 protocol auto-negotiation…
Error message
Jedis does not support RESP3 protocol auto-negotiation. Auto-negotiation will be disabled and the connection will assume RESP2. Set .autoNegotiateProtocol(false) (or use .serverDefaultProtocol()) in your config builder to silence this warning, or upgrade to RedisClient for RESP3 support.
What it means
The legacy Jedis client does not support RESP3, so when a config has protocol auto-negotiation enabled (default), Jedis logs this warning, disables auto-negotiation, and proceeds assuming RESP2. Behavior is unchanged for the caller; this exists to alert users who expect RESP3 features (e.g. client-side caching pushing) that they must move to RedisClient, or explicitly opt out of negotiation to silence the warning.
Solutions
- If RESP3 is required, switch to RedisClient (builder-based), which supports RESP3.
- If RESP2 is fine, set .autoNegotiateProtocol(false) in the builder to silence the warning.
- Or set .serverDefaultProtocol() to let the server default apply without negotiation.
- Verify you are not unintentionally sharing a RESP3-oriented DefaultJedisClientConfig with legacy Jedis.
Example fix
// before
JedisClientConfig cfg = DefaultJedisClientConfig.builder()
.host("localhost").port(6379).build(); // auto-negotiate on → warning
// after
JedisClientConfig cfg = DefaultJedisClientConfig.builder()
.host("localhost").port(6379)
.autoNegotiateProtocol(false).build(); // RESP2, silent Defensive patterns
Strategy: validation
Validate before calling
if (clientIsLegacyJedis && needsResp3Features()) {
throw new IllegalStateException("Use RedisClient for RESP3; legacy Jedis is RESP2 only");
} Prevention
- Set .autoNegotiateProtocol(false) explicitly in every JedisClientConfig to silence the warning deliberately
- Use RedisClient (builder) when you need RESP3/client-side caching
- Don't share RESP3-oriented configs between RedisClient and legacy Jedis
- Audit configs after migrating code between client types
When it happens
Trigger: Building any Jedis/JedisPool with a JedisClientConfig where getRedisProtocol() is null and isAutoNegotiateProtocol() is true — i.e. the default config path through Jedis(...).sanitize/effective.
Common situations: Migrating configs shared between RedisClient and legacy Jedis; enabling RESP3 features like client-side caching with legacy Jedis; copying a config from RedisClient examples into Jedis.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- Unsupported protocol:
- Unknown message type
- Can connect to sentinel, but
- Blocking pub/sub operations are not supported on…
- Unknown message type:
AI-assisted analysis of redis/jedis@6dac31d4c2 (2026-09-08).
Data as JSON: /api/errors/2a329d4f1d64a2fa.
Report an issue: GitHub.
Appendix: source
Thrown at src/main/java/redis/clients/jedis/Jedis.java:124
private boolean isInWatch = false;
private Pipeline pipeline = null;
protected static final byte[][] DUMMY_ARRAY = new byte[0][];
private Pool<Jedis> dataSource = null;
/**
* Returns a config safe to use with the legacy {@link Jedis} class. Jedis does not support
* RESP3 auto-negotiation the way {@link UnifiedJedis} does — if it lets the connection send
* {@code HELLO 3}, it will receive RESP3-encoded replies that the legacy parsers cannot
* decode. When the supplied config has auto-negotiation enabled and no explicit protocol, the
* flag is cleared so the connection stays in legacy {@code HELLO}-less mode and a warning is
* emitted.
*/
private static JedisClientConfig sanitize(JedisClientConfig config) {
if (config.getRedisProtocol() != null || !config.isAutoNegotiateProtocol()) {
return config;
}
logger.warn("Jedis does not support RESP3 protocol auto-negotiation. "
+ "Auto-negotiation will be disabled and the connection will assume RESP2. "
+ "Set .autoNegotiateProtocol(false) (or use .serverDefaultProtocol()) in your config "
+ "builder to silence this warning, or upgrade to RedisClient for RESP3 support.");
return DefaultJedisClientConfig.builder().from(config).autoNegotiateProtocol(false).build();
}
public Jedis() {
connection = new Connection();
commandObjects = new CommandObjects(RedisProtocol.REDIS_SERVER_DEFAULT_PROTO);
}
/**
* This constructor only accepts a URI string. {@link JedisURIHelper#isValid(java.net.URI)} can be
* used before this.
* @param url
*/
public Jedis(final String url) {
this(URI.create(url));View on GitHub (pinned to 6dac31d4c2)