Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [Connector-V2] Source Oracle-CDC Sink Clickhouse checkpoint timeout #8364

Open
2 of 3 tasks
bwcxyk opened this issue Dec 23, 2024 · 1 comment
Open
2 of 3 tasks
Labels

Comments

@bwcxyk
Copy link
Contributor

bwcxyk commented Dec 23, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Checkpoint expired before completing. Please increase checkpoint timeout in the seatunnel.yaml or jobConfig env.
I tried setting checkpoint.timeout= 300000, still the same thing.
And Read Count data exception, Each time checkpoint timeout data is stacked.
I have 2145 data in my Oracle database.
Log:

Read Count So Far         :                2145
Write Count So Far        :                2145
...
Read Count So Far         :                4290
Write Count So Far        :                4290
...
Read Count So Far         :                6435
Write Count So Far        :                6435
...
Read Count So Far         :                8580
Write Count So Far        :                8580

SeaTunnel Version

2.3.8

SeaTunnel Config

env {
  parallelism = 1
  job.mode = "STREAMING"
  job.name= oracle_to_clickhouse
}

source {
  Oracle-CDC {
    plugin_output = "TMS_ASSET_DRIVER"
    source.reader.close.timeout = 120000
    server-time-zone = Asia/Shanghai
    decimal_type_narrowing = false
    base-url = "jdbc:oracle:thin:@192.168.1.70:1521:orcl"
    username = "system"
    password = "oracle"
    database-names = ["ORCL"]
    schema-names = ["TMS_USER"]
    table-names = ["ORCL.TMS_USER.TMS_ASSET_DRIVER"]
    table-names-config = [
      {
        table = "ORCL.TMS_USER.TMS_ASSET_DRIVER"
        primaryKeys = ["ID"]
      }
    ]
  }
}

sink {
  Clickhouse {
    host = "192.168.0.18:8123"
    database = "tms"
    table = "TMS_ASSET_DRIVER"
    username = "admin"
    password = "admin"

    # cdc options
    primary_key = "ID"
    support_upsert = true
    allow_experimental_lightweight_delete = true
  }
}

Running Command

seatunnel.sh -c oracle_to_clickhouse.conf

Error Exception

2024-12-23 15:44:41,627 INFO  [o.a.s.e.c.j.ClientJobProxy    ] [main] - Job (923470803490570241) end with state FAILED
2024-12-23 15:44:41,627 INFO  [c.h.c.LifecycleService        ] [main] - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is SHUTTING_DOWN
2024-12-23 15:44:41,631 INFO  [.c.i.c.ClientConnectionManager] [main] - hz.client_1 [seatunnel] [5.1] Removed connection to endpoint: [192.168.1.75]:5801:ad15733b-f88e-4597-b32a-93779a665ce8, connection: ClientConnection{alive=false, connectionId=1, channel=NioChannel{/192.168.1.75:48091->/192.168.1.75:5801}, remoteAddress=[192.168.1.75]:5801, lastReadTime=2024-12-23 15:44:41.620, lastWriteTime=2024-12-23 15:44:36.701, closedTime=2024-12-23 15:44:41.629, connected server version=5.1}
2024-12-23 15:44:41,631 INFO  [c.h.c.LifecycleService        ] [main] - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is CLIENT_DISCONNECTED
2024-12-23 15:44:41,633 INFO  [c.h.c.LifecycleService        ] [main] - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is SHUTDOWN
2024-12-23 15:44:41,633 INFO  [s.c.s.s.c.ClientExecuteCommand] [main] - Closed SeaTunnel client......
2024-12-23 15:44:41,633 INFO  [s.c.s.s.c.ClientExecuteCommand] [main] - Closed metrics executor service ......
2024-12-23 15:44:41,634 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - 

===============================================================================


2024-12-23 15:44:41,634 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - Fatal Error, 

2024-12-23 15:44:41,634 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - Please submit bug report in https://github.com/apache/seatunnel/issues

2024-12-23 15:44:41,634 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - Reason:SeaTunnel job executed failed 

2024-12-23 15:44:41,635 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:213)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: org.apache.seatunnel.engine.server.checkpoint.CheckpointException: Checkpoint expired before completing. Please increase checkpoint timeout in the seatunnel.yaml or jobConfig env.
	at org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator.handleCoordinatorError(CheckpointCoordinator.java:281)
	at org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator.lambda$startTriggerPendingCheckpoint$9(CheckpointCoordinator.java:666)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	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)

	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:205)
	... 2 more
 
2024-12-23 15:44:41,635 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - 
===============================================================================



Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:213)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: org.apache.seatunnel.engine.server.checkpoint.CheckpointException: Checkpoint expired before completing. Please increase checkpoint timeout in the seatunnel.yaml or jobConfig env.
	at org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator.handleCoordinatorError(CheckpointCoordinator.java:281)
	at org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator.lambda$startTriggerPendingCheckpoint$9(CheckpointCoordinator.java:666)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	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)

	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:205)
	... 2 more
2024-12-23 15:44:41,639 INFO  [s.c.s.s.c.ClientExecuteCommand] [Thread-8] - run shutdown hook because get close signal

Zeta or Flink or Spark Version

Zeta

Java or Scala Version

openjdk version "1.8.0_432"
OpenJDK Runtime Environment (build 1.8.0_432-8u432-ga~us1-0ubuntu2~22.04-ga)
OpenJDK 64-Bit Server VM (build 25.432-bga, mixed mode)

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@bwcxyk bwcxyk added the bug label Dec 23, 2024
@bwcxyk
Copy link
Contributor Author

bwcxyk commented Dec 24, 2024

复现过程:提交任务 → 数据同步到 Clickhouse → 取消任务 → 再次提交任务
异常原因:sink Clickhouse 表中有数据会异常。
即重新提交任务需要 truncate table,任务才可正常运行。
Oracle-CDC、MySQL-CDC 都会异常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant