{"record":{"id":"c4ede742b4b78d9a","repo":"apache/seatunnel","slug":"port-must-be-positive","errorCode":null,"errorMessage":"port must be positive","messagePattern":"port must be positive","errorType":"exception","errorClass":"NumberFormatException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisNodeResolver.java","lineNumber":68,"sourceCode":"        if (StringUtils.isBlank(node)) {\n            throw new DorisConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    String.format(\n                            \"PluginName: Doris, Message: Option '%s' contains a blank node entry.\",\n                            optionName));\n        }\n        int splitIndex = node.lastIndexOf(':');\n        if (splitIndex <= 0 || splitIndex == node.length() - 1) {\n            throw new DorisConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    String.format(\n                            \"PluginName: Doris, Message: Option '%s' contains invalid host:port value '%s'.\",\n                            optionName, node));\n        }\n        try {\n            int port = Integer.parseInt(node.substring(splitIndex + 1));\n            if (port <= 0) {\n                throw new NumberFormatException(\"port must be positive\");\n            }\n        } catch (NumberFormatException e) {\n            throw new DorisConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    String.format(\n                            \"PluginName: Doris, Message: Option '%s' contains invalid host:port value '%s'.\",\n                            optionName, node));\n        }\n    }\n}\n","sourceCodeStart":50,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisNodeResolver.java#L50-L79","documentation":"Within validateNode, the port substring is parsed with Integer.parseInt and must be > 0; a zero or negative port raises NumberFormatException(\"port must be positive\"), which is caught and rethrown as the invalid host:port CONFIG_VALIDATION_FAILED error (869). The bare message here is the internal sentinel; users normally see the wrapped message.","triggerScenarios":"A node entry like \"fe1:0\" or \"fe1:-1\" — port parses as an int but is <= 0.","commonSituations":"Placeholder ports left as 0 in generated configs; negative values from bad templating math; typo such as \"fe1:803o\" would instead hit the parse-number path (869).","solutions":["Change the port to a positive integer matching the actual Doris port (FE http 8030 / BE http 8040 by default)","Validate the option value with a quick regex (^[^:]+:[0-9]+$) before submitting the job","Fix the config generator/template that emitted a 0 or negative port"],"exampleFix":"// before\nfrontends = \"doris-fe:0\";\n// after\nfrontends = \"doris-fe:8030\";","handlingStrategy":"validation","validationCode":"final int port = Integer.parseInt(node.substring(node.lastIndexOf(':') + 1));\nif (port <= 0 || port > 65535) throw new IllegalArgumentException(\"invalid port in \" + node);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never use 0 or negative placeholder ports in shipped configs","Validate ports against the known Doris defaults (8030/8040)","Regex-check generated configs: ^[^:]+:[1-9][0-9]*$"],"tags":["doris","config-validation","port"],"backgroundTag":"value-out-of-range","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"}