{"record":{"id":"f3a57d91d5d35a66","repo":"apache/seatunnel","slug":"rediserrorcode-01","errorCode":"RedisErrorCode-01","errorMessage":"Failed to get the redis version","messagePattern":"Failed to get the redis version","errorType":"error_code","errorClass":"RedisConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisParameters.java","lineNumber":173,"sourceCode":"    private int extractRedisVersion(Jedis jedis) {\n        log.info(\"Try to get redis version information from the jedis.info() method\");\n        // # Server\n        // redis_version:5.0.14\n        // redis_git_sha1:00000000\n        // redis_git_dirty:0\n        String info = jedis.info();\n        try {\n            for (String line : info.split(\"\\n\")) {\n                if (line.startsWith(\"redis_version:\")) {\n                    // 5.0.14\n                    String versionInfo = line.split(\":\")[1].trim();\n                    log.info(\"The version of Redis is :{}\", versionInfo);\n                    String[] parts = versionInfo.split(\"\\\\.\");\n                    return Integer.parseInt(parts[0]);\n                }\n            }\n        } catch (Exception e) {\n            throw new RedisConnectorException(\n                    GET_REDIS_VERSION_INFO_FAILED,\n                    GET_REDIS_VERSION_INFO_FAILED.getErrorMessage(),\n                    e);\n        }\n        throw new RedisConnectorException(\n                GET_REDIS_VERSION_INFO_FAILED,\n                \"Did not get the expected redis_version from the jedis.info() method\");\n    }\n\n    public Jedis buildJedis() {\n        switch (mode) {\n            case SINGLE:\n                Jedis jedis = new Jedis(host, port);\n                if (StringUtils.isNotBlank(auth)) {\n                    jedis.auth(auth);\n                }\n                if (StringUtils.isNotBlank(user)) {\n                    jedis.aclSetUser(user);","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisParameters.java#L155-L191","documentation":"The Redis connector calls jedis.info() during client construction to read the server version (needed to pick compatible commands), and wraps any exception encountered into RedisConnectorException with code RedisErrorCode-01 ('Failed to get the redis version'). It also throws this when the INFO response contains no parseable redis_version line. Without the version the connector cannot safely feature-detect.","triggerScenarios":"extractRedisVersion() (called from buildRedisClient) fails because: the connection to Redis dropped, authentication failed, jedis.info() returned null/empty, or the INFO payload lacks a redis_version field; any Exception in the INFO parsing path triggers it, and the method also throws it if no version line was found at all.","commonSituations":"Redis is behind a proxy (e.g. Twemproxy/Codis) that strips or alters INFO, managed services that restrict the INFO command, wrong password causing an auth error during INFO, or transient network blips at startup.","solutions":["Check connectivity/credentials: run `redis-cli -h <host> -p <port> -a <password> INFO server` and confirm redis_version appears.","Ensure the Redis proxy/service in use does not block the INFO command; if it does, connect directly or enable INFO.","Inspect the wrapped cause (the exception carries `e`) for the underlying Jedis error.","Retry job submission if the failure was a transient network issue."],"exampleFix":"// before (proxy blocks INFO)\n# proxy config allows: get set ...\n// after\n# allow the 'info' command through the proxy, or point nodes directly at redis","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    buildRedisClient(...);\n} catch (RedisConnectorException e) {\n    // inspect e.getCause() for underlying Jedis/auth error; check INFO availability\n}","preventionTips":["Verify redis-cli INFO server works with your credentials","Ensure proxies don't block the INFO command","Check network stability before submitting jobs"],"tags":["redis","jedis","version-detection"],"backgroundTag":"unexpected-response-shape","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}