Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while receiving AS2 Document in 3.0.2 #174

Closed
mganeshs opened this issue Sep 12, 2014 · 12 comments
Closed

Error while receiving AS2 Document in 3.0.2 #174

mganeshs opened this issue Sep 12, 2014 · 12 comments

Comments

@mganeshs
Copy link

Hi, When we are receiving AS2 document from our partner, we get following error.

I have pasted the error message below.

Kindly let me know what might have went wrong.

Regards,

2014-09-12 11:38:31,359 INFO [eu.peppol.as2.InboundMessageReceiver] [] Receiving message ..
2014-09-12 11:38:31,360 INFO [eu.peppol.as2.InboundMessageReceiver] [] Message contains valid Disposition-notification-options, now creating internal AS2 message...
2014-09-12 11:38:31,440 INFO [eu.peppol.as2.InboundMessageReceiver] [] Validating AS2 Message: As2Message{mimeMessage=javax.mail.internet.MimeMessage@625a4886, as2Version='1.0', as2From=APP_1000000040, as2To=APP_1000000041, subject='AS2 Transaction relayed by GalaxyGateway from Moneybird AP Client', transmissionId='eu.peppol.identifier.TransmissionId@154f87dc', date='Fri, 12 Sep 2014 13:36:36 +0200', dispositionNotificationOptions=signed-receipt-protocol=required,pkcs7-signature; signed-receipt-micalg=required,sha1, receiptDeliveryOption='null'}
2014-09-12 11:38:31,478 INFO [eu.peppol.as2.InboundMessageReceiver] [] Persisting AS2 Message ....
2014-09-12 11:38:31,478 INFO [eu.peppol.document.SimpleSbdhMessageRepository] [] Saved incoming message to /ebdata/installs/oxalis/store/inmsg/peppol/0106_00006661/APP_1000000040/0106_12345678/980629ae-65d2-4de3-8f61-ddccdb2baac9.xml
2014-09-12 11:38:31,701 INFO [eu.peppol.document.SimpleSbdhMessageRepository] [] Saved incoming message information to /ebdata/installs/oxalis/store/inmsg/peppol/0106_00006661/APP_1000000040/0106_12345678/980629ae-65d2-4de3-8f61-ddccdb2baac9.txt
2014-09-12 11:38:31,705 INFO [eu.peppol.as2.InboundMessageReceiver] [] Persisting statistics
2014-09-12 11:38:31,706 INFO [eu.peppol.as2.InboundMessageReceiver] [] Message received OK, MDN returned: MdnData {subject='AS2 MDN as you requested', as2From='APP_1000000041', as2To='APP_1000000040', as2Disposition=automatic-action/MDN-sent-automatically; processed, mic='F+TDB9swGr5DxvQW1Gj31hiGnJY=, sha1', date=Fri, 12 Sep 2014 11:38:31 +0000, messageId='980629ae-65d2-4de3-8f61-ddccdb2baac9'}
2014-09-12 11:38:31,727 ERROR [eu.peppol.inbound.server.AS2Servlet] [] Internal error occured: null
java.lang.NullPointerException: null
at org.apache.tomcat.util.http.parser.HttpParser.parseMediaType(HttpParser.java:217) ~[tomcat-coyote.jar:7.0.40]
at org.apache.tomcat.util.http.parser.MediaTypeCache.parse(MediaTypeCache.java:54) ~[tomcat-coyote.jar:7.0.40]
at org.apache.catalina.connector.Response.setContentType(Response.java:806) ~[catalina.jar:7.0.40]
at org.apache.catalina.connector.Response.checkSpecialHeader(Response.java:1119) ~[catalina.jar:7.0.40]
at org.apache.catalina.connector.Response.setHeader(Response.java:1446) ~[catalina.jar:7.0.40]
at org.apache.catalina.connector.ResponseFacade.setHeader(ResponseFacade.java:535) ~[catalina.jar:7.0.40]
at eu.peppol.inbound.server.AS2Servlet.setHeadersForMDN(AS2Servlet.java:166) ~[AS2Servlet.class:na]
at eu.peppol.inbound.server.AS2Servlet.doPost(AS2Servlet.java:131) ~[AS2Servlet.class:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) [servlet-api.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.40]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.40]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.40]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) [catalina.jar:7.0.40]
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.40]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.40]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008) [tomcat-coyote.jar:7.0.40]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) [tomcat-coyote.jar:7.0.40]
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) [tomcat-coyote.jar:7.0.40]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]
2014-09-12 11:38:31,728 ERROR [eu.peppol.inbound.server.AS2Servlet] [] Attempting to return MDN with explanatory message
2014-09-12 11:38:31,776 ERROR [eu.peppol.inbound.server.AS2Servlet] [] Returned MDN with failure: Message-ID: 1330243534.31.1410521911735.JavaMail.root@ip-10-62-119-49
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1;
boundary="----=_Part_30_1591621738.1410521911735"

