开发者社区 > 大数据与机器学习 > 实时计算 Flink > 正文

Flink CDC里使用3.0 测试mysql到starrocks启动报错怎么办?

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
后面还有两个报错

展开
收起
小小鹿鹿鹿 2024-02-06 21:36:42 263 0
1 条回答
写回答
取消 提交回答
  • 降低下connect.timeout 参数,默认是30s,估计数据库的更短,可以参考mysql的wait_timeout指标,低于这个就行。应该就是这个ssl的问题,你将源端的ssl关闭,或者增加连接参数。0caa02503312d0f24addb4c3bc43a6c1.pngThe 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 社区。

    2024-02-06 22:05:48
    赞同 展开评论 打赏

实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。

相关产品

  • 实时计算 Flink版
  • 相关电子书

    更多
    Flink CDC Meetup PPT - 覃立辉 立即下载
    Flink CDC Meetup PPT - 孙家宝 立即下载
    Flink CDC Meetup PPT - 徐榜江 立即下载