apache/seatunnel · error · RedisConnectorException
RedisErrorCode-04
RedisErrorCode-04
Error message
No available nodes in cluster
What it means
Thrown by JedisWrapper.info() for a Redis cluster: if jedisCluster.getClusterNodes() returns an empty map, no node is available, so the wrapper raises RedisConnectorException (GET_REDIS_INFO_ERROR) with 'No available nodes in cluster'.
Source
Thrown at seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/JedisWrapper.java:99
public Set<String> smembers(final String key) {
return jedisCluster.smembers(key);
}
@Override
public long zadd(final String key, final double score, final String member) {
return jedisCluster.zadd(key, score, member);
}
@Override
public List<String> zrange(final String key, final long start, final long stop) {
return jedisCluster.zrange(key, start, stop);
}
@Override
public String info() {
Map<String, ConnectionPool> nodes = jedisCluster.getClusterNodes();
if (nodes.isEmpty()) {
throw new RedisConnectorException(
GET_REDIS_INFO_ERROR, "No available nodes in cluster");
}
// Traverse all nodes and try to obtain the info
for (Map.Entry<String, ConnectionPool> entry : nodes.entrySet()) {
try {
Jedis jedis = getJedis(entry.getKey());
return jedis.info();
} catch (Exception e) {
log.warn("Failed to get info from node: {}", entry.getKey(), e);
}
}
throw new RedisConnectorException(
GET_REDIS_INFO_ERROR, "Failed to get redis info from all node in cluster");
}
@OverrideView on GitHub (pinned to cf67b549a7)
Solutions
- Verify seed node host:port entries in config are correct and reachable (telnet/redis-cli ping each node)
- Check that cluster nodes are healthy with 'redis-cli cluster nodes' and that CLUSTER INFO shows cluster_state:ok
- Open firewall access to both the client port (6379) and the cluster bus port (16379 by default)
- Recreate/reconnect the JedisCluster client — the empty node map can persist after a failed initial discovery
Defensive patterns
Strategy: retry
Validate before calling
// before job: verify cluster reachable
for (String n : nodes) { try (Jedis j = new Jedis(host, port)) { j.ping(); } } Try / catch
try { String info = wrapper.info(); } catch (RedisConnectorException e) {
// recreate JedisCluster to refresh topology, then retry after backoff
} Prevention
- Verify all seed nodes are reachable from workers before submission
- Keep cluster_state:ok and monitor with CLUSTER INFO
- Open both client port and cluster bus port (port+10000) in firewalls
- Rebuild JedisCluster clients after topology changes
When it happens
Trigger: Calling info() on a cluster-mode Redis client when the cluster node map is empty — the JedisCluster was created against unreachable nodes or topology discovery returned nothing.
Common situations: All cluster nodes down or unreachable from the worker; misconfigured cluster seed nodes; JedisCluster initialized before the cluster finished formation; firewall blocking the cluster bus port (usually 10000 + data port).
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- RedisErrorCode-06
- Failed to get info from node: {}
- CLUSTER_LIST_GET_FAILED
- SHOULD_NEVER_HAPPEN
- Failed to list databases
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/91bd703835833477.
Report an issue: GitHub.