------=_Part_30_1591621738.1410521911735
Content-Type: multipart/report; report-type=disposition-notification;
boundary="----=_Part_28_999608885.1410521911728"

------=_Part_28_999608885.1410521911728
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

The following headers were received:
date: Fri, 12 Sep 2014 13:36:36 +0200
message-id: 980629ae-65d2-4de3-8f61-ddccdb2baac9
subject: AS2 Transaction relayed by GalaxyGateway from Moneybird AP Client
content-type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; boundary="----=_Part_1_516468202.1410521796012"
as2-from: APP_1000000040
as2-to: APP_1000000041
disposition-notification-to: [email protected]
disposition-notification-options: signed-receipt-protocol=required,pkcs7-signature; signed-receipt-micalg=required,sha1
as2-version: 1.0
user-agent: www.galaxygw.com
host: peppolap.everbinding.nl
connection: Keep-Alive
accept-encoding: gzip,deflate
content-length: 46255

The message sent to AS2 System id APP_1000000040 on Fri, 12 Sep 2014 11:38:31 +0000 with subject AS2 MDN as you requested has been received.It has been processed The warning/error message is:
ERROR: null
------=_Part_28_999608885.1410521911728
Content-Type: message/disposition-notification
Content-Transfer-Encoding: 7bit

Reporting-UA: Oxalis
Disposition: automatic-action/MDN-sent-automatically; processed/ERROR: null
Original-Recipient: rfc822; APP_1000000040
Final-Recipient: rfc822; APP_1000000040
Original-Message-ID: 980629ae-65d2-4de3-8f61-ddccdb2baac9
Received-Content-MIC: ,

------=_Part_28_999608885.1410521911728--

------=_Part_30_1591621738.1410521911735
Content-Type: application/pkcs7-signature; name=smime.p7s; smime-type=signed-data
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIAwggRHMIID
L6ADAgECAhB507S90Ir7nIP5bPJB8XpWMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNVBAYTAkRLMScw
JQYDVQQKEx5OQVRJT05BTCBJVCBBTkQgVEVMRUNPTSBBR0VOQ1kxHzAdBgNVBAMTFlBFUFBPTCBB
Q0NFU1MgUE9JTlQgQ0EwHhcNMTQwMTA2MDAwMDAwWhcNMTYwMTA2MjM1OTU5WjBMMQswCQYDVQQG
EwJOTDEXMBUGA1UEAwwOQVBQXzEwMDAwMDAwNDExJDAiBgNVBAoMG2VDb25uZWN0IEludGVybmF0
aW9uYWwgQi5WLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALOeT7oGHsgk/vPGYWrm
7zBuoY2GWq67/zcoNC4RdUnov11A3xhpFbtTsE+9G3nFaWqCsSD5Jn9c/XKhl4iNTh7m66E81wx5
YOWV5iVMNnpbyH1tVOS15sTtwNYp5aqBFzCyaVEZi2GLmf7qeDL750VipiQ3uVJ3Tahv5SDDptwS
J6AXmOVdBzP86NE3qxDqxT5ICxhT2X5d5u2xYfH9raP+Wty4pgqQH0FDpVoM0YO97ez62tzJPRDW
nqpPqY8y7phA7sJrHJfcswH2+07mLbyW/1zdkdw+ZwYX/gq62nckRdwXbdkhQ+6pHnjyTH62ZDu5
bPzpYUpdSyvLrxlFI10CAwEAAaOCARgwggEUMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgO4MGwGA1Ud
HwRlMGMwYaBfoF2GW2h0dHA6Ly9vbnNpdGVjcmwudmVyaXNpZ24uY29tL0RpZ2l0YWxpc2VyaW5n
c3N0eXJlbHNlbk9wZW5QRVBQT0xBQ0NFU1NQT0lOVENBL0xhdGVzdENSTC5jcmwwHwYDVR0j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5kpNwPPUAtEoMjUfEMdWHxha
PO0xCl6CeedljLpA7zsjAm4efeunCtDYPv/zj+fNPmEo2vJCL75ekkHcox32QDGNGgULf5m+P1ez
fLgx2V4wER1PjKVeGQxoy75ao6fIGvX7CmQWTeHOeDjdJ1Uz7qQeFV8Ay1TscDb2holowDwfQZcA
AAAAAAA=
------=_Part_30_1591621738.1410521911735--

