프로그래밍

[Java Spring Boot] Jpa Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol

바다 돼지 2021. 5. 27. 13:19
728x90

에러 메시지

java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
...
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: 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.
...
        ... 52 common frames omitted

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

        ... 56 common frames omitted

원인

클라이언트의 환경이 Java 1.8 을 사용하고, Mysql 서버에서 상위 버전의 인증을 사용하는 경우, 인증을 통과하지 못해서 발생

해결

jdbc://mysq://address:port/db?enabledTLSProtocols=TLSv1.2

하위 버전의 TLS 프로토콜 버전을 연결 문자열에 포함한다.

반응형