apache/seatunnel · error · IllegalArgumentException
Unsupported packet mode: %s, supported: %s
Error message
Unsupported packet mode: %s, supported: %s
What it means
EdgeSocketPacketMode.from() maps the configured packet mode string to its enum. Unknown values throw IllegalArgumentException listing supported modes. Packet mode controls how records are framed in ingress packets, so invalid values are rejected at startup.
Source
Thrown at seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/serialize/EdgeSocketPacketMode.java:59
* Resolve packet mode from config value.
*
* @param mode configured packet mode string
* @return matched packet mode enum
*/
public static EdgeSocketPacketMode from(String mode) {
Objects.requireNonNull(mode, "packetMode must not be null");
String normalized = mode.trim().toLowerCase(Locale.ROOT);
for (EdgeSocketPacketMode packetMode : values()) {
if (packetMode.getValue().equals(normalized)
|| packetMode.name().equalsIgnoreCase(normalized)) {
return packetMode;
}
}
String supported =
Arrays.stream(values())
.map(EdgeSocketPacketMode::getValue)
.collect(Collectors.joining(", "));
throw new IllegalArgumentException(
"Unsupported packet mode: " + mode + ", supported: " + supported);
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Set the packet mode option to one of the supported values listed in the message.
- Check trailing whitespace and casing in the config value.
- Review the connector docs for the valid packet mode names.
Example fix
// before packet_mode = "stream" // after packet_mode = "record"
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Arrays.stream(EdgeSocketPacketMode.values()).map(EdgeSocketPacketMode::getValue).collect(Collectors.toSet());
if (packetMode == null || !valid.contains(packetMode.trim())) {
throw new IllegalArgumentException("packet_mode must be one of " + valid);
} Prevention
- Check the connector docs for supported packet modes before setting packet_mode.
- Avoid copying packet_mode values from other connectors.
- Fill in config templates fully; never leave packet_mode blank when required.
When it happens
Trigger: EdgeSocketPacketMode.from(mode) invoked with an unsupported mode string (e.g. 'stream', wrong casing, or blank when a value is required).
Common situations: Typos in the packet_mode config option, copying packet mode names from a different connector, or blank values left in config templates.
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
- Unsupported auth type: %s, supported: %s
- Unknown format type:
- not support this type of bufferType: ${bufferType}
- COMMON_ILLEGAL_ARGUMENT
- Unsupported compression type: %s, supported: %s
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4e9b25ab23db96be.
Report an issue: GitHub.