java.lang.NullPointerException: null
at org.apache.tomcat.util.http.parser.HttpParser.parseMediaType(HttpParser.java:217) ~[tomcat-coyote.jar:7.0.40]
at org.apache.tomcat.util.http.parser.MediaTypeCache.parse(MediaTypeCache.java:54) ~[tomcat-coyote.jar:7.0.40]
at org.apache.catalina.connector.Response.setContentType(Response.java:806) ~[catalina.jar:7.0.40]
at org.apache.catalina.connector.Response.checkSpecialHeader(Response.java:1119) ~[catalina.jar:7.0.40]
at org.apache.catalina.connector.Response.setHeader(Response.java:1446) ~[catalina.jar:7.0.40]
at org.apache.catalina.connector.ResponseFacade.setHeader(ResponseFacade.java:535) ~[catalina.jar:7.0.40]
at eu.peppol.inbound.server.AS2Servlet.setHeadersForMDN(AS2Servlet.java:166) ~[AS2Servlet.class:na]
at eu.peppol.inbound.server.AS2Servlet.doPost(AS2Servlet.java:131) ~[AS2Servlet.class:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) [servlet-api.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.40]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.40]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.40]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) [catalina.jar:7.0.40]
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) [catalina.jar:7.0.40]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.40]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.40]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008) [tomcat-coyote.jar:7.0.40]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) [tomcat-coyote.jar:7.0.40]
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) [tomcat-coyote.jar:7.0.40]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]
2014-09-12 11:38:31,776 ERROR [eu.peppol.inbound.server.AS2Servlet] [] ---------- REQUEST ERROR INFORMATION ENDS HERE --------------

@mganeshs
Copy link
Author

Just to give more information, this is the main issue which i took from above logs. It's failing while attempting to return MDN. Do we need to configure or set properties wrt AS2 under oxalis home directory ?

2014-09-12 11:38:31,728 ERROR [eu.peppol.inbound.server.AS2Servlet] [] Attempting to return MDN with explanatory message
2014-09-12 11:38:31,776 ERROR [eu.peppol.inbound.server.AS2Servlet] [] Returned MDN with failure: Message-ID: 1330243534.31.1410521911735.JavaMail.root@ip-10-62-119-49

@teedjay
Copy link
Contributor

teedjay commented Sep 16, 2014

Which oxalis version are you running, the tagged 3.0.1 or latest 3.0.2-SNAPSHOT?
Have you received anything on AS2 pr START from other partners?

@mganeshs
Copy link
Author

Hi, thanks for taking time to reply on this.

We are using 3.0.1, we are in process of moving to 3.0.2-snapshot.

Yes, for testing purpose we received a document based on AS2 from our partners. But we couldn't receive it successfully.

Let us know how we can solve this issue and whether do we need any specific configuration wrt AS2.

@teedjay
Copy link
Contributor

teedjay commented Sep 19, 2014

A potential null pointer exception has been fixed in the latest 3.0.2-snapshot.
Could you try with that version? If it still does not work you can reopen this case and we'll have to debug further.

@teedjay teedjay closed this as completed Sep 19, 2014
@bijeshcnair
Copy link

The same error is coming with version 3.0.2 also

@mganeshs
Copy link
Author

mganeshs commented Oct 1, 2014

We upgraded to 3.0.2 as you suggested. But still same error. Do we need to set any configuration wrt MDN ? Kindly let us know.

@mganeshs mganeshs changed the title Error while receiving AS2 Document Error while receiving AS2 Document in 3.0.2 Oct 1, 2014
@teedjay
Copy link
Contributor

teedjay commented Oct 1, 2014

You should not need to set any AS2/MDN options for this to work.

Do you know which software the sender use, there might be some unexpected headers present/missing that causes this exception.

Could you provide the output from the Oxalis "status" page : https://your-server-here/oxalis/status

@teedjay teedjay reopened this Oct 1, 2014
@Tickstar
Copy link

Tickstar commented Oct 1, 2014

Hi Thore,

The sender uses an access point managed and developed by Tickstar. Our access points are sending to other oxalis AP's on a daily basis, such as Unit4's, without any issues.

Best regards, Hans Berg

@teedjay
Copy link
Contributor

teedjay commented Oct 1, 2014

Thanks Hans!
Do you have a test recipient or URL I can send a test invoice to @mganeshs ?

@mganeshs
Copy link
Author

mganeshs commented Oct 1, 2014

Hi Thore,
The output of our /oxalis/Status is

version.oxalis: 3.0.2-SNAPSHOT
version.java: 1.7.0_21
oxalis.operation.mode: PRODUCTION
oxalis.pki.version: V2
oxalis.sml.hostname:
certificate.subject: O=eConnect International B.V.,CN=APP_1000000041,C=NL
certificate.issuer: CN=PEPPOL ACCESS POINT CA,O=NATIONAL IT AND TELECOM AGENCY,C=DK
certificate.expired: false
build.id: null
build.tstamp: null

Our endpoint is https://peppolap.everbinding.nl/as2

Let me know once you send a test invoice.

@teedjay
Copy link
Contributor

teedjay commented Oct 1, 2014

I got the same response, Tomcat returns 500 internal server error, when parsing mime media type.

I googled the mime parsing issue and it seems like there could be a bug that is fixed in Tomcat 7.0.41 and newer (you seem to run tomcat 7.0.40). https://issues.apache.org/bugzilla/show_bug.cgi?id=54703

Could you try a newer Tomcat 7.x ?

@teedjay
Copy link
Contributor

teedjay commented Oct 6, 2014

I'm closing this issue, the resolution is in #179

@teedjay teedjay closed this as completed Oct 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants