apache/seatunnel · error · EdgeSocketConnectorException
PACKET_DECODE_ERROR
PACKET_DECODE_ERROR
Error message
Deserialize edge ingress packet failed
What it means
EdgeSocketPacketRecordDeserializer.deserializeRecord() converts a raw ingress packet into a queued record (decrypt, then resolve compression). Any unexpected exception during this pipeline that is not already an EdgeSocketConnectorException is wrapped as EdgeSocketConnectorException with code PACKET_DECODE_ERROR and message 'Deserialize edge ingress packet failed', preserving the root cause.
Solutions
- Inspect the wrapped cause exception to identify the failing parse step.
- Verify sender and receiver use the same packet schema/version and packet_mode.
- Capture a raw packet sample and validate it against the expected ingress packet format.
- Ensure the producer's packet_mode and encryption settings match the consumer config.
Defensive patterns
Strategy: try-catch
Try / catch
try {
EdgeSocketQueuedRecord record = deserializer.deserializeRecord(rawPacket);
} catch (EdgeSocketConnectorException e) {
if (e.getErrorCode() == EdgeSocketConnectorErrorCode.PACKET_DECODE_ERROR) {
// inspect e.getCause() and quarantine the raw packet
}
} Prevention
- Pin matching packet schema versions on both ends.
- Enable raw-frame logging at the sender to debug malformed packets.
- Smoke-test the full pipeline (producer -> consumer) after version upgrades.
When it happens
Trigger: deserializeRecord() encounters a non-EdgeSocketConnectorException while parsing the packet (malformed JSON/binary structure, Base64 decode failure on iv, crypto errors, unexpected field types). Known EdgeSocketConnectorExceptions are rethrown unchanged.
Common situations: Sender and receiver disagree on packet schema/version, a peer sending garbage or truncated frames, or wrong packet_mode producing binary the record deserializer cannot parse.
Understand the failure class
Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.
Related errors
- PACKET_UNSUPPORTED_COMPRESSION
- PACKET_UNSUPPORTED_ENCRYPTION
- A deserialization failure event arrived
- COMMON-02
- COMMON-02
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/75f0b63673884fbf.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/serialize/record/EdgeSocketPacketRecordDeserializer.java:70
*/
@Override
public EdgeSocketQueuedRecord deserializeRecord(String rawMessage) {
try {
EdgeSocketIngressPacket packet =
OBJECT_MAPPER.readValue(rawMessage, EdgeSocketIngressPacket.class);
byte[] payloadBytes = Base64.getDecoder().decode(packet.getPayload());
EdgeSocketEncryptionType encryptionType =
EdgeSocketEncryptionType.from(defaultIfBlank(packet.getEncryption()));
byte[] decryptedPayload = decodeEncryption(payloadBytes, packet, encryptionType);
EdgeSocketCompressionType compressionType =
EdgeSocketCompressionType.from(defaultIfBlank(packet.getCompression()));
return new EdgeSocketQueuedRecord(decryptedPayload, compressionType);
} catch (EdgeSocketConnectorException known) {
throw known;
} catch (Exception exception) {
throw new EdgeSocketConnectorException(
EdgeSocketConnectorErrorCode.PACKET_DECODE_ERROR,
"Deserialize edge ingress packet failed",
exception);
}
}
/**
* Decode payload encryption according to packet metadata.
*
* @param payloadBytes base64-decoded payload bytes from packet
* @param packet ingress packet metadata
* @param encryptionType resolved encryption type
* @return decrypted payload bytes (or original bytes when encryption is NONE)
*/
private byte[] decodeEncryption(
byte[] payloadBytes,
EdgeSocketIngressPacket packet,
EdgeSocketEncryptionType encryptionType) {View on GitHub (pinned to cf67b549a7)