Flink CDC里使用3.0 测试mysql到starrocks启动报错怎么办?
Caused by: org.apache.flink.util.FlinkRuntimeException: com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: 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.ververica.cdc.connectors.mysql.debezium.DebeziumUtils.openJdbcConnection(DebeziumUtils.java:71)
at com.ververica.cdc.connectors.mysql.MySqlValidator.createJdbcConnection(MySqlValidator.java:83)
at com.ververica.cdc.connectors.mysql.MySqlValidator.validate(MySqlValidator.java:68)
at com.ververica.cdc.connectors.mysql.source.MySqlSource.createEnumerator(MySqlSource.java:197)
at org.apache.flink.runtime.source.coordinator.SourceCoordinator.start(SourceCoordinator.java:221)
... 33 more
Caused by: com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: 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.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:596)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:582)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:81)
at com.ververica.cdc.connectors.mysql.source.connection.PooledDataSourceFactory.createPooledDataSource(PooledDataSourceFactory.java:61)
at com.ververica.cdc.connectors.mysql.source.connection.JdbcConnectionPools.getOrCreateConnectionPool(JdbcConnectionPools.java:49)
at com.ververica.cdc.connectors.mysql.source.connection.JdbcConnectionFactory.connect(JdbcConnectionFactory.java:54)
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:888)
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:883)
at io.debezium.jdbc.JdbcConnection.connect(JdbcConnection.java:411)
at com.ververica.cdc.connectors.mysql.debezium.DebeziumUtils.openJdbcConnection(DebeziumUtils.java:68)
... 37 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:829)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:449)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:242)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
at com.ververica.cdc.connectors.shaded.com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
... 46 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failureCaused by: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
Caused by: java.io.EOFException: SSL peer shut down incorrectly
后面还有两个报错
降低下connect.timeout 参数,默认是30s,估计数据库的更短,可以参考mysql的wait_timeout指标,低于这个就行。应该就是这个ssl的问题,你将源端的ssl关闭,或者增加连接参数。The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.这个错误一般就是连接超时导致的0.0。此回答来自钉群Flink CDC 社区。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。