{"record":{"id":"3e32a509c2079634","repo":"apache/seatunnel","slug":"nodes-d-must-be-in-host-port-format-got-s","errorCode":null,"errorMessage":"nodes[%d]: must be in 'host:port' format, got: %s","messagePattern":"nodes\\[(.+?)\\]: must be in 'host:port' format, got: (.+?)","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisNodesValidator.java","lineNumber":46,"sourceCode":"\n    private static final Pattern NODE_PATTERN = Pattern.compile(\"^[^:]+:\\\\d+$\");\n\n    @Override\n    public String description() {\n        return \"each node must be in 'host:port' format with port in [\"\n                + RedisBaseOptions.MIN_PORT\n                + \", \"\n                + RedisBaseOptions.MAX_PORT\n                + \"]\";\n    }\n\n    @Override\n    public boolean evaluate(ReadonlyConfig config, List<String> value)\n            throws OptionValidationException {\n        for (int i = 0; i < value.size(); i++) {\n            String node = value.get(i);\n            if (node == null || !NODE_PATTERN.matcher(node).matches()) {\n                throw new OptionValidationException(\n                        \"nodes[%d]: must be in 'host:port' format, got: %s\", i, node);\n            }\n            int colon = node.indexOf(':');\n            String host = node.substring(0, colon);\n            if (host.trim().isEmpty()) {\n                throw new OptionValidationException(\n                        \"nodes[%d]: host must not be blank in 'host:port', got: %s\", i, node);\n            }\n            String portStr = node.substring(colon + 1);\n            int port;\n            try {\n                port = Integer.parseInt(portStr);\n            } catch (NumberFormatException e) {\n                throw new OptionValidationException(\n                        \"nodes[%d]: port '%s' is out of range [%d, %d]\",\n                        i, portStr, RedisBaseOptions.MIN_PORT, RedisBaseOptions.MAX_PORT);\n            }\n            if (port < RedisBaseOptions.MIN_PORT || port > RedisBaseOptions.MAX_PORT) {","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisNodesValidator.java#L28-L64","documentation":"Thrown by RedisNodesValidator.evaluate when an entry of the redis 'nodes' option is not in 'host:port' format (fails NODE_PATTERN or is null), or when the host part is empty. It raises OptionValidationException with a message including the offending index and value, failing config validation before the job runs.","triggerScenarios":"Job config lists redis nodes (cluster/sentinel mode) and any element lacks host:port — e.g. missing port, extra scheme ('redis://host:6379'), spaces, empty host ('':6379), or a comma-separated single string instead of a list.","commonSituations":"Users paste a Redis URL instead of host:port; port omitted because default 6379 was assumed; copying 'host1:6379,host2:6379' into one list element; IPv6 addresses not matching the pattern; leading/trailing whitespace.","solutions":["Change the node entry to plain 'host:port' form, e.g. '127.0.0.1:6379' — strip schemes, paths, and extra protocol prefixes","Split comma-separated node strings into separate list elements","Add the port explicitly (default 6379) even if the server uses it","For IPv6 hosts, check the validator's NODE_PATTERN — bracket or reformat as required by the pattern"],"exampleFix":"// before\nnodes = [\"redis://10.0.0.1:6379\", \"10.0.0.2,10.0.0.3:6379\"]\n// after\nnodes = [\"10.0.0.1:6379\", \"10.0.0.2:6379\", \"10.0.0.3:6379\"]","handlingStrategy":"validation","validationCode":"Pattern NODE_PATTERN = Pattern.compile(\"^[^:]+:\\\\d+$\");\nfor (String n : nodes) {\n  if (n == null || !NODE_PATTERN.matcher(n.trim()).matches()) throw new IllegalArgumentException(\"bad node: \" + n);\n}","typeGuard":null,"tryCatchPattern":"try { validator.evaluate(config, nodeList); } catch (OptionValidationException e) {\n  // read e.getMessage() for offending index/value and correct the config before resubmitting\n}","preventionTips":["Always specify nodes as explicit 'host:port' strings, one per list element","Include the port explicitly; never rely on defaults in configs","Strip URI schemes (redis://) and whitespace before submitting","Validate configs with a linter or the same regex in CI"],"tags":["redis","config","validation","format"],"backgroundTag":"invalid-argument-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}