Forum Discussion

tuchka6215's avatar
tuchka6215
New Contributor
3 years ago
Solved

ReadyAPI -> MySql fail: "Communications link failure", "No appropriate protocol" exceptions

Ready API 3.10.2, 3.20 have issue connecting to MySql. We tried mysql-connector-java-8.0.24, mysql-connector-java-8.0.26, mysql-connector-java-8.0.27, nothing works. Connectors are properly copied to bin/ext subfolder. Same connectors work OK in ReadyAPI 3.8.1, but in 3.10.2 & 3.20 they all produce same error:

 

Wed Dec 29 12:08:53 PST 2021: ERROR: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
...

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

...

 

WORKAROUND: add enabledTLSProtocols=TLSv1.2 to the connection string

  • I received response from SmartBear support:

     

    the issue is caused by the updated java version used in ReadyAPI. In Java 16, the TLS 1.1 protocol is disabled - Release Note: Disable TLS 1.0 and 1.1 [https://bugs.openjdk.java.net/browse/JDK-8256490]. As you tried, you can resolve the issue by either enabling this protocol in the ReadyAPI `java.security` configuration file or specifying the TLS 1.2 protocol in the DB connection string - <con:connectionString>jdbc:mysql://<HOST>:<PORT>/<DB>?user=<user name>&password=<PASS_VALUE>&enabledTLSProtocols=TLSv1.2</con:connectionString>

     

    So, I opened the java.security file in …\SmartBear\ReadyAPI-3.20.0\jre\conf\security folder

    and found line that starts with jdk.tls.disabledAlgorithms= (there are several similar ...disabledAlgorithms lines, you need exactly jdk.tls. one)

    and removed “, TLSv1, TLSv1.1” from that line.

    Restart the ReadyAPI and that’s it, problem should be gone.

1 Reply

  • tuchka6215's avatar
    tuchka6215
    New Contributor

    I received response from SmartBear support:

     

    the issue is caused by the updated java version used in ReadyAPI. In Java 16, the TLS 1.1 protocol is disabled - Release Note: Disable TLS 1.0 and 1.1 [https://bugs.openjdk.java.net/browse/JDK-8256490]. As you tried, you can resolve the issue by either enabling this protocol in the ReadyAPI `java.security` configuration file or specifying the TLS 1.2 protocol in the DB connection string - <con:connectionString>jdbc:mysql://<HOST>:<PORT>/<DB>?user=<user name>&password=<PASS_VALUE>&enabledTLSProtocols=TLSv1.2</con:connectionString>

     

    So, I opened the java.security file in …\SmartBear\ReadyAPI-3.20.0\jre\conf\security folder

    and found line that starts with jdk.tls.disabledAlgorithms= (there are several similar ...disabledAlgorithms lines, you need exactly jdk.tls. one)

    and removed “, TLSv1, TLSv1.1” from that line.

    Restart the ReadyAPI and that’s it, problem should be gone.