apache/seatunnel · error · IllegalArgumentException
transport.auth-type must be "token" when set; "none" is not…
Error message
transport.auth-type must be "token" when set; "none" is not supported.
What it means
validateAuthType normalizes the optional transport.auth-type value and only accepts "token" (case-insensitive). Any other non-empty value, including "none", is rejected with IllegalArgumentException, because the transport no longer supports unauthenticated connections. Null/empty means 'use default' and passes.
Solutions
- Change transport.auth-type to "token" in the config.
- If no auth is desired, remove the transport.auth-type entry entirely (null/empty is accepted).
- Check the release notes for the version that dropped "none" support and migrate the peer/endpoint to token auth.
- Verify no trailing/leading whitespace plus case mix produces an unexpected literal (though trim/lowercase handles this, the value itself must be 'token').
Example fix
// before
transport {
auth-type = "none"
}
// after
transport {
auth-type = "token"
} Defensive patterns
Strategy: validation
Validate before calling
if (cfg.hasPath("transport.auth-type")) {
String v = cfg.getString("transport.auth-type").trim().toLowerCase(Locale.ROOT);
if (!v.isEmpty() && !v.equals("token")) {
throw new IllegalStateException("transport.auth-type must be \"token\" when set (got: " + v + ")");
}
} Type guard
boolean isSupportedAuthType(String authType) {
return authType == null || authType.trim().isEmpty()
|| "token".equals(authType.trim().toLowerCase(Locale.ROOT));
} Try / catch
try {
EdgeTransportConfig transportConfig = new EdgeTransportConfig(config);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("auth-type")) {
LOG.error("Unsupported transport.auth-type; only 'token' (or unset) is allowed", e);
}
throw e;
} Prevention
- Use a curated config template that only contains supported auth-type values.
- When migrating from versions that allowed "none", remove the key instead of keeping it.
- Grep deployment configs for auth-type and whitelist values in your deployment tooling.
- Document the single supported value in your team's config reference.
When it happens
Trigger: Setting transport.auth-type to any value other than "token" (e.g. "none", "basic", "oauth") in the transport config before EdgeTransportConfig is constructed.
Common situations: Migrating from an older agent version where "none" was allowed; copying config templates that used auth-type = "none"; typo'd values like "Token " handled fine but "token2" or "bearer" rejected; disabling auth to debug connectivity.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Option ' ' is not valid for the selected authentication_type
- accessId and accesskey must be provided when sts_token is…
- At least one sink plugin must be configured.
- At least one source plugin must be configured.
- AzureCosmosDB requires key, primary_key, secondary_key, or…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/1aedc7eb3836357c.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-edge-agent/seatunnel-edge-agent-transport/src/main/java/org/apache/seatunnel/edge/agent/transport/config/EdgeTransportConfig.java:110
return max;
}
return Math.min(max, doubled);
}
public static void sleepQuiet(long millis) throws InterruptedException {
if (millis <= 0) {
return;
}
Thread.sleep(millis);
}
private static void validateAuthType(String authType) {
if (authType == null || authType.trim().isEmpty()) {
return;
}
String normalized = authType.trim().toLowerCase(Locale.ROOT);
if (!normalized.equals("token")) {
throw new IllegalArgumentException(
"transport.auth-type must be \"token\" when set; \"none\" is not supported.");
}
}
}
View on GitHub (pinned to cf67b549a7)