apache/seatunnel · error · OptionValidationException
nodes[ ]: host must not be blank in 'host:port', got
Error message
nodes[%d]: host must not be blank in 'host:port', got: %s
What it means
Redis connector validation of the `nodes` option failed because a node entry in 'host:port' format has a blank host part (e.g. ':6379'). The RedisNodesValidator parses each node string, splits it at the first colon, and rejects entries whose host portion is empty or whitespace-only. This fail-fast check prevents later connection failures with confusing Jedis errors.
Solutions
- Set a non-blank hostname before the colon for every node entry (e.g. '127.0.0.1:6379').
- If the host comes from an env var or placeholder, verify it is set and non-empty at config-render time.
- Check for stray commas or whitespace in the nodes list producing an empty host segment.
- Run the validation before job submission by inspecting the rendered config JSON.
Example fix
// before nodes = [":6379"] // after nodes = ["127.0.0.1:6379"]
Defensive patterns
Strategy: validation
Validate before calling
for (String node : nodes) {
int colon = node.indexOf(':');
if (colon <= 0 || node.substring(0, colon).trim().isEmpty()) {
throw new IllegalArgumentException("node host blank: " + node);
}
} Prevention
- Always specify 'host:port' with a real hostname
- Validate rendered config when using env-var templating
- Trim node lists to avoid empty segments from stray commas
When it happens
Trigger: Calling the validator's evaluate() with a nodes list where any entry is ':6379', ' :6379', or otherwise has no text before the colon; typically caused by a typo or an empty env-variable substitution in the host portion.
Common situations: Users templating config with env vars like ${REDIS_HOST}:6379 where REDIS_HOST is unset, copy-paste of cluster node lists with a leading comma producing an empty host, or hand-edited config dropping the hostname.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- nodes[ ]: port is out of range [ , ]
- nodes[ ]: port ' ' is out of range [ , ]
- tables_configs[ ]: 'keys' must be configured and non-blank
- All candidate sink tables were skipped during job parsing.
- AmazonDocumentDB option 'uri' must include authentication…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3e04caf6ca7d2893.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisNodesValidator.java:52
+ RedisBaseOptions.MIN_PORT
+ ", "
+ RedisBaseOptions.MAX_PORT
+ "]";
}
@Override
public boolean evaluate(ReadonlyConfig config, List<String> value)
throws OptionValidationException {
for (int i = 0; i < value.size(); i++) {
String node = value.get(i);
if (node == null || !NODE_PATTERN.matcher(node).matches()) {
throw new OptionValidationException(
"nodes[%d]: must be in 'host:port' format, got: %s", i, node);
}
int colon = node.indexOf(':');
String host = node.substring(0, colon);
if (host.trim().isEmpty()) {
throw new OptionValidationException(
"nodes[%d]: host must not be blank in 'host:port', got: %s", i, node);
}
String portStr = node.substring(colon + 1);
int port;
try {
port = Integer.parseInt(portStr);
} catch (NumberFormatException e) {
throw new OptionValidationException(
"nodes[%d]: port '%s' is out of range [%d, %d]",
i, portStr, RedisBaseOptions.MIN_PORT, RedisBaseOptions.MAX_PORT);
}
if (port < RedisBaseOptions.MIN_PORT || port > RedisBaseOptions.MAX_PORT) {
throw new OptionValidationException(
"nodes[%d]: port %d is out of range [%d, %d]",
i, port, RedisBaseOptions.MIN_PORT, RedisBaseOptions.MAX_PORT);
}
}
return true;View on GitHub (pinned to cf67b549a7)