1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[19:16:40] [Server thread/WARN]: Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
[19:16:40] [Server thread/WARN]:
[19:16:40] [Server thread/WARN]: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[19:16:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[19:16:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
[19:16:40] [Server thread/WARN]: at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[19:16:40] [Server thread/WARN]: at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[19:16:40] [Server thread/WARN]: at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:317)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:203)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1369)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.NativeSession.connect(NativeSession.java:133)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)
[19:16:40] [Server thread/WARN]: ... 25 more
[19:16:40] [Server thread/WARN]: Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
[19:16:40] [Server thread/WARN]: at java.base/sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:172)
[19:16:40] [Server thread/WARN]: at java.base/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:103)
[19:16:40] [Server thread/WARN]: at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:240)
[19:16:40] [Server thread/WARN]: at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:448)
[19:16:40] [Server thread/WARN]: at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:335)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:194)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:101)
[19:16:40] [Server thread/WARN]: at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:308)
[19:16:40] [Server thread/WARN]: ... 30 more

听网上说的更改mysql wait-time未生效,也不是驱动版本的问题
什么方法都试过了,折腾了半天快绝望了突然灵机一动,会不会是params配置那块的问题?
找了半天,才发现配置文件里把“params”打成“parm”了,弄到最后还是最开始尝试的方法
只要加上useSSL=false就好了….
最可怕的是,这个问题一直丢业务上跑了一年多没发现,我就说以前写的东西,怎么这么多黄黄的mysql wrong
不过之前用的数据库是老版本,直到今天换了新的不设置ssl协议不给连接了才揪出来,真勾八可怕