问题一:测试flinkcdc3.0 同步mysql到doris,就是docs里的例子,怎么都不成功?
测试flinkcdc3.0 同步mysql到doris,就是docs里的例子,17kb的源库,怎么都不成功?flink版本1.17.2source: type: mysql hostname: localhost port: 3306 username: root password: 123456 tables: app_db..* server-id: 5400 server-time-zone: UTCsink: type: doris fenodes: 127.0.0.1:8030 username: root password: "" table.create.properties.light_schema_change: true table.create.properties.replication_num: 1pipeline: name: Sync MySQL Database to Doris parallelism: 1``2023-12-13 22:47:11java.lang.IllegalStateException: Failed to send request to coordinator: com.ververica.cdc.runtime.operators.schema.event.SchemaChangeRequest@9b5c3d87Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Invocation of [RemoteRpcInvocation(JobMasterOperatorEventGateway.sendRequestToCoordinator(OperatorID, SerializedValue))] at recipient [akka.tcp://flink@localhost:6123/user/rpc/jobmanager_3] timed out. This is usually caused by: 1) Akka failed sending the message silently, due to problems like oversized payload or serialization failures. In that case, you should find detailed error information in the logs. 2) The recipient needs more time for responding, due to problems like slow machines or network jitters. In that case, you can try to increase akka.ask.timeout. at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999) at com.ververica.cdc.runtime.operators.schema.SchemaOperator.sendRequestToCoordinator(SchemaOperator.java:123) ... 26 moreCaused by: java.util.concurrent.TimeoutException: Invocation of [RemoteRpcInvocation(JobMasterOperatorEventGateway.sendRequestToCoordinator(OperatorID, SerializedValue))] at recipient [akka.tcp://flink@localhost:6123/user/rpc/jobmanager_3] timed out. This is usually caused by: 1) Akka failed sending the message silently, due to problems like oversized payload or serialization failures. In that case, you should find detailed error information in the logs. 2) The recipient needs more time for responding, due to problems like slow machines or network jitters. In that case, you can try to increase akka.ask.timeout. at com.sun.proxy.$Proxy25.sendRequestToCoordinator(Unknown Source) at org.apache.flink.runtime.taskexecutor.rpc.RpcTaskOperatorEventGateway.sendRequestToCoordinator(RpcTaskOperatorEventGateway.java:73) at com.ververica.cdc.runtime.operators.schema.SchemaOperator.sendRequestToCoordinator(SchemaOperator.java:121) ... 26 moreCaused by: akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka.tcp://flink@localhost:6123/user/rpc/jobmanager_3#1975425594]] after [10000 ms]. Message of type [org.apache.flink.runtime.rpc.messages.RemoteFencedMessage]. A typical reason for
AskTimeoutException` is that the recipient actor didn't send a reply.
参考回答:
从你提供的错误信息来看,问题可能是由于Flink CDC在向JobManager发送请求时超时导致的。以下是一些可能的解决方法:
- 网络问题:检查本地网络连接是否正常,确保Flink和MySQL之间的通信没有被阻塞。
- Akka ask timeout:根据错误信息,你可以尝试增加Akka的ask timeout值。在Flink的flink-conf.yaml配置文件中添加或修改以下配置:
akka.ask.timeout: 30 s
- 这将把默认的10秒超时时间增加到30秒。你可以根据实际情况调整这个值。
- Flink版本兼容性:确认你使用的Flink版本(1.17.2)与Flink CDC 3.0是否兼容。如果存在兼容性问题,尝试使用与Flink CDC 3.0兼容的Flink版本。
- 检查Flink和MySQL的配置:确保你在Flink CDC配置中提供的MySQL主机名、端口、用户名和密码是正确的,并且MySQL服务器允许来自Flink CDC的连接。
- 查看Flink和MySQL的日志:查看Flink和MySQL的日志,查找可能的错误或警告信息,这些信息可能会帮助你找到问题的原因。
- 确认Doris配置:确保你在Flink CDC配置中提供的Doris Fenodes地址、用户名和密码是正确的,并且Doris服务器允许来自Flink CDC的连接。
- 更新或重新安装Flink CDC:如果你已经确认了所有的配置都是正确的,但问题仍然存在,你可能需要更新或重新安装Flink CDC,以确保你正在使用的是最新版本并且没有安装错误。
关于本问题的更多回答可点击原文查看:
https://developer.aliyun.com/ask/580693
问题二:Flink CDC中mysqlbinlog保存期限是0,为啥还会报这个找不到binlog的错误呢?
Flink CDC中mysqlbinlog保存期限是0,为啥还会报这个找不到binlog的错误呢?Caused by: java.lang.IllegalStateException: The connector is trying to read binlog starting at Struct{version=1.9.7.Final,connector=mysql,name=mysql_binlog_source,ts_ms=1702519739599,db=,server_id=0,file=mysql-bin.000001,pos=54782888,row=0}, but this is no longer available on the server. Reconfigure the connector to use a snapshot when needed. polardb mysql我是从savepoint恢复任务,本地mysql测试正常
参考回答:
云端数据库并不是永久存储binlog的,你是看官网介绍binlog时间吧,永远存储binlog,要命了,我建议你去看文档,他只是显示给你0,实际是达到25%的存储或者几天就刷到云端了
关于本问题的更多回答可点击原文查看:
https://developer.aliyun.com/ask/580691
问题三:Flink CDC这个异常可能是什么原因导致的吗?
Flink CDC这个异常可能是什么原因导致的吗?
Caused by: java.lang.IllegalStateException: Retrieve schema history failed, the schema records for engine 4e267c1c-99d6-4113-b64e-92367c231e09 has been removed, this might because the debezium engine has been shutdown due to other errors.
场景:flink1.16.0 + flink cdc 2.3.0 抽取Oracle11g的时候,产生的异常?
参考回答:
这个异常 "Retrieve schema history failed, the schema records for engine ... has been removed, this might because the debezium engine has been shutdown due to other errors" 可能是由以下原因导致的:
- Debezium 引擎意外关闭或者重启,导致 schema 历史记录丢失。
- Flink CDC 连接器在处理 Oracle CDC 数据时遇到了未知错误或者异常,导致Debezium 引擎被关闭。
- 系统资源不足或者网络问题,导致 Flink CDC 或者 Debezium 引擎无法正常运行。
为了解决这个问题,你可以尝试以下方法:
- 检查 Flink CDC 和 Debezium 的日志和错误信息,查找可能的错误根源和解决方案。
- 确保你的系统资源(如 CPU、内存和磁盘空间)充足,并且网络连接稳定。
- 考虑更新到最新的 Flink CDC 和 Debezium 版本,以获取最新的 bug 修复和性能优化。
关于本问题的更多回答可点击原文查看:
https://developer.aliyun.com/ask/580688
问题四:为什么Flink CDC默认分配的server-id会重复?
在使用Flink CDC读取MySQL数据时,如果没有手动指定server-id,会报告有相同的server-id错误。一般来说,手动指定server-id可以规避这种情况。但是,手动指定server-id时如何确保与MySQL主从同步使用的不重复?又如何知道哪些server-id尚未使用?另外,为什么Flink CDC默认分配的server-id会重复?
参考回答:
手动指定吧, flink cdc 默认分配的是5400-6400区间,不指定会重复的,而且string 的范围都可以
关于本问题的更多回答可点击原文查看:
https://developer.aliyun.com/ask/580678
问题五:flinkcdc mongodb 报错?
flinkcdc mongodb 报错? 0 [flink-akka.actor.default-dispatcher-7] ERROR org.apache.flink.runtime.source.coordinator.SourceCoordinator - Failed to create Source Enumerator for source Source: MongoDBIncrementalSource
java.lang.NoSuchMethodError: org.apache.avro.Schema$Field.defaultVal()Ljava/lang/Object;
参考回答:
java.lang.NoSuchMethodError 基本是依赖冲突,并且是版本不一致的的那种
关于本问题的更多回答可点击原文查看: