반응형



** BEGIN NESTED EXCEPTION ** 


javax.net.ssl.SSLException

MESSAGE: closing inbound before receiving peer's close_notify


STACKTRACE:


javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify

at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)

at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)

at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)

at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)

at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)

at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:645)

at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:624)

at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1312)

at com.mysql.cj.NativeSession.quit(NativeSession.java:182)

at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)

at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)

at com.zaxxer.hikari.pool.PoolBase.quietlyCloseConnection(PoolBase.java:135)

at com.zaxxer.hikari.pool.HikariPool.lambda$closeConnection$1(HikariPool.java:441)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.lang.Thread.run(Thread.java:834)


==================================================================================================

원인: 기본적으로 database연결시 connecting에 대한 ssl 보안이 포함되어야 하는데 포함되지않아서 

       실행중 지속적으로 disconnecting 한다  그래서 Exception 이 떨어진다.

해결: sql connection 에서 darasource.url 에 &useSSL=false 라는 옵션을 추가해준다.

ex) spring.datasource.url=jdbc:mysql://localhost:3306?&useSSL=false

반응형

+ Recent posts