Hosted SaaS solution for AS2 and SFTP file transfer. No infrastructure, instant setup.
Struggling with AS2 EDI transfer failures? This AS2 troubleshooting guide covers AS2 errors, MDN troubleshooting, connection failures, and fixes.
Janaka Bandara
Modified: 31 Aug 2026
Most AS2 EDI errors fall into four buckets: certificate problems (failed decryption or signature verification), network and HTTP errors on transmission, MDN configuration mismatches, and MIC mismatches. AS2 troubleshooting is mostly a matter of identifying which layer failed, inbound or outbound, then applying the standard fix for that category. This guide walks each one with its symptoms and remedies.
AS2 EDI transfers are transactional. The sender needs confirmation that the recipient could actually interpret the content, not just receive it. A complete EDI transaction requires two things:
Each EDI file is sent as its own AS2 message. That means a complete EDI transaction involves at least two separate AS2 transmissions: one for the original file and one for the returned acknowledgment. For a deeper primer on this relationship, see our must-know facts on AS2.
Inbound failures occur on the receiving side when the recipient cannot decode, verify, or process an incoming AS2 message.
If the receiving AS2 server cannot match the AS2-From or AS2-To headers to a known trading party, it will reject the message often with an HTTP 422 error or a negative MDN citing an “unknown AS2 association.”
Fix: Compare AS2 identifiers on both ends and correct any mismatches.
The sender encrypts each message using the recipient’s public certificate. Decryption fails most often because:
Fix: Compare the certificate serial number and issuer on both ends. For payload corruption, check the Content-Length header against the actual received size, and retry using AS2 restart for large files.
AS2 encryption/decryption flow
The sender signs each message so the recipient can verify authenticity. This step fails when:
Fix: Import the missing certificate chain into the recipient’s trust store, confirm the correct verification certificate is assigned, and check Content-Transfer-Encoding settings if digests consistently mismatch without evidence of tampering.
The receiver calculates a message integrity check (MIC) and returns it in the MDN. If the sender’s own MIC calculation doesn’t match, an “unmatched MIC” error appears even though the MDN itself may show as successful.
Common causes include a mismatched MIC algorithm between sender and receiver or differences in MIC string formatting (e.g. sha-256 vs sha256). Persistent mismatches after previously successful exchanges can also signal payload corruption or interference.
Fix: Align the MIC algorithm and string format on both ends. If exchanges were previously clean, review certificates for signs of compromise.
Outbound failures happen on the sending side, when a message fails to reach the receiver or the receiver’s response can’t be interpreted.
Since AS2 connectivity runs over HTTP, network issues can interrupt any transmission. Common variants include:
Fix: Diagnose with tools like nslookup or openssl s_client (based on the symptom), and retry the transmission as appropriate.
Flowchart of AS2 network error diagnosis steps
A successful network transfer can still return an HTTP-level error:
| Code | Likely Cause |
|---|---|
| 301/302/307 | Incorrect partner URL (wrong protocol, hostname, or missing trailing slash) |
| 401/403 | Missing or invalid authentication, or firewall blocking the request |
| 413 | Payload exceeds the receiver’s size limit |
| 400/422 | Malformed request or missing/invalid AS2-From/AS2-To identifiers |
| 500/502/503/504 | Receiver-side error, downtime, or gateway timeout — status should be confirmed before retrying |
Fix: Match the error code against the table above, and confirm partner-side configuration where the cause isn’t included in the response body.
If an expected MDN never arrives, check whether synchronous or asynchronous MDN mode was requested:
Disposition-Notification-Options header mismatch between sender and receiver.This is one of the most common categories covered under general AS2 debugging, since both connectivity and configuration issues can produce the same symptom.
Comparison of sync vs async MDN delivery
If the receiver signs the returned MDN and the sender cannot verify it, the sender has no guarantee the receipt is authentic. As with unmatched MIC errors, the MDN may still show as otherwise successful.
Fix: Confirm the receiver’s verification certificate is correctly configured on the sender’s side.
| Symptom | Most Likely Layer |
|---|---|
| HTTP 4xx/5xx response | Outbound — connectivity or partner configuration |
| Negative MDN with certificate error | Inbound — encryption/signature mismatch |
| “Unmatched MIC” | MIC algorithm or formatting mismatch |
| MDN never arrives | Sync/async MDN configuration mismatch |
| 997 missing after successful MDN | EDI-level acknowledgment issue, not AS2 |
For a broader checklist before going live with a new AS2 and EDI connection, see our AS2 compliance checklist. And if you’re setting up a new trading partner connection from scratch, our guide on Tractor Supply AS2 EDI connectivity walks through a real-world example end to end.
For the formal specification behind these behaviors, the AS2 RFC 4130 standard remains the authoritative reference.
Check whether you requested a synchronous or asynchronous MDN. In sync mode, a missing MDN usually points to a Disposition-Notification-Options mismatch between you and your partner. In async mode, the MDN can simply be delayed, so allow a reasonable window, sometimes up to an hour, before treating it as a genuine failure.
Decryption fails when the sender encrypted with the wrong certificate, when your certificate was recently renewed and the sender still holds an old copy, or when the payload was corrupted in transit. Compare the certificate serial number and issuer on both ends, and check the received size against the Content-Length header.
The receiver returns a message integrity check in the MDN. If your own MIC calculation does not match, you get an unmatched MIC error even when the MDN itself looks successful. It is usually a MIC algorithm or string-format mismatch, for example sha-256 versus sha256. Align both.
No. A 200 confirms the transmission was received, not that the content was decrypted, verified, and accepted at the EDI level. A complete X12 transaction also needs a positive MDN and a 997 functional acknowledgment.
HTTP 4xx/5xx responses and connection errors are outbound problems on your side or the partner’s endpoint. Negative MDNs citing certificate or association errors are inbound problems the receiver hit while decoding your message. Identifying the layer first is the whole game.
Most AS2 errors fall into a handful of predictable categories — certificate mismatches, network issues, MDN configuration, or MIC mismatches. Once you know which category you’re dealing with, the fix is usually quick.
A good AS2 server will isolate failed messages, support automatic retries, and alert administrators the moment a transmission fails — saving hours of manual AS2 debugging.
Start your free AS2 Gateway trial →
Still stuck on a specific error? Reach out to our support team — we’re happy to help you pinpoint it.
Join hundreds of organizations already taking full control of their B2B AS2 communications with our trusted solutions. Contact us today to tailor a solution that fits your specific AS2 EDI needs.
Get full access to whichever product fits your needs. Configure real trading partner connections, run end-to-end transactions, and see the platform perform before making any commitment. All three products include a free 30-day trial with no restrictions.