Thursday, November 21, 2019

javax.net.ssl.SSLException: Unsupported record version Unknown-0.20

After you started your server and client are connected, you try to read data and you see the following exception.

javax.net.ssl.SSLException: Unsupported record version Unknown-0.20
        at sun.security.ssl.InputRecord.checkRecordVersion(InputRecord.java:552)
        at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:565)
        at sun.security.ssl.InputRecord.read(InputRecord.java:529)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:931)
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)

To fix this exception:

1. Check if both the server and the client are connecting through SSL/TLS. If one end is using SSL/TLS and the other side is not, it will throw such an exception.

2. Make sure that both sides are using the same encryption protocol such as TLSv1, TLSv1.1, TLSv1.2,  or SSLv3. When you transmit using an SSL/TLS Socket, it calls a formatting and encryption routine to create the encrypted packet. It then calls the plain sockets layer to transfer the encrypted packet to the server. The server's sockets layer receives the packet and then calls the SSL/TLS package to decrypt the packet. If the packet doesn't fit the SSL/TLS format, you get the unsupported version exception.

3. The version of java you are using supports the encryption protocol.

-----------------------------------------------------------------------------------------------------------------
Watch the blessing and loving online channel: SupremeMasterTV live




If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book for free here.

No comments:

Post a Comment