[Bug] [MongoDB-CDC] Sync job failed with no clear reason
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
I created a mongo-cdc to doris data sync job, with restful api. Then the job started successfully, and turned into running state. But after a while, the job will become failed, and the error is not instructional at all, can not learn what happened and what's wrong.
I suspect it might related to the source table is too big, the data size is about 2.3 billion rows, so the snapshot sync might table a long time? I don't know how to make this work, need some help here.
job config:
{
"env": {
"job.mode": "STREAMING",
"job.name": "broadcast_sync",
"checkpoint.interval": 10000,
"checkpoint.timeout": 10000
},
"source": [
{
"plugin_name": "MongoDB-CDC",
"hosts": "",
"username": "",
"password": "",
"connection.options": "authSource=admin",
"database": [
"automation"
],
"collection": [
"automation.broadcast_task"
],
"result_table_name": "broadcast_task",
"schema": {
"table": "automation.broadcast_task",
"fields": {
"_id": "string",
"botId": "string",
"groupId": "string",
"orgId": "string",
"botJobId": "string",
"jobId": "string",
"orgJobId": "string",
"targetType": "int",
"targetId": "string",
"createdAt": "bigint",
"updatedAt": "bigint",
"finishAt": "bigint",
"errCode": "int",
"errMsg": "string",
"remark": "string",
"status": "int",
"wxid": "string"
},
"primaryKey": {
"name": "_id",
"columnNames": [
"_id"
]
}
}
}
],
"transform": [],
"sink": [
{
"plugin_name": "Doris",
"source_table_name": "broadcast_task",
"fenodes": "",
"username": "",
"password": "",
"database": "aaa",
"table": "${table_name}_test",
"sink.label-prefix": "test-cdc",
"sink.enable-2pc": "true",
"sink.enable-delete": "true",
"needs_unsupported_type_casting": "true",
"save_mode_create_template": "CREATE TABLE IF NOT EXISTS `${database}`.`${table}` (\n_id varchar(255) NOT NULL,\n${rowtype_fields}\n) ENGINE=OLAP\n UNIQUE KEY (${rowtype_primary_key})\nDISTRIBUTED BY HASH (${rowtype_primary_key})\n PROPERTIES (\n\"replication_allocation\" = \"tag.location.default: 1\",\n\"in_memory\" = \"false\",\n\"storage_format\" = \"V2\",\n\"disable_auto_compaction\" = \"false\"\n)",
"doris.config": {
"format": "json",
"read_json_by_line": "true"
}
}
]
}
SeaTunnel Version
2.3.7
SeaTunnel Config
seatunnel:
engine:
history-job-expire-minutes: 1440
backup-count: 1
queue-type: blockingqueue
print-execution-info-interval: 60
print-job-metrics-info-interval: 60
slot-service:
dynamic-slot: true
checkpoint:
interval: 10000
timeout: 60000
storage:
type: hdfs
max-retained: 3
plugin-config:
namespace: /tmp/seatunnel/checkpoint_snapshot
storage.type: hdfs
fs.defaultFS: file:///tmp/ # Ensure that the directory has written permission
Running Command
/opt/seatunnel/bin/seatunnel-cluster.sh -r master
Error Exception
error message in job detail api
org.apache.seatunnel.engine.common.exception.TaskGroupDeployException: java.lang.RuntimeException: TaskGroupLocation: TaskGroupLocation{jobId=883232621482475521, pipelineId=1, taskGroupId=1} already exists
at org.apache.seatunnel.engine.server.TaskExecutionService.deployTask(TaskExecutionService.java:360)
at org.apache.seatunnel.engine.server.TaskExecutionService.deployTask(TaskExecutionService.java:308)
at org.apache.seatunnel.engine.server.task.operation.DeployTaskOperation.run(DeployTaskOperation.java:56)
at com.hazelcast.spi.impl.operationservice.Operation.call(Operation.java:189)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:273)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:248)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:471)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:197)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:137)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.executeRun(OperationThread.java:123)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
at org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex.stateProcess(PhysicalVertex.java:571)
at org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex.updateTaskState(PhysicalVertex.java:400)
at org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex.makeTaskGroupDeploy(PhysicalVertex.java:322)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.lambda$stateProcess$19(SubPlan.java:643)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:639)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:383)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:633)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:383)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:624)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.startSubPlanStateProcess(SubPlan.java:608)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.restorePipeline(SubPlan.java:496)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:676)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:383)
at org.apache.seatunnel.engine.server.dag.physical.SubPlan.lambda$addPhysicalVertexCallBack$4(SubPlan.java:228)
at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:670)
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:646)
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
raw response:
{
"jobId": "883232621482475521",
"jobName": "broadcast_sync",
"jobStatus": "FAILED",
"errorMsg": "org.apache.seatunnel.engine.common.exception.TaskGroupDeployException: java.lang.RuntimeException: TaskGroupLocation: TaskGroupLocation{jobId=883232621482475521, pipelineId=1, taskGroupId=1} already exists\n\tat org.apache.seatunnel.engine.server.TaskExecutionService.deployTask(TaskExecutionService.java:360)\n\tat org.apache.seatunnel.engine.server.TaskExecutionService.deployTask(TaskExecutionService.java:308)\n\tat org.apache.seatunnel.engine.server.task.operation.DeployTaskOperation.run(DeployTaskOperation.java:56)\n\tat com.hazelcast.spi.impl.operationservice.Operation.call(Operation.java:189)\n\tat com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:273)\n\tat com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:248)\n\tat com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:471)\n\tat com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:197)\n\tat com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:137)\n\tat com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.executeRun(OperationThread.java:123)\n\tat com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)\n\n\tat org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex.stateProcess(PhysicalVertex.java:571)\n\tat org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex.updateTaskState(PhysicalVertex.java:400)\n\tat org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex.makeTaskGroupDeploy(PhysicalVertex.java:322)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.lambda$stateProcess$19(SubPlan.java:643)\n\tat java.util.ArrayList.forEach(ArrayList.java:1259)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:639)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:383)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:633)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:383)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:624)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.startSubPlanStateProcess(SubPlan.java:608)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.restorePipeline(SubPlan.java:496)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.stateProcess(SubPlan.java:676)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.updatePipelineState(SubPlan.java:383)\n\tat org.apache.seatunnel.engine.server.dag.physical.SubPlan.lambda$addPhysicalVertexCallBack$4(SubPlan.java:228)\n\tat java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:670)\n\tat java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:646)\n\tat java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:750)\n",
"createTime": "2024-09-03 06:11:06",
"finishTime": "2024-09-03 06:19:59",
"jobDag": "{\"jobId\":883232621482475521,\"pipelineEdges\":{\"1\":[{\"inputVertexId\":1,\"targetVertexId\":2}]},\"vertexInfoMap\":{\"1\":{\"vertexId\":1,\"type\":\"SOURCE\",\"connectorType\":\"pipeline-1 [Source[0]-MongoDB-CDC]\"},\"2\":{\"vertexId\":2,\"type\":\"SINK\",\"connectorType\":\"pipeline-1 [Sink[0]-Doris-MultiTableSink]\"}}}",
"pluginJarsUrls": [],
"metrics": {
"TableSourceReceivedCount": {
"automation.broadcast_task": "0"
},
"SourceReceivedCount": "0",
"TableSinkWriteCount": {
"automation.broadcast_task": "0"
},
"SinkWriteCount": "0"
}
}
Zeta or Flink or Spark Version
zeta 2.3.7
Java or Scala Version
8
Screenshots
No response
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Here are more logs from worker process, the warn might be the problem, but I don't know how to resolve this, searched across the doc and no solution or related configuration found.
2024-09-03 06:15:45,807 WARN [.s.i.o.s.SlowOperationDetector] [hz.main.SlowOperationDetectorThread] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Slow operation detected:
2024-09-03 06:15:34,870 INFO [o.m.d.connection ] [hz.main.seaTunnel.task.thread-12] - Opened connection [connectionId{localValue:7, serverValue:28202896}] to mongo:27017
2024-09-03 06:15:34,872 INFO [o.a.s.c.d.s.w.DorisStreamLoad ] [hz.main.seaTunnel.task.thread-14] - abort 76900522672128 for check label test-cdc_juzi_broadcast_task_test_883232621482475521_0_1.
2024-09-03 06:15:34,884 INFO [o.a.s.c.d.s.w.DorisStreamLoad ] [hz.main.seaTunnel.task.thread-14] - abort for labelSuffix test-cdc_juzi_broadcast_task_test_883232621482475521_0 finished
2024-09-03 06:15:34,886 INFO [a.s.a.s.m.MultiTableSinkWriter] [hz.main.seaTunnel.task.thread-14] - init multi table sink writer, queue size: 1
2024-09-03 06:15:34,900 INFO [.c.b.s.e.SnapshotSplitAssigner] [hz.main.seaTunnel.task.thread-12] - SnapshotSplitAssigner created with remaining tables: [automation.broadcast_task]
2024-09-03 06:15:34,901 INFO [.c.b.s.e.SnapshotSplitAssigner] [hz.main.seaTunnel.task.thread-12] - SnapshotSplitAssigner created with remaining splits: []
2024-09-03 06:15:34,901 INFO [.c.b.s.e.SnapshotSplitAssigner] [hz.main.seaTunnel.task.thread-12] - SnapshotSplitAssigner created with assigned splits: []
2024-09-03 06:15:35,033 INFO [.s.t.SourceSplitEnumeratorTask] [BlockingWorker-TaskGroupLocation{jobId=883232621482475521, pipelineId=1, taskGroupId=1}] - received enough reader, starting enumerator...
2024-09-03 06:15:45,807 WARN [.s.i.o.s.SlowOperationDetector] [hz.main.SlowOperationDetectorThread] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Slow operation detected: org.apache.seatunnel.engine.server.task.operation.source.RequestSplitOperation
Hint: You can enable the logging of stack traces with the following system property: -Dhazelcast.slow.operation.detector.stacktrace.logging.enabled
2024-09-03 06:15:54,962 INFO [c.h.i.s.t.TcpServerConnection ] [hz.main.IO.thread-in-2] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Connection[id=6, /172.18.0.2:47429->seatunnel-master-1/172.18.0.4:5801, qualifier=null, endpoint=[seatunnel-master-1]:5801, remoteUuid=6fd18340-5e00-4830-9c1f-2e8352bf6392, alive=false, connectionType=MEMBER, planeIndex=0] closed. Reason: Connection closed by the other side
2024-09-03 06:15:54,964 INFO [c.h.i.s.t.TcpServerConnector ] [hz.main.cached.thread-4] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Connecting to seatunnel-master-1/172.18.0.4:5801, timeout: 10000, bind-any: true
2024-09-03 06:15:54,965 INFO [c.h.i.s.t.TcpServerConnection ] [hz.main.IO.thread-in-0] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Initialized new cluster connection between /172.18.0.2:42087 and seatunnel-master-1/172.18.0.4:5801
2024-09-03 06:17:55,515 INFO [c.h.i.s.t.TcpServerConnection ] [hz.main.IO.thread-in-1] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Connection[id=7, /172.18.0.2:42087->seatunnel-master-1/172.18.0.4:5801, qualifier=null, endpoint=[seatunnel-master-1]:5801, remoteUuid=6fd18340-5e00-4830-9c1f-2e8352bf6392, alive=false, connectionType=MEMBER, planeIndex=0] closed. Reason: Connection closed by the other side
2024-09-03 06:17:55,516 INFO [c.h.i.s.t.TcpServerConnector ] [hz.main.cached.thread-7] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Connecting to seatunnel-master-1/172.18.0.4:5801, timeout: 10000, bind-any: true
2024-09-03 06:17:55,526 INFO [c.h.i.s.t.TcpServerConnection ] [hz.main.IO.thread-in-1] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] Initialized new cluster connection between /172.18.0.2:58199 and seatunnel-master-1/172.18.0.4:5801
2024-09-03 06:19:59,518 INFO [a.s.e.s.s.s.DefaultSlotService] [hz.main.generic-operation.thread-0] - received slot release request, jobID: 883232621482475521, slot: SlotProfile{worker=[seatunnel-worker-1]:5802, slotID=6, ownerJobID=883232621482475521, assigned=true, resourceProfile=ResourceProfile{cpu=CPU{core=0}, heapMemory=Memory{bytes=0}}, sequence='51d56f05-e12a-4c30-b2c8-099bf53835aa'}
2024-09-03 06:19:59,518 INFO [a.s.e.s.s.s.DefaultSlotService] [hz.main.generic-operation.thread-0] - received slot release request, jobID: 883232621482475521, slot: SlotProfile{worker=[seatunnel-worker-1]:5802, slotID=7, ownerJobID=883232621482475521, assigned=true, resourceProfile=ResourceProfile{cpu=CPU{core=0}, heapMemory=Memory{bytes=0}}, sequence='51d56f05-e12a-4c30-b2c8-099bf53835aa'}
2024-09-03 06:19:59,528 INFO [o.a.s.e.s.TaskExecutionService] [hz.main.generic-operation.thread-0] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] received deploying task executionId [883232621482999809]
2024-09-03 06:19:59,529 INFO [o.a.s.e.s.TaskExecutionService] [hz.main.generic-operation.thread-0] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] deploying task TaskGroupLocation{jobId=883232621482475521, pipelineId=1, taskGroupId=30000}, executionId [883232621482999809]
2024-09-03 06:19:59,529 ERROR [o.a.s.e.s.TaskExecutionService] [hz.main.generic-operation.thread-0] - [seatunnel-worker-1]:5802 [seatunnel] [5.1] TaskGroupID : TaskGroupLocation{jobId=883232621482475521, pipelineId=1, taskGroupId=30000} deploy error with Exception: java.lang.RuntimeException: TaskGroupLocation: TaskGroupLocation{jobId=883232621482475521, pipelineId=1, taskGroupId=30000} already exists
at org.apache.seatunnel.engine.server.TaskExecutionService.deployTask(TaskExecutionService.java:360)
at org.apache.seatunnel.engine.server.TaskExecutionService.deployTask(TaskExecutionService.java:308)
at org.apache.seatunnel.engine.server.task.operation.DeployTaskOperation.run(DeployTaskOperation.java:56)
at com.hazelcast.spi.impl.operationservice.Operation.call(Operation.java:189)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:273)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:248)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:471)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:197)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:137)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.executeRun(OperationThread.java:123)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
我也遇到这个,启动一下,过不久就报一样的错