javasslhttps

OpenAS2 AS2ReceiverHandler: HTTP connection error on inbound message


I am looking for some assistance with a vanilla (default) installation of OpenAS2. I've installed it on both Win7 and Ubuntu (Vivid), and both have the exact same problem.

When testing the in-built test system (www.openas2.localhost), the sending partner (openas2a) is unable to connect to the receiving partner (openas2b) with message 'HTTP connection error on inbound message'. The inner exception appears to be SSLHandshakeException: Remote host closed connection during handshake.

What is causing the Java exceptions?


I have java debugging on which produces the following output:

OpenAS2 v1.3.6
Starting Server...
Loading configuration...
keyStore is : 
keyStore type is : jks
keyStore provider is : 
init keystore
init keymanager of type SunX509
trustStore is: C:\Program Files (x86)\Java\jre1.8.0_77\lib\security\cacerts
trustStore type is : jks
trustStore provider is : 
init truststore
adding as trusted cert:
  Subject: CN=Equifax Secure Global eBusiness CA-1, O=Equifax Secure Inc., C=US
  Issuer:  CN=Equifax Secure Global eBusiness CA-1, O=Equifax Secure Inc., C=US
  Algorithm: RSA; Serial number: 0xc3517
  Valid from Mon Jun 21 14:00:00 AEST 1999 until Mon Jun 22 14:00:00 AEST 2020

adding as trusted cert: many others....

adding as trusted cert:
  Subject: CN=GlobalSign, O=GlobalSign, OU=GlobalSign ECC Root CA - R5
  Issuer:  CN=GlobalSign, O=GlobalSign, OU=GlobalSign ECC Root CA - R5
  Algorithm: EC; Serial number: 0x605949e0262ebb55f90a778a71f94ad86c
  Valid from Tue Nov 13 10:00:00 AEST 2012 until Tue Jan 19 13:14:07 AEST 2038

