apache/seatunnel · error · DorisConnectorException

ROUTING_FAILED

ROUTING_FAILED

Error message

argument 'routing' is illegal, value is '%routing%'.

What it means

Thrown by Routing.parseRouting when a Doris BE address string does not split into exactly one host and one port component (e.g. missing colon, extra colons, or empty host/port). The value passed as the 'routing' argument is the offending input.

Source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/source/serialization/Routing.java:45

/** present a Doris BE address. */
public class Routing {
    private static Logger logger = LoggerFactory.getLogger(Routing.class);

    private String host;
    private int port;

    public Routing(String routing) throws IllegalArgumentException {
        parseRouting(routing);
    }

    private void parseRouting(String routing) throws IllegalArgumentException {
        logger.debug("Parse Doris BE address: '{}'.", routing);
        String[] hostPort = routing.split(":");
        if (hostPort.length != 2) {
            logger.error("Format of Doris BE address '{}' is illegal.", routing);
            String errMsg =
                    String.format(ErrorMessages.ILLEGAL_ARGUMENT_MESSAGE, "routing", routing);
            throw new DorisConnectorException(DorisConnectorErrorCode.ROUTING_FAILED, errMsg);
        }
        this.host = hostPort[0];
        try {
            this.port = Integer.parseInt(hostPort[1]);
        } catch (NumberFormatException e) {
            logger.error(
                    String.format(
                            ErrorMessages.PARSE_NUMBER_FAILED_MESSAGE,
                            "Doris BE's port",
                            hostPort[1]));
            String errMsg =
                    String.format(ErrorMessages.PARSE_NUMBER_FAILED_MESSAGE, "routing", routing);
            throw new DorisConnectorException(DorisConnectorErrorCode.ROUTING_FAILED, errMsg, e);
        }
    }

    public String getHost() {
        return host;

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Ensure the routing value is 'host:port', e.g. '192.168.1.10:8040'
  2. Check the Doris FE 'show backends' HTTP address source producing the value
  3. Bracket IPv6 hosts or convert them to a host:port representation the parser accepts
  4. Trim/validate node address config before passing to the source

Example fix

// before
new Routing("fe-host")            // throws
// after
new Routing("fe-host:8040")
Defensive patterns

Strategy: validation

Validate before calling

// validate BE address before use
if (!address.matches("^[^:]+:\\d+$")) throw new IllegalArgumentException("expect host:port, got " + address);

Type guard

boolean isHostPort(String s){ String[] p = s.split(":"); return p.length == 2 && !p[0].isEmpty(); }

Try / catch

try { new Routing(addr); } catch (DorisConnectorException e) { LOG.error("bad routing '{}'", addr, e); }

Prevention

When it happens

Trigger: A routing entry from DorisClusterInfo/BE http address list lacks a port ('192.168.1.10'), has extra colons (IPv6 literal), or is empty/malformed; constructor Routing(...) calls parseRouting.

Common situations: FE returned BE node addresses in unexpected format; manually configured node addresses missing ':port'; IPv6 addresses without bracketing; whitespace or empty entries in the address list.

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


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