apache/seatunnel · error · IllegalArgumentException
Unsupported encryption type: %s, supported: %s
Error message
Unsupported encryption type: %s, supported: %s
What it means
EdgeSocketEncryptionType.from() converts the configured encryption value into its enum. An unrecognized string results in an IllegalArgumentException enumerating the supported encryption types. This prevents misconfigured encryption from silently disabling packet confidentiality.
Source
Thrown at seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/serialize/EdgeSocketEncryptionType.java:59
* Resolve encryption enum from config/packet value.
*
* @param value user configured or packet declared encryption string
* @return matched encryption type
*/
public static EdgeSocketEncryptionType from(String value) {
Objects.requireNonNull(value, "encryptionType must not be null");
String normalized = value.trim().toLowerCase(Locale.ROOT);
for (EdgeSocketEncryptionType encryptionType : values()) {
if (encryptionType.getValue().equals(normalized)
|| encryptionType.name().equalsIgnoreCase(normalized)) {
return encryptionType;
}
}
String supported =
Arrays.stream(values())
.map(EdgeSocketEncryptionType::getValue)
.collect(Collectors.joining(", "));
throw new IllegalArgumentException(
"Unsupported encryption type: " + value + ", supported: " + supported);
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Use exactly one of the supported values printed in the message (typically 'none' or 'aes_gcm').
- Align the encryption value with the peer's packet encoding settings.
- Normalize casing/underscores in the config value.
Example fix
// before encryption = "AES-GCM" // after encryption = "aes_gcm"
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Arrays.stream(EdgeSocketEncryptionType.values()).map(EdgeSocketEncryptionType::getValue).collect(Collectors.toSet());
if (encryption != null && !valid.contains(encryption.trim())) {
throw new IllegalArgumentException("encryption must be one of " + valid);
} Prevention
- Use the exact enum values (none / aes_gcm), not TLS cipher-suite names.
- Keep producer and consumer encryption configs identical.
- Document the chosen value in your config template.
When it happens
Trigger: EdgeSocketEncryptionType.from(value) called with a value such as 'aes' or 'AES-GCM' instead of the exact supported value (e.g. 'aes_gcm' or 'none').
Common situations: Typos in the encryption config option, sender/receiver using different naming conventions for AES-GCM, or values copied from TLS cipher-suite names.
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
- Unknown encryption: ${value}
- Unknown format type:
- not support this type of bufferType: ${bufferType}
- COMMON_ILLEGAL_ARGUMENT
- Unsupported auth type: %s, supported: %s
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/6d1db4ae6892f9c0.
Report an issue: GitHub.