trigger seeding of SecureRandom
done seeding SecureRandom
Registering Session to Command Processor...
Starting Active Modules...
***
found key for : www.openas2.localhost
chain [0] = [
[
  Version: V3
  Subject: CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 2048 bits
  modulus: 16383754617192974288727163135611226202273995406554730476402462848874591580805828784676504630763246925177090995738208345505639465793683703813393043588390985354740160828829599047563118601260348138946756755600951616156428430048913461043080395716017127280732137736701714203613956574445954383991370521896881556004982355967720484786856591675490491770429493908215898536597343809002736708367393497850088738921341770722928949544627351113450757924348314320404473391813392273705627559157274010498754436930755473297643380584048175809470015476244560415789723301993886675231480119950587842267369222518647513409937778069513475193267
  public exponent: 65537
  Validity: [From: Wed Aug 19 23:18:08 AEST 2015,
               To: Sat Aug 16 23:18:08 AEST 2025]
  Issuer: CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  SerialNumber: [    5afcfb23]

Certificate Extensions: 1
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 3F D9 98 61 4E F9 1F 5C   E5 E9 7F BC 9A 28 9A 1E  ?..aN..\.....(..
0010: 6B 13 98 FD                                        k...
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:
0000: 64 04 7E B5 F9 E2 29 D4   6B AA F4 6D 28 10 FD E1  d.....).k..m(...
0010: 73 44 F6 88 69 E6 15 B5   6C 41 76 D6 01 2D 6C 42  sD..i...lAv..-lB
0020: 85 67 CD 34 97 77 59 D8   94 51 CA 88 84 87 0F 53  .g.4.wY..Q.....S
0030: DB 42 85 6F AF 5E 60 1E   E5 5B D0 56 0C 6E F1 A6  .B.o.^`..[.V.n..
0040: D8 34 2B 97 FA 30 58 E7   21 B1 0D 1B 15 E6 6A 3F  .4+..0X.!.....j?
0050: CB CF 1A A0 D0 CD 8F 38   FB 66 BC C3 C0 AA 81 44  .......8.f.....D
0060: 96 A7 F3 84 31 7E 83 78   49 88 B8 92 8A 41 3C F7  ....1..xI....A<.
0070: 13 4C EF 16 5E 07 2A A9   5E 3C D5 2C E3 02 41 25  .L..^.*.^<.,..A%
0080: 3D 4A BC 2D 49 1F 2E 82   D5 B0 D3 68 03 4D C1 CC  =J.-I......h.M..
0090: 85 E7 1F 59 13 64 85 4D   07 F8 19 C1 D1 A2 89 3C  ...Y.d.M.......<
00A0: 8B 51 33 8E 0A CC F0 FC   BA 11 21 2B 95 C7 C7 BE  .Q3.......!+....
00B0: 3E C9 AC FD BF 07 10 F4   92 55 64 2D BE 93 68 D1  >........Ud-..h.
00C0: 7F 2A 96 75 8D BD 9B 8B   42 ED 7B 00 B3 61 A6 A1  .*.u....B....a..
00D0: EE CF BF AF 11 E9 68 2A   87 AF C9 B0 C0 5D AB DC  ......h*.....]..
00E0: 17 E8 DD BA 85 03 86 36   9B 60 4E A9 8A 5C 2B 34  .......6.`N..\+4
00F0: EF 7D EA 80 CA D6 90 74   CC E2 5B 26 1C A1 71 B0  .......t..[&..q.

]
***
adding as trusted cert:
  Subject: CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  Issuer:  CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  Algorithm: RSA; Serial number: 0x5afcfb23
  Valid from Wed Aug 19 23:18:08 AEST 2015 until Sat Aug 16 23:18:08 AEST 2025

trigger seeding of SecureRandom
done seeding SecureRandom
***
found key for : www.openas2.localhost
chain [0] = [
[
  Version: V3
  Subject: CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 2048 bits
  modulus: 16383754617192974288727163135611226202273995406554730476402462848874591580805828784676504630763246925177090995738208345505639465793683703813393043588390985354740160828829599047563118601260348138946756755600951616156428430048913461043080395716017127280732137736701714203613956574445954383991370521896881556004982355967720484786856591675490491770429493908215898536597343809002736708367393497850088738921341770722928949544627351113450757924348314320404473391813392273705627559157274010498754436930755473297643380584048175809470015476244560415789723301993886675231480119950587842267369222518647513409937778069513475193267
  public exponent: 65537
  Validity: [From: Wed Aug 19 23:18:08 AEST 2015,
               To: Sat Aug 16 23:18:08 AEST 2025]
  Issuer: CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  SerialNumber: [    5afcfb23]

Certificate Extensions: 1
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 3F D9 98 61 4E F9 1F 5C   E5 E9 7F BC 9A 28 9A 1E  ?..aN..\.....(..
0010: 6B 13 98 FD                                        k...
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:
0000: 64 04 7E B5 F9 E2 29 D4   6B AA F4 6D 28 10 FD E1  d.....).k..m(...
0010: 73 44 F6 88 69 E6 15 B5   6C 41 76 D6 01 2D 6C 42  sD..i...lAv..-lB
0020: 85 67 CD 34 97 77 59 D8   94 51 CA 88 84 87 0F 53  .g.4.wY..Q.....S
0030: DB 42 85 6F AF 5E 60 1E   E5 5B D0 56 0C 6E F1 A6  .B.o.^`..[.V.n..
0040: D8 34 2B 97 FA 30 58 E7   21 B1 0D 1B 15 E6 6A 3F  .4+..0X.!.....j?
0050: CB CF 1A A0 D0 CD 8F 38   FB 66 BC C3 C0 AA 81 44  .......8.f.....D
0060: 96 A7 F3 84 31 7E 83 78   49 88 B8 92 8A 41 3C F7  ....1..xI....A<.
0070: 13 4C EF 16 5E 07 2A A9   5E 3C D5 2C E3 02 41 25  .L..^.*.^<.,..A%
0080: 3D 4A BC 2D 49 1F 2E 82   D5 B0 D3 68 03 4D C1 CC  =J.-I......h.M..
0090: 85 E7 1F 59 13 64 85 4D   07 F8 19 C1 D1 A2 89 3C  ...Y.d.M.......<
00A0: 8B 51 33 8E 0A CC F0 FC   BA 11 21 2B 95 C7 C7 BE  .Q3.......!+....
00B0: 3E C9 AC FD BF 07 10 F4   92 55 64 2D BE 93 68 D1  >........Ud-..h.
00C0: 7F 2A 96 75 8D BD 9B 8B   42 ED 7B 00 B3 61 A6 A1  .*.u....B....a..
00D0: EE CF BF AF 11 E9 68 2A   87 AF C9 B0 C0 5D AB DC  ......h*.....]..
00E0: 17 E8 DD BA 85 03 86 36   9B 60 4E A9 8A 5C 2B 34  .......6.`N..\+4
00F0: EF 7D EA 80 CA D6 90 74   CC E2 5B 26 1C A1 71 B0  .......t..[&..q.

]
***
adding as trusted cert:
  Subject: CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  Issuer:  CN=www.openas2.localhost, OU=QA, O=OpenAS2A_SSL, L=New York, ST=New York, C=US
  Algorithm: RSA; Serial number: 0x5afcfb23
  Valid from Wed Aug 19 23:18:08 AEST 2015 until Sat Aug 16 23:18:08 AEST 2025

trigger seeding of SecureRandom
done seeding SecureRandom
OpenAS2 Started
03/30/16 18:23:03 OpenAS2Server: - OpenAS2 Started -
Loading Command Processor...[Thread[Thread-2,5,main], Thread[Thread-3,5,main]]
Loading Command Processor...[Thread[Thread-2,5,main], Thread[Thread-3,5,main]]
03/30/16 18:23:03 DirectoryResenderModule: loaded message for resend. [<OPENAS2-30032016150400+1000-1399@OpenAS2B_OID_OpenAS2A_OID>]
03/30/16 18:23:03 AS2SenderModule: message sender invoked [<OPENAS2-30032016150400+1000-1399@OpenAS2B_OID_OpenAS2A_OID>]
03/30/16 18:23:03 AS2SenderModule: Save Original mic & message id information into file: C:\OpenAS2\config/../data/pendinginfoMDN3/OPENAS2-30032016150400+1000-1399@OpenAS2B_OID_OpenAS2A_OID [<OPENAS2-30032016150400+1000-1399@OpenAS2B_OID_OpenAS2A_OID>]
adding as trusted cert: A bunch more CA's....

adding as trusted cert:
  Subject: CN=GlobalSign, O=GlobalSign, OU=GlobalSign ECC Root CA - R5
  Issuer:  CN=GlobalSign, O=GlobalSign, OU=GlobalSign ECC Root CA - R5
  Algorithm: EC; Serial number: 0x605949e0262ebb55f90a778a71f94ad86c
  Valid from Tue Nov 13 10:00:00 AEST 2012 until Tue Jan 19 13:14:07 AEST 2038

trigger seeding of SecureRandom
done seeding SecureRandom
03/30/16 18:23:03 AS2SenderModule: Connecting to: https://www.openas2.localhost:10080 [<OPENAS2-30032016150400+1000-1399@OpenAS2B_OID_OpenAS2A_OID>]
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
Timer-4, setSoTimeout(60000) called
Timer-4, setSoTimeout(60000) called
03/30/16 18:23:03 AS2ReceiverHandler: incoming connection 127.0.0.1 63621
Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for TLSv1
Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 for TLSv1
Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1.1
Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for TLSv1.1
Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1.1
Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 for TLSv1.1
Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 for TLSv1.1
%% No cached client session
***** ClientHello, TLSv1.2**
RandomCookie:  GMT: 1442483175 bytes = { 39, 101, 156, 92, 216, 60, 96, 168, 56, 94, 167, 164, 169, 0, 198, 42, 71, 176, 140, 206, 42, 183, 22, 79, 94, 152, 12, 137 }
Session ID:  {}
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
Compression Methods:  { 0 }
Extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}
Extension ec_point_formats, formats: [uncompressed]
Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA224withECDSA, SHA224withRSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA
Extension server_name, server_name: [type=host_name (0), value=www.openas2.localhost]
***
[write] MD5 and SHA1 hashes:  len = 265
0000: 01 00 01 05 03 03 56 FB   8C E7 27 65 9C 5C D8 3C  ......V...'e.\.<
0010: 60 A8 38 5E A7 A4 A9 00   C6 2A 47 B0 8C CE 2A B7  `.8^.....*G...*.
0020: 16 4F 5E 98 0C 89 00 00   64 C0 24 C0 28 00 3D C0  .O^.....d.$.(.=.
0030: 26 C0 2A 00 6B 00 6A C0   0A C0 14 00 35 C0 05 C0  &.*.k.j.....5...
0040: 0F 00 39 00 38 C0 23 C0   27 00 3C C0 25 C0 29 00  ..9.8.#.'.<.%.).
0050: 67 00 40 C0 09 C0 13 00   2F C0 04 C0 0E 00 33 00  g.@...../.....3.
0060: 32 C0 2C C0 2B C0 30 00   9D C0 2E C0 32 00 9F 00  2.,.+.0.....2...
0070: A3 C0 2F 00 9C C0 2D C0   31 00 9E 00 A2 C0 08 C0  ../...-.1.......
0080: 12 00 0A C0 03 C0 0D 00   16 00 13 00 FF 01 00 00  ................
0090: 78 00 0A 00 34 00 32 00   17 00 01 00 03 00 13 00  x...4.2.........
00A0: 15 00 06 00 07 00 09 00   0A 00 18 00 0B 00 0C 00  ................
00B0: 19 00 0D 00 0E 00 0F 00   10 00 11 00 02 00 12 00  ................
00C0: 04 00 05 00 14 00 08 00   16 00 0B 00 02 01 00 00  ................
00D0: 0D 00 18 00 16 06 03 06   01 05 03 05 01 04 03 04  ................
00E0: 01 03 03 03 01 02 03 02   01 02 02 00 00 00 1A 00  ................
00F0: 18 00 00 15 77 77 77 2E   6F 70 65 6E 61 73 32 2E  ....www.openas2.
0100: 6C 6F 63 61 6C 68 6F 73   74                       localhost
Timer-4, WRITE: TLSv1.2 Handshake, length = 265
[Raw write]: length = 270
0000: 16 03 03 01 09 01 00 01   05 03 03 56 FB 8C E7 27  ...........V...'
0010: 603/30/16 18:23:03 AS2ReceiverHandler: HTTP connection error on inbound message. [null]
5 9C 5C D8 3C 60 A8 38   5E A7 A4 A9 00 C6 2A 47  e.\.<`.8^.....*G
0020: B0 8C CE 2A B7 16 4F 5E   98 0C 89 00 00 64 C0 24  ...*..O^.....d.$
0030: C0 28 00 3D C0 26 C0 2A   00 6B 00 6A C0 0A C0 14  .(.=.&.*.k.j....
0040: 00 35 C0 05 C0 0F 00 39   00 38 C0 23 C0 27 00 3C  .5.....9.8.#.'.<
0050: C0 25 C0 29 00 67 00 40   C0 09 C0 13 00 2F C0 04  .%.).g.@...../..
0060: C0 0E 00 33 00 32 C0 2C   C0 2B C0 30 00 9D C0 2E  ...3.2.,.+.0....
0070: C0 32 00 9F 00 A3 C0 2F   00 9C C0 2D C0 31 00 9E  .2...../...-.1..
0080: 00 A2 C0 08 C0 12 00 0A   C0 03 C0 0D 00 16 00 13  ................
0090: 03/30/16 18:23:03 **java.io.IOException: Invalid HTTP Request:**   Vû?ç'e?\Ø<`¨8^§¤© Æ*G°?Î*·O^??  dÀ$À( =À&À* k jÀ
À 5ÀÀ 9 8À#À' <À%À) g @À    À /ÀÀ 3 2À,À+À0 ?À.À2 ? £À/ ?À-À1 ? ¢ÀÀ 
ÀÀ
    at org.openas2.util.HTTPUtil.readRequest(Unknown Source)
    at org.openas2.util.HTTPUtil.readData(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.handle(Unknown Source)
    at org.openas2.processor.receiver.NetModule$ConnectionThread.run(Unknown Source)

00 FF 01 00 00 78 00 0A   00 34 00 32 00 17 00 01  .....x...4.2....
00A0: 00 03 00 13 00 15 00 06   00 07 00 09 00 0A 00 18  ................
00B0: 00 0B 00 0C 00 19 00 0D   00 0E 00 0F 00 10 00 11  ................
00C0: 00 02 00 12 00 04 00 05   00 14 00 08 00 16 00 0B  ................
00D0: 00 02 01 00 00 0D 00 18   00 16 06 03 06 01 05 03  ................
00E0: 05 01 04 03 04 01 03 03   03 01 02 03 02 01 02 02  ................
00F0: 00 00 00 1A 00 18 00 00   15 77 77 77 2E 03/30/16 18:23:03 OpenAS2Exception: Error occurred:: Invalid HTTP Request:    Vû?ç'e?\Ø<`¨8^§¤© Æ*G°?Î*·O^??  dÀ$À( =À&À* k jÀ
À 5ÀÀ 9 8À#À' <À%À) g @À    À /ÀÀ 3 2À,À+À0 ?À.À2 ? £À/ ?À-À1 ? ¢ÀÀ 
ÀÀ
    Sources: {}
6F 70 65  .........www.ope
0100: 6E 61 73 32 2E 6C 6F 63   61 6C 68 6F 73 74        nas2.localhost
Timer-4, received EOFException: error
Timer-4, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Timer-4, SEND TLSv1.2 ALERT:  fatal, description = handshake_failure
Timer-4, WRITE: TLSv1.2 Alert, length = 2
[Raw write]: length = 7
0000: 15 03 03 00 02 02 28                               ......(
Timer-4, called closeSocket()
Timer-4, called close()
Timer-4, called closeInternal(true)
03/30/16 18:23:03 AS2SenderModule: Unexpected error sending file: SSL peer shut down incorrectly [<OPENAS2-30032016150400+1000-1399@OpenAS2B_OID_OpenAS2A_OID>]
03/30/16 18:23:03 javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at org.openas2.processor.sender.AS2SenderModule.sendMessage(Unknown Source)
    at org.openas2.processor.sender.AS2SenderModule.handle(Unknown Source)
    at org.openas2.processor.DefaultProcessor.handle(Unknown Source)
    at org.openas2.processor.resender.DirectoryResenderModule.processFile(Unknown Source)
    at org.openas2.processor.resender.DirectoryResenderModule.resend(Unknown Source)
    at org.openas2.processor.resender.BaseResenderModule$PollTask.run(Unknown Source)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(Unknown Source)
    ... 17 more

03/30/16 18:23:03 AS2Util: Renamed pending info file : OPENAS2-30032016150400+1000-1399@OpenAS2B_OID_OpenAS2A_OID :::: New name: OPENAS2-30032016182303+1000-5484@OpenAS2B_OID_OpenAS2A_OID [<OPENAS2-30032016182303+1000-5484@OpenAS2B_OID_OpenAS2A_OID>]
03/30/16 18:23:03 DirectoryResenderModule: message put in resend queue [<OPENAS2-30032016182303+1000-5484@OpenAS2B_OID_OpenAS2A_OID>]
Finalizer, called close()
Finalizer, called closeInternal(true)
Terminate batch job (Y/N)? 

Solution

  • The problem was that the default config.xml contains ambiguous entries for "module classname="org.openas2.processor.receiver.AS2ReceiverModule" wherethere are two such entries for OpenAS2A and OpenAS2B. The default settings have OpenAS2A sending on port 10080 with OpenAS2B receiving on port 10443. Once receiving was set to 10080 as well, the transfer completed without issue.