OpenAS2 / OpenAs2App

OpenAS2 is a java-based implementation of the EDIINT AS2 standard. It is intended to be used as a server. It is extremely configurable and supports a wide variety of signing and encryption algorithms.

Home Page:https://sourceforge.net/projects/openas2/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue: file stored on sent dir on resend, message ID pendingMDN issue

tanakaPD opened this issue · comments

OpenAS2 version 3.10.1

When an "Unexpected error sending file" occurs during file sending, AS2 Message ID and pending file name are updated, message is put in resend queue (with new AS2 message ID) and a copy of the file is stored, with the new AS2 message ID reference, in the sent dir (but at this moment the file was not actually sent):

2024-05-29 03:25:56.623 ERROR AS2SenderModule: Unexpected error sending file: Read timed out [<OPENAS2-29052024032455+0000-e2e64d09-0947-4b9d-87e9-e37aeb46ee3e@Sender_APD_AS2>]
java.net.SocketTimeoutException: Read timed out

2024-05-29 03:25:56.624 FINE AS2Util: Renamed pending info file : OPENAS2-29052024032455+0000-e2e64d09-0947-4b9d-87e9-e37aeb46ee3e@Sender_APD_AS2 :::: New name: OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2 [<OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2>]
2024-05-29 03:25:56.626 FINE DirectoryResenderModule: Message put in resend queue [<OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2>]
2024-05-29 03:25:56.627 FINE AS2Util: moved /home/as2/openas2/bin/../config/../data/mdn/pendingMDN/OPENAS2-29052024032455+0000-e2e64d09-0947-4b9d-87e9-e37aeb46ee3e@Sender_APD_AS2 to /home/as2/openas2/bin/../config/../data/sent/2024/05/050098_025948828.EDI-OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2 [<OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2>]

when finally the file is correctly sent, the program looks for a file with the original AS2 message ID in the pending MDN folder, not the updated one:

2024-05-29 03:31:32.408 FINE AS2Util: Message sent and MDN received successfully. [<OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2>]
2024-05-29 03:31:33.302 ERROR AS2Util: Error moving file to /home/as2/openas2/bin/../config/../data/sent/2024/05 : Source '/home/as2/openas2/bin/../config/../data/mdn/pendingMDN/OPENAS2-29052024032455+0000-e2e64d09-0947-4b9d-87e9-e37aeb46ee3e@Sender_APD_AS2' does not exist [<OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2>]
java.io.FileNotFoundException: Source '/home/as2/openas2/bin/../config/../data/mdn/pendingMDN/OPENAS2-29052024032455+0000-e2e64d09-0947-4b9d-87e9-e37aeb46ee3e@Sender_APD_AS2' does not exist

2024-05-29 03:31:33.303 FINE AS2Util: deleted /home/as2/openas2/bin/../config/../data/mdn/pendingMDN/OPENAS2-29052024032455+0000-e2e64d09-0947-4b9d-87e9-e37aeb46ee3e@Sender_APD_AS2 [<OPENAS2-29052024032556+0000-4e4160f8-3561-453c-95fa-f022429c5b78@Sender_APD_AS2>]

This behavior is not present in version 2.14.0

I will look into this ASAP.

I have figured out the problem and reworking handling of MDNs but summer holidays loom so may be a few weeks befrore a fix is released.