MySQL连接报错No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

背景

本地连接没问题,容器部署后连接失败。

  • MySQL版本:5.7.22
  • JDK版本:1.8.0_312

现象

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

这个报错的意思是说连接协议被禁用或密码不对。

排查过程

  1. 排查用户名密码是否正确——正确
  2. 排查网络是否通畅——通畅
  3. 我本地使用的是jdk1.8.0_172,打镜像时,基础镜像里的jdk版本是1.8.0_312。怀疑是不是jdk版本导致。通过在网上的搜索发现,jdk1.8的高版本确实对SSL协议做了限制

解决方案

此处给出三种解决方案:

  1. 降低基础镜像的jdk版本,改为与本地一致的1.8.0_131。

  2. 修改jdk的配置文件,去除对ssl协议的限制,可以参考《Java调用ssl异常,javax.net.ssl.SSLHandshakeException: No appropriate protocol》

  3. 最简单的方法,直接在连接MySQL时,连接参数里禁用SSL:

    useSSL=false

  • 9
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
ARM(ZYNQ) cortexa9 Cross compiled CAN utils: To run CAN, use the below command: 1. Set bit-timing Can supports bitrates upto 1Mb/s. Xilinx CAN h/w and driver supports these bit rates Note: Triple sampling is not supported by Xilinx CAN H/W. $ ./ip link set can0 type can bitrate 200000 or $ ./canconfig can0 bitrate 200000 2. Bring up the device $ ./ip link set can0 up or $ ./canconfig can0 start 3. Bring down the device $ ./ip link set can0 down or $ ./canconfig can0 stop 4. Transmit and receive packets with standard id number $ ./cansend can0 -i 0x14 $ ./candump can0 5. Transmit and receive packets with extended id number (--loop argument here) $ ./cansend can0 -i 0x333 $ ./candump can0 6. Loopback mode $ ./canconfig can0 ctrlmode loopback on 7. Checking link state (checking bitrate/errors/packets) $ ./ip -d -s link show can0 8. Checking net device state $ ifconfig can0 9. Getting statistics via proc $ cat /proc/net/can/stats 10. Socket CAN core uses several filter lists to deliver received CAN frames to CAN protocol modules. These receive lists, their filters and the count of filter matches can be checked in the appropriate receive list. All entries contain the device and a protocol module identifier: $ cat /proc/net/can/rcvlist_all rcvlist_all - list for unfiltered entries (no filter operations) rcvlist_eff - list for single extended frame (EFF) entries rcvlist_err - list for error message frames masks rcvlist_fil - list for mask/value filters rcvlist_inv - list for mask/value filters (inverse semantic) rcvlist_sff - list for single standard frame (SFF) entries

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值