apache/seatunnel · error · IllegalArgumentException

transport.endpoint is required.

Error message

transport.endpoint is required.

What it means

EdgeTransportConfig's constructor parses transport settings from ReadonlyConfig and requires a non-blank transport.endpoint. The endpoint defines the server address the agent connects to; without it the transport cannot be built, so it throws this IllegalArgumentException immediately.

Source

Thrown at seatunnel-edge-agent/seatunnel-edge-agent-transport/src/main/java/org/apache/seatunnel/edge/agent/transport/config/EdgeTransportConfig.java:49

@Getter
public class EdgeTransportConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    private final String endpoint;
    private final String token;
    private final int connectTimeoutMs;
    private final int readTimeoutMs;
    private final int maxBatchSendAttempts;
    private final long initialBackoffMs;
    private final long maxBackoffMs;
    private final int maxReconnectCycles;

    public EdgeTransportConfig(ReadonlyConfig config) {
        Objects.requireNonNull(config, "config");
        String rawEndpoint = config.get(EdgeTransportOptions.ENDPOINT);
        if (rawEndpoint == null || rawEndpoint.trim().isEmpty()) {
            throw new IllegalArgumentException("transport.endpoint is required.");
        }
        String trimmedEndpoint = rawEndpoint.trim();
        EdgeTransportEndpoints.validateFormat(trimmedEndpoint);
        this.endpoint = trimmedEndpoint;

        String authType = config.get(EdgeTransportOptions.AUTH_TYPE);
        validateAuthType(authType);
        String rawToken = config.getOptional(EdgeTransportOptions.TOKEN).orElse(null);
        if (rawToken == null || rawToken.trim().isEmpty()) {
            throw new IllegalArgumentException("transport.token is required.");
        }
        this.token = rawToken.trim();

        EdgePacketMode.from(config.get(EdgeTransportOptions.PACKET_MODE));
        EdgePacketCompressionType.from(config.get(EdgeTransportOptions.COMPRESSION));
        EdgePacketEncryptionType encryption =
                EdgePacketEncryptionType.from(config.get(EdgeTransportOptions.ENCRYPTION));
        if (encryption == EdgePacketEncryptionType.AES_GCM) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Add a valid transport.endpoint value to the agent config, e.g. transport:\n endpoint: host:9090.
  2. Check the key spelling and nesting — the option must sit under transport:, matching EdgeTransportOptions.ENDPOINT.
  3. Ensure deployment templating actually injects the endpoint for the target environment.
  4. Confirm the endpoint passes EdgeTransportEndpoints.validateFormat (correct host:port form) once present.

Example fix

// before
transport:
  token: abc123
// after
transport:
  endpoint: 10.0.0.5:9090
  token: abc123
Defensive patterns

Strategy: validation

Validate before calling

String ep = config.get(EdgeTransportOptions.ENDPOINT); if (ep == null || ep.trim().isEmpty()) { throw new IllegalArgumentException("transport.endpoint must be set in config"); }

Type guard

boolean hasEndpoint(org.apache.seatunnel.shade.com.typesafe.config.ReadonlyConfig c) { String v = c.get(EdgeTransportOptions.ENDPOINT); return v != null && !v.trim().isEmpty(); }

Try / catch

try { new EdgeTransportConfig(config); } catch (IllegalArgumentException e) { if (e.getMessage().equals("transport.endpoint is required.")) { log.error("Add transport.endpoint to agent config"); } throw e; }

Prevention

When it happens

Trigger: Constructing new EdgeTransportConfig(config) where config has no transport.endpoint option, or the value is null/whitespace.

Common situations: Agent YAML missing the transport: section entirely; endpoint key misspelled or nested at the wrong level; environment-specific config templates with the endpoint left blank; config filtering dropping the key during deployment.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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