{"record":{"id":"fd181ed57c817264","repo":"redis/jedis","slug":"server-does-not-support-hello","errorCode":null,"errorMessage":"Server does not support HELLO","messagePattern":"Server does not support HELLO","errorType":"exception","errorClass":"JedisProtocolNotSupportedException","httpStatus":null,"severity":"error","filePath":"src/main/java/redis/clients/jedis/ProtocolHandshake.java","lineNumber":145,"sourceCode":"   * @param credentials credentials used for authentication if required (may be {@code null})\n   * @return the {@code HELLO} response containing negotiated protocol and server metadata\n   * @throws IllegalArgumentException if {@code protocol} is {@code null}\n   * @throws JedisProtocolNotSupportedException if the server does not support the requested\n   *           protocol\n   * @throws JedisAccessControlException if authentication fails and cannot be recovered\n   */\n  private HelloResult enforceProtocolWithAuth(RedisProtocol protocol,\n      RedisCredentials credentials) {\n    if (protocol == null) {\n      throw new IllegalArgumentException(\"protocol must not be null\");\n    }\n\n    try {\n      try {\n        return connection.hello(protocol, credentials);\n      } catch (JedisDataException e) {\n        if (isUnknownCommandError(e)) {\n          throw new JedisProtocolNotSupportedException(\"Server does not support HELLO\", e);\n        } else {\n          throw e;\n        }\n      }\n    } catch (JedisAccessControlException e) {\n      // Redis 6.0.x (before 6.2.2) has a bug where HELLO with AUTH fails if the default user\n      // requires authentication — the server demands AUTH before allowing HELLO.\n      // See: https://github.com/redis/redis/issues/8558\n      // See: https://github.com/redis/lettuce/issues/2592\n      if (isNoAuthError(e)) {\n        connection.authenticate(credentials);\n        return connection.hello(protocol, credentials);\n      } else {\n        throw e;\n      }\n    }\n\n  }","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/ProtocolHandshake.java#L127-L163","documentation":"During protocol enforcement, if the server responds to HELLO with an unknown-command error, Jedis translates it into JedisProtocolNotSupportedException \"Server does not support HELLO\". HELLO exists only in Redis 6.0+, so the server is older (or a pseudo-Redis that lacks HELLO) and RESP3 cannot be negotiated.","triggerScenarios":"Connecting to Redis < 6.0 (e.g. Redis 5.x), or to a service speaking a Redis subset (some proxies, caches, serverless Redis emulators) while requesting RESP3 via JedisClientConfig.protocol(RESP3).","commonSituations":"Managed environments offering only older Redis versions; cloud/enterprise proxies that strip HELLO; apps migrated to RESP3 then deployed against an old fleet.","solutions":["Set protocol RESP2 in JedisClientConfig (RESP2 works on servers without HELLO).","Omit the protocol setting to use the default.","Upgrade the Redis server to >= 6.0 if RESP3 features (client-side caching, push messages) are required.","Verify the endpoint is a genuine Redis 6+ server, not a proxy that filters HELLO."],"exampleFix":"// before\nJedisClientConfig config = DefaultJedisClientConfig.builder()\n    .protocol(RedisProtocol.RESP3) // Redis 5.x server -> Server does not support HELLO\n    .build();\n\n// after\nJedisClientConfig config = DefaultJedisClientConfig.builder()\n    .protocol(RedisProtocol.RESP2) // compatible with pre-6.0 servers\n    .build();","handlingStrategy":"fallback","validationCode":"// detect support before requesting RESP3: HELLO exists only on Redis >= 6.0\n// e.g. run INFO server and parse redis_version, or attempt HELLO and check for unknown-command errors","typeGuard":null,"tryCatchPattern":"try {\n  return connectWithProtocol(RedisProtocol.RESP3);\n} catch (JedisProtocolNotSupportedException e) {\n  // server lacks HELLO (Redis < 6.0 or filtering proxy): fall back to RESP2\n  return connectWithProtocol(RedisProtocol.RESP2);\n}","preventionTips":["Check the server's redis_version before enabling RESP3.","Maintain an env-specific protocol setting (RESP2 for older fleets).","Avoid Redis-subset proxies if you need RESP3 features.","Upgrade Redis to >= 6.0 to use HELLO-based negotiation."],"tags":["protocol","resp3","compatibility","server-version","hello-command"],"backgroundTag":"feature-not-enabled","analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}