Issue
I noticed an issue, when sending a message to an AS2 server which rejects the message.
The AS2 server responds with a synchronous negative MDN, thus OpenAS2 renames the original message and resends the message. The AS2 server rejects the message again with a MDN and so on... After the retry limit has been reached there is no trace of the "original" message in the filesystem.
Only some WARN/ERRORs in the log like
WARN org.openas2.util.AS2Util -- Cleanup could not find pendinginfo file: /opt/openas2/bin/../config/../data/pendinginfoMDN3/20250314152915+0100-477-AAAAID_BBBBID_555555.txt
...
ERROR org.openas2.util.AS2Util -- Error moving file to /opt/openas2/bin/../config/../data/outbox/error/2025-03-14/BBBBID : Source '/opt/openas2/bin/../config/../data/pendingMDN3/20250314152915+0100-477-AAAAID_BBBBID_555555.txt' does not exist
(Pasted here to allow others to find this issue by the error message)
Reproduction
See my annotated screenshot of a minimal example:

The flow is
- the message in the filesystem is found and assigned a message number 477 (marked as red for illlustration) and send
- a negative MDN is received, 477 is renamed to 635 (marked as blue) and put into the resend queue
- !!! First issue:
Cleanup could not find pendinginfo file: for a file 477
- 635 is picked up for sending
- a negative MDN is received, the retry limit has been reached and the resending process is aborted
- !!! Second issue:
Error moving file to .... outbox/error/ for a file 477
- Neither 477 nor 635 is found the filesystem below /data
Analysis
You fixed similar issues in
Perhaps you missed that edge case?
Especially the Pending MDN MSG FILE deleted code introduced https://github.com/OpenAS2/OpenAs2App/pull/394/files#diff-36957f051b53aa4ba9e4c8756ee720e75b1674b945c3c6cad875781175a1981eR775 looks suspicious. The Pending MDN MSG FILE code deletes the file which is missing later.
Pending MDN MSG FILE deleted: /opt/openas2/bin/../config/../data/pendingMDN3/20250314152915+0100-477-AAAAID_BBBBID_555555.txt [<20250314152915+0100-477-AAAAID_BBBBID_555555.txt>]`
...
Error moving file to /opt/openas2/bin/../config/../data/outbox/error/2025-03-14/BBBBID : Source '/opt/openas2/bin/../config/../data/pendingMDN3/20250314152915+0100-477-AAAAID_BBBBID_555555.txt' does not exist
Environment
OpenAS2 4.0.x, Temurin 17
Issue
I noticed an issue, when sending a message to an AS2 server which rejects the message.
The AS2 server responds with a synchronous negative MDN, thus OpenAS2 renames the original message and resends the message. The AS2 server rejects the message again with a MDN and so on... After the retry limit has been reached there is no trace of the "original" message in the filesystem.
Only some WARN/ERRORs in the log like
(Pasted here to allow others to find this issue by the error message)
Reproduction
See my annotated screenshot of a minimal example:
The flow is
Cleanup could not find pendinginfo file:for a file 477Error moving file to .... outbox/error/for a file 477Analysis
You fixed similar issues in
Perhaps you missed that edge case?
Especially the
Pending MDN MSG FILE deletedcode introduced https://github.com/OpenAS2/OpenAs2App/pull/394/files#diff-36957f051b53aa4ba9e4c8756ee720e75b1674b945c3c6cad875781175a1981eR775 looks suspicious. ThePending MDN MSG FILEcode deletes the file which is missing later.Environment
OpenAS2 4.0.x, Temurin 17