apache/seatunnel · error · RedisConnectorException

RedisErrorCode-01

RedisErrorCode-01

Error message

Failed to get the redis version

What it means

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.

Source

Thrown at seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisParameters.java:173

    private int extractRedisVersion(Jedis jedis) {
        log.info("Try to get redis version information from the jedis.info() method");
        // # Server
        // redis_version:5.0.14
        // redis_git_sha1:00000000
        // redis_git_dirty:0
        String info = jedis.info();
        try {
            for (String line : info.split("\n")) {
                if (line.startsWith("redis_version:")) {
                    // 5.0.14
                    String versionInfo = line.split(":")[1].trim();
                    log.info("The version of Redis is :{}", versionInfo);
                    String[] parts = versionInfo.split("\\.");
                    return Integer.parseInt(parts[0]);
                }
            }
        } catch (Exception e) {
            throw new RedisConnectorException(
                    GET_REDIS_VERSION_INFO_FAILED,
                    GET_REDIS_VERSION_INFO_FAILED.getErrorMessage(),
                    e);
        }
        throw new RedisConnectorException(
                GET_REDIS_VERSION_INFO_FAILED,
                "Did not get the expected redis_version from the jedis.info() method");
    }

    public Jedis buildJedis() {
        switch (mode) {
            case SINGLE:
                Jedis jedis = new Jedis(host, port);
                if (StringUtils.isNotBlank(auth)) {
                    jedis.auth(auth);
                }
                if (StringUtils.isNotBlank(user)) {
                    jedis.aclSetUser(user);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check connectivity/credentials: run `redis-cli -h <host> -p <port> -a <password> INFO server` and confirm redis_version appears.
  2. Ensure the Redis proxy/service in use does not block the INFO command; if it does, connect directly or enable INFO.
  3. Inspect the wrapped cause (the exception carries `e`) for the underlying Jedis error.
  4. Retry job submission if the failure was a transient network issue.

Example fix

// before (proxy blocks INFO)
# proxy config allows: get set ...
// after
# allow the 'info' command through the proxy, or point nodes directly at redis
Defensive patterns

Strategy: try-catch

Try / catch

try {
    buildRedisClient(...);
} catch (RedisConnectorException e) {
    // inspect e.getCause() for underlying Jedis/auth error; check INFO availability
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/f3a57d91d5d35a66. Report an issue: GitHub.