## 1. 問題:
maxwell使用bootstrap同步數據,報如下的bug
```
connecting to jdbc:mysql://hadoop102:3306/maxwell?allowPublicKeyRetrieval=true&connectTimeout=5000&zeroDateTimeBehavior=convertToNull
10:51:22,414 ERROR MaxwellBootstrapUtility - failed to connect to mysql server @ jdbc:mysql://hadoop102:3306/maxwell?allowPublicKeyRetrieval=true&connectTimeout=5000&zeroDateTimeBehavior=convertToNull
10:51:22,421 ERROR MaxwellBootstrapUtility - Connections could not be acquired from the underlying database!
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
at com.zendesk.maxwell.util.C3P0ConnectionPool.getConnection(C3P0ConnectionPool.java:18)
at com.zendesk.maxwell.bootstrap.MaxwellBootstrapUtility.run(MaxwellBootstrapUtility.java:39)
at com.zendesk.maxwell.bootstrap.MaxwellBootstrapUtility.main(MaxwellBootstrapUtility.java:253)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1507)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
... 4 more
Caused by: 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)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:827)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:447)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
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.
at sun.reflect.GeneratedConstructorAccessor22.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:340)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.negotiateSSLConnection(NativeAuthenticationProvider.java:777)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:486)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:202)
at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1348)
at com.mysql.cj.NativeSession.connect(NativeSession.java:163)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:947)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:817)
... 12 more
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171)
at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:106)
at sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:410)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:389)
at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:316)
at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:188)
at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:99)
at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:331)
... 19 more
```
## 2. 解決方案:
找到jdk的安裝路徑:
```
/export/server/jdk1.8.0_361/jre/lib/security
```
編輯 java.security
```
vim java.security
```
刪除 TLSv1, TLSv1.1
![](https://img.kancloud.cn/93/51/935179b0ae5a30d97ca554a0fd9b7109_858x313.png)
效果
![](https://img.kancloud.cn/91/9b/919b4a73948a727c2e66bf60d001924d_657x488.png)
- 开发语言
- java
- Java基础篇
- Java多线程篇
- 进程和线程的区别,进程间如何通信
- 什么是线程上下文切换
- 什么是死锁
- 死锁的必要条件
- Synchrpnized和lock的区别
- 什么是AQS锁
- 为什么AQS使用的双向链表
- 有哪些常见的AQS锁
- sleep()和wait()的区别
- yield()和join()区别
- Java线程池
- SpringBoot
- spring boot 项目开发常用目录结构
- Mybatis-Plus
- MyBatisPlus的CRUD操作
- Mybatis-Plus主键ID生成策略
- JVM
- JVM组成
- 字节码文件的组成
- 类的生命周期
- JVM、JRE和JDK
- arthas
- 使用阿里arthas不停机解决线上问题
- Java IO
- php
- 安装swoole
- composer部分
- windows安装composer
- composer PSR-4映射
- swoole部分
- swoole安装
- thrift部分
- linux下安装thrift
- PHP使用Thrift
- lnmp部分
- 架构的工作原理
- tp5框架生命周期
- zookeeper部分
- zookeeper安装
- sort
- TCP和UDP的区别
- 软件
- xdebug
- vscode+phpstudy+xdebug无法断点(踩坑记)
- Hyperf框架
- 注解
- 开发方案
- 抖音
- 抖音达人视频发布与统计
- 安全问题
- 微信
- 微信公众平台怎样实现用户点击链接向公众号发消息
- CDN加速OSS计费说明
- 程序设计
- 正则表达式
- 面向对象
- 设计模式
- 创建型模式
- 工厂模式
- 单例模式
- 结构型模式
- 适配器模式
- 行为型模式
- 策略模式
- 观察者模式
- 算法部分
- 位运算
- 排序算法
- 双指针
- 贪心算法
- 动态规划
- 二分查找
- 华为题库
- 技术栈
- mq
- MQ 的优势和劣势
- rabbitmq部分
- windows安装rabbitmq
- RabbitMQ 简介
- 工作模式
- 高级特性-消息可靠投递-confirm
- 高级特性-消息可靠投递-return
- 高级特性-Consumer Ack
- 高级特性-消费端限流
- 高级特性-TTL
- 高级特性-死信队列
- Centos7下安装rabbitmq
- 数据库
- MongoDB
- MongoDB 相关概念
- Mysql
- 索引总结
- MySQL架构图
- InnoDB和MyISAM的区别
- 索引设计与优化
- 悲观锁和乐观锁
- mysql如何解除死锁状态
- 查询慢
- 数据库主键的优缺点
- MySQL锁详解
- SQL语句分类
- 开查询账号
- 数据库迁移
- MySQL实战知识点
- mysql清理binlog日志
- 面试总结
- 事务隔离
- 聚集索引与非聚集索引
- B树和B+树
- docker
- docker-desktop安装的坑点
- docker在linux平台下安装
- Ubuntu安装Docker
- 常用命令
- 适用于 Linux 的 Windows 子系统没有已安装的分发版
- docker核心架构图
- docker安装lnmp环境
- docker安装redis
- dockerfile
- docker-compose
- linux
- Ubuntu 更换国内源
- centos
- 常用命令
- virtualbox
- 关于VirtualBox安装Ubuntu时界面显示不全,没有下一步选项
- linux复制当前目录到其子目录下
- 命令
- cat和>、>>
- crontab命令
- 查看当前目录的文件大小
- shell登录和非shell登录
- nginx
- 正向代理
- 反向代理
- 负载均衡
- 分割Nginx的access.log日志并保留30天一个月时长,自动删除多余的日志
- linux安装nginx
- git
- 生成秘钥
- 常用命令
- Linux中git保存用户名密码
- git清除账号密码
- 设置git store 存储账号密码
- git submodule 使用小结
- 微服务
- 微服务技术栈
- nacos
- Nacos服务分级存储模型
- Nacos配置管理-配置热更新
- Nacos集群搭建
- 微服务保护
- 初识Sentinel
- 隔离和降级
- es
- DSL查询语法-相关性算法
- DSL查询语法-FunctionScoreQuery
- DSL查询语法-BooleanQuery
- 搜索结果处理-排序
- es深度分页问题
- 自动补全
- elasticsearch 设置密码
- redis
- redis简介
- 安装redis扩展
- redis数据类型
- redis常见问题
- PHP 使用 Redis 实现分布式锁
- 缓存更新策略
- [ Redis ] AOF 和 RDB 的相关介绍以及相关配置
- 分布式锁的8大坑
- 分布式锁-Redisson
- 内存回收
- UV统计
- Redis主从集群
- redis哨兵
- Redis安装目录下常见文件
- 通讯原理概述
- linux安装redis
- windows
- Win系统端口被占用
- Windows10 WSL2限制cpu和内存
- jekins
- 持续集成
- centos卸载gitlab
- jenkins搭配gitlab的webhook实现自动化部署
- 大数据
- Linux集群分发脚本xsync
- hadoop
- hadoop安装
- hadoop配置文件
- clickhouse
- ClickHouse 安装部署
- flink
- 数据仓库
- zookeeper
- zookeeper分布式安装
- ZK集群启动停止脚本
- kafka
- kafka分布式安装
- kafka集群启动停止脚本
- flume
- flume分布式安装
- Flume配置
- Flume使用
- maxwell
- Maxwell简介
- Maxwell部署
- Maxwell使用
- MaxwellBootstrapUtility - Connections could not be acquired from the underlying database
- 线上事故