创建 FlinkJob 任务,自动同步表结构并创建 CDC 任务持续导入数据,失败

Viewed 68

.根据源表创建 FlinkJob 任务,自动同步表结构并创建 CDC 任务持续导入数据,可使用如下命令提交 Job 任务:
docker exec doris-jobmanager-1 /opt/flink/bin/flink run
-Dexecution.checkpointing.interval=5s
-Dparallelism.default=1
-c org.apache.doris.flink.tools.cdc.CdcTools
/opt/flink/lib/flink-doris-connector-1.17-1.6.2.jar
mysql-sync-database
--database mysql_demo
--mysql-conf hostname=192.168.10.15
--mysql-conf username=root
--mysql-conf password=123456
--mysql-conf port=3306
--mysql-conf database-name=doris-test
--sink-conf fenodes=192.168.10.15:8030
--sink-conf benodes=192.168.10.15:8040
--sink-conf username=root
--sink-conf password=
--sink-conf jdbc-url=jdbc:mysql://192.168.10.15:9030
--sink-conf sink.label-prefix=label
--single-sinktrue
--table-conf replication_num=1 ;

报错信息如下:有大佬知道这是什么原因吗
The program finished with the following exception:

org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: The following SQL query could not be executed: SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA;
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372)
at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:105)
at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:851)
at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:245)
at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1095)
at org.apache.flink.client.cli.CliFrontend.lambda$mainInternal$9(CliFrontend.java:1189)
at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
at org.apache.flink.client.cli.CliFrontend.mainInternal(CliFrontend.java:1189)
at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1157)
Caused by: org.apache.doris.flink.exception.DorisSystemException: The following SQL query could not be executed: SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA;
at org.apache.doris.flink.catalog.doris.DorisSystem.extractColumnValuesBySQL(DorisSystem.java:140)
at org.apache.doris.flink.catalog.doris.DorisSystem.listDatabases(DorisSystem.java:63)
at org.apache.doris.flink.catalog.doris.DorisSystem.databaseExists(DorisSystem.java:71)
at org.apache.doris.flink.tools.cdc.DatabaseSync.build(DatabaseSync.java:124)
at org.apache.doris.flink.tools.cdc.CdcTools.syncDatabase(CdcTools.java:161)
at org.apache.doris.flink.tools.cdc.CdcTools.createMySQLSyncDatabase(CdcTools.java:80)
at org.apache.doris.flink.tools.cdc.CdcTools.main(CdcTools.java:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
... 9 more
Caused by: java.sql.SQLException: errCode = 2, detailMessage = (127.0.0.1)[INTERNAL_ERROR]Failed to get query fragments context. Query may be timeout or be cancelled. host: 127.0.0.1

1 Answers

是我自己电脑上虚拟机的问题,买了阿里云的ECS正常跑通了。