apache/seatunnel · error · StarRocksConnectorException

CREATE_BE_READER_FAILED

CREATE_BE_READER_FAILED

Error message

Format of StarRocks BE address[%s] is illegal

What it means

Thrown by the StarRocksBeReadClient constructor when the BE node address string cannot be split into exactly one host and one port by ':'. The constructor requires a `host:port` string to build the Thrift connection to the StarRocks backend.

Solutions

  1. Ensure each BE address in the source config is in `host:port` form with the Thrift port (default 9060 / heartbeats port).
  2. Check what the FE returns in the scan plan (`SHOW BACKENDS`) and confirm the address format.
  3. For IPv6, bracket the address or upgrade the connector — the naive split cannot handle bare IPv6.
  4. Trim stray separators (spaces, trailing semicolons) from the node URL list.

Example fix

// before
source {
  StarRocks {
    nodeUrls = ["fe-host:8030", "be-host"]   // missing port
  }
}
// after
source {
  StarRocks {
    nodeUrls = ["fe-host:8030", "be-host:9060"]
  }
}
Defensive patterns

Strategy: validation

Validate before calling

// Validate each node address before job launch:
for addr in $NODE_URLS; do
  [[ "$addr" =~ ^[^:]+:[0-9]+$ ]] || { echo "Bad BE/FE address: $addr (need host:port)" >&2; exit 1; }
done

Try / catch

try {
    client = new StarRocksBeReadClient(beNodeInfo, sourceConfig);
} catch (StarRocksConnectorException e) {
    if (e.getMessage().contains("is illegal")) {
        throw new ConfigException("Node address must be host:port: " + beNodeInfo, e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Constructing StarRocksBeReadClient with a beNodeInfo string like "192.168.1.10" (no port), "host:9010:extra", or an empty string; the split(";")-delimited node list from FE query plan yields a malformed BE address.

Common situations: Misconfigured `URL`/node addresses in the source config (missing port); FE returning IPv6 addresses containing multiple colons that break the naive split; trailing whitespace or semicolons in the node list producing empty segments.

Understand the failure class

Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/client/source/StarRocksBeReadClient.java:66

public class StarRocksBeReadClient implements Serializable {
    private static final String DEFAULT_CLUSTER_NAME = "default_cluster";

    private TStarrocksExternalService.Client client;
    private final String ip;
    private final int port;
    private String contextId;
    private int readerOffset = 0;
    private final SourceConfig sourceConfig;
    private SeaTunnelRowType seaTunnelRowType;
    private ArrowToSeatunnelRowReader rowBatch;
    protected AtomicBoolean eos = new AtomicBoolean(false);

    public StarRocksBeReadClient(String beNodeInfo, SourceConfig sourceConfig) {
        this.sourceConfig = sourceConfig;
        log.debug("Parse StarRocks BE address: '{}'.", beNodeInfo);
        String[] hostPort = beNodeInfo.split(":");
        if (hostPort.length != 2) {
            throw new StarRocksConnectorException(
                    StarRocksConnectorErrorCode.CREATE_BE_READER_FAILED,
                    String.format("Format of StarRocks BE address[%s] is illegal", beNodeInfo));
        }
        this.ip = hostPort[0].trim();
        this.port = Integer.parseInt(hostPort[1].trim());
        TBinaryProtocol.Factory factory = new TBinaryProtocol.Factory();
        TSocket socket =
                new TSocket(
                        ip,
                        port,
                        sourceConfig.getConnectTimeoutMs(),
                        sourceConfig.getConnectTimeoutMs());
        try {
            socket.open();
        } catch (TTransportException e) {
            socket.close();
            throw new StarRocksConnectorException(
                    StarRocksConnectorErrorCode.CREATE_BE_READER_FAILED,

View on GitHub (pinned to cf67b549a7)