JPOS upgrading to SSL on reconnect

25 views
Skip to first unread message

John Njoroge Mungai

unread,
Oct 18, 2021, 12:34:50 PM10/18/21
to jPOS Users
I have this setup for JPOS to Switch:
10_channel.xml
<?xml version="1.0" encoding="UTF-8"?>
<mux name="zm-mux" class="org.jpos.q2.iso.QMUX" logger="Q2">
<in>zm-client-send</in>
<out>zm-client-receive</out>
<unhandled>zm-queue-unhandled</unhandled>
<ready>zm-channel.ready</ready>
<unhandled>zm-queue-unhandled</unhandled>
<key>2, 11, 41, 55, 52</key>
</mux>

20_mux.xml

<?xml version="1.0" encoding="UTF-8"?>
<channel-adaptor class="org.jpos.q2.iso.ChannelAdaptor" name="zm-channel" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel" packager="org.jpos.iso.packager.GenericPackager" logger="Q2">
<property name="port" value="6065" />
<property name="host" value="127.0.0.1" />
<property name="timeout" value="120000" />
<property name="keep-alive" value="true" />
<property name="debug" value="true" />
<property name="packager-config" value="genericpackager.xml" />
</channel>
<in>zm-client-receive</in>
<out>zm-client-send</out>
<reconnect-delay>86400000</reconnect-delay>
<wait-for-workers-on-stop>yes</wait-for-workers-on-stop>
</channel-adaptor>


The problem is that after sometime, I see a reconnect and on the simulator I get connection in SSL instead of plain text:

<log realm="stderr" at="2021-10-18T10:55:12.996" lifespan="500ms">
    javax.net.ssl|SEVERE|01|main|2021-10-18 10:55:12.496 EAT|TransportContext.java:362|Fatal (UNEXPECTED_MESSAGE): javax.net.ssl.SSLException: Unsupported or unrecognized SSL message (
    "throwable" : {
      javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
      at sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:448)
      at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:174)
      at sun.security.ssl.SSLTransport.decode(SSLTransport.java:110)
      at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1290)
      at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1199)
      at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:401)
      at sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:819)
      at sun.security.ssl.SSLSocketImpl.access$200(SSLSocketImpl.java:75)
      at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:902)
      at java.io.InputStream.read(InputStream.java:101)
      at com.ekenya.hsm.HSMClientHandler.readResult(HSMClientHandler.java:75)
      at com.ekenya.hsm.HSMClientHandler.run(HSMClientHandler.java:29)
      at com.ekenya.hsm.HSM.run(HSM.java:91)
      at com.ekenya.Main.main(Main.java:16)}
    
    )
    javax.net.ssl|FINE|01|main|2021-10-18 10:55:12.496 EAT|SSLSocketImpl.java:1510|close the underlying socket
    javax.net.ssl|FINE|01|main|2021-10-18 10:55:12.496 EAT|SSLSocketImpl.java:1529|close the SSL connection (initiative)
</log>

How can I remedy this situation? I am working with JPOS on spring framework. The simulator is in HTTP mode same as target server.


John Njoroge Mungai

unread,
Oct 19, 2021, 3:35:12 AM10/19/21
to jPOS Users
This is was not an SSL problem rather a mix of requests. I managed to resolve it by setting the correct values for field 11 and Field 37 to match requests.
Reply all
Reply to author
Forward
0 new messages