HTTPS Communications Difficulty

You are here

HTTPS Communications Difficulty

3 posts / 0 new
Last post
mmcdermott
mmcdermott's picture
HTTPS Communications Difficulty

I have been setting up a machine (Linux) to run mendelson AS2. On my machine, I set up another instance in order to test communication. I got the two machines communicating with HTTP, but when I enabled HTTPS on port 8443 (in the Jetty configuration file) and tried to use it, the only result I get is a vague "Connection problem".

I did a port scan of the remote machine, and the expected ports are open. When I go to the MDN URI (i.e. https://machineip:8443/as2/HttpReceiver), I get the expected page from Jetty. Logs of an example session appear below.

Because I can connect through the web interface, the URI does not seem to be the problem. Because of the port scan and the web interface, the firewall does not seem to be the problem.

When I go to the URI with a browser, I have to accept the certificate, so I am assuming that this is an SSL trust issue, but I do not know how to resolve it. Any pointers would be appreciated.

11:43:26 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Outgoing message signed with the algorithm SHA-1,using keystore alias "mothra_test2".
[11:43:26 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Outgoing message encrypted with the algorithm 3DES, using keystore alias "flagstone logistics".
[11:43:26 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Outbound AS2 message created from "message.txt" for the receiver "Flagstone Logistics" in 86ms, raw message size: 2.43 KB
[11:43:26 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: The file "message.txt" has been deleted and enqueued into the processing message queue of the server.
[11:43:27 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Transaction state written to /home/michael/Desktop/mendelson_as2/messages/Flagstone_Logistics/sent/mothra_test/20100105/message.txt_mendelson_opensource_AS2_1262713406313_14@MOTHRA_FLAG.sent.s....
[11:43:27 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Connection problem, failed to transmit data.
[11:43:27 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Message payload stored to "/home/michael/Desktop/mendelson_as2/messages/Flagstone_Logistics/error/mothra_test/20100105/AS2Message5987013172438054664.as2".
[11:43:27 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Raw outgoing message stored to "/home/michael/Desktop/mendelson_as2/messages/Flagstone_Logistics/error/mothra_test/20100105/raw/error4054293528262907407.raw".
[11:43:27 AM] mendelson_opensource_AS2-1262713406313-14@MOTHRA_FLAG: Transaction state written to /home/michael/Desktop/mendelson_as2/messages/Flagstone_Logistics/sent/mothra_test/20100105/message.txt_mendelson_opensource_AS2_1262713406313_14@MOTHRA_FLAG.sent.s....

heller
heller's picture

mmcdermott,

its a know issue that the log message about the connection problem reason is not displayed in this version. This has been already fixed for the next release.

The ssl connection could be debuged by setting the -Djavax.net.debug=all option in the call to the virtual machine, e.g. by using the the command

/bin/java -Xmx1400M -Xms92M -classpath %CLASSPATH% -Djavax.net.debug=all de.mendelson.comm.as2.AS2

This will display the available certificates and detailed information about the handshake process.

Regards
Heller

mmcdermott
mmcdermott's picture

Heller,

Thanks. The debugging information allowed me to correct the problem. I had forgotten to regenerate the keystore for Jetty, so it was using the defaults and complaining.

-Michael