You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "BigdataSurvey (via GitHub)" <gi...@apache.org> on 2024/06/24 02:50:48 UTC

[I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

BigdataSurvey opened a new issue, #7050:
URL: https://github.com/apache/seatunnel/issues/7050

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   从Mysql 抽取数据到Doris。会有两种情况:
   情况1:刚开始前两分钟正常,后面日志报错: Label already  error。可是我每次启动的时候都会去修改*.conf.template 配置文件中sink.label-prefix项来保证每次启动唯一,但是运行几分钟之后还是报错。
   情况2:任务在执行过程中被中断 (InterruptedException) 线程在等待某些资源或条件时被其他线程中断,但是服务器配置和网络通信都没有压力目前。
   
   
   ### SeaTunnel Version
   
   2.3.5
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 1
     job.mode = "STREAMING"
     checkpoint.interval = 10000
   }
   
   source {
     MySQL-CDC {
       base-url = "jdbc:mysql://localhost:3306/practice?useSSL=false"
       username = "123"
       password = "123"
       table-names = [
         "practice.gxy_student_0",
         "practice.gxy_student_1",
         "practice.gxy_student_2",
         "practice.gxy_student_3",
         "practice.gxy_student_4"
       ]
       startup.mode = "latest"
     }
   }
   
   sink {
     Doris {
       fenodes = "localhost:8030"
       username = "123"
       password = "123"
       database = "tis_gxy"
       table = "gxy_student"
       table.identifier = "tis_gxy.gxy_student"
       sink.label-prefix = "label_92e1051f8765498e_0624_1016"
       sink.enable-2pc = "true"
       sink.enable-delete = "true"
       doris.config {
         format = "json"
         read_json_by_line = "true"
       }
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   sh /data/seatunnel235/bin/seatunnel.sh --config ./config/v2.gxy.streaming.conf.template
   ```
   
   
   ### Error Exception
   
   ```log
   第一种情况报错:
   org.apache.seatunnel.connectors.doris.exception.DorisConnectorException: ErrorCode:[Doris-01], ErrorDescription:[stream load error] - stream load error: [LABEL_ALREADY_EXISTS]Status : errCode = 2, detailMessage = Label [test-cdc_tis_gxy_gxy_student_856834878388305923_0_8] has already been used, relate to txn [5981062]
   2024-06-24 10:43:24,275 INFO  [o.a.s.c.d.s.w.DorisStreamLoad ] [hz.main.seaTunnel.task.thread-31] - abort 5992921 for check label label_92e1051f8765498e_0624_1016_tis_gxy_gxy_student_857450112475987971_0_13.
   2024-06-24 10:43:24,284 INFO  [o.a.s.c.d.s.w.DorisStreamLoad ] [hz.main.seaTunnel.task.thread-31] - abort for labelSuffix label_92e1051f8765498e_0624_1016_tis_gxy_gxy_student_857450112475987971_0 finished
   2024-06-24 10:43:24,284 WARN  [o.a.s.e.s.TaskExecutionService] [hz.main.seaTunnel.task.thread-31] - [10.29.86.93]:5801 [seatunnel] [5.1] Exception in org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask@4812e351
   java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.seatunnel.connectors.doris.exception.DorisConnectorException: ErrorCode:[Doris-01], ErrorDescription:[stream load error]
   	at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:262) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:68) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:39) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:27) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.group.queue.IntermediateBlockingQueue.handleRecord(IntermediateBlockingQueue.java:70) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.group.queue.IntermediateBlockingQueue.collect(IntermediateBlockingQueue.java:50) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.flow.IntermediateQueueFlowLifeCycle.collect(IntermediateQueueFlowLifeCycle.java:51) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.collect(TransformSeaTunnelTask.java:73) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.SeaTunnelTask.stateProcess(SeaTunnelTask.java:168) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.call(TransformSeaTunnelTask.java:78) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:703) ~[seatunnel-starter.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.TaskExecutionService$NamedTaskWrapper.run(TaskExecutionService.java:1004) ~[seatunnel-starter.jar:2.3.5]
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_91]
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_91]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_91]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_91]
   	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
   Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.seatunnel.connectors.doris.exception.DorisConnectorException: ErrorCode:[Doris-01], ErrorDescription:[stream load error]
   	at org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableSinkWriter.prepareCommit(MultiTableSinkWriter.java:234) ~[seatunnel-transforms-v2.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:191) ~[seatunnel-starter.jar:2.3.5]
   	... 16 more
   Caused by: java.util.concurrent.ExecutionException: org.apache.seatunnel.connectors.doris.exception.DorisConnectorException: ErrorCode:[Doris-01], ErrorDescription:[stream load error]
   	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_91]
   	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_91]
   	at org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableSinkWriter.prepareCommit(MultiTableSinkWriter.java:232) ~[seatunnel-transforms-v2.jar:2.3.5]
   	at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:191) ~[seatunnel-starter.jar:2.3.5]
   	... 16 more
   Caused by: org.apache.seatunnel.connectors.doris.exception.DorisConnectorException: ErrorCode:[Doris-01], ErrorDescription:[stream load error]
   	at org.apache.seatunnel.connectors.doris.sink.writer.DorisStreamLoad.stopLoad(DorisStreamLoad.java:220) ~[?:?]
   	at org.apache.seatunnel.connectors.doris.sink.writer.DorisSinkWriter.flush(DorisSinkWriter.java:159) ~[?:?]
   	at org.apache.seatunnel.connectors.doris.sink.writer.DorisSinkWriter.prepareCommit(DorisSinkWriter.java:145) ~[?:?]
   	at org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableSinkWriter.lambda$prepareCommit$4(MultiTableSinkWriter.java:217) ~[seatunnel-transforms-v2.jar:2.3.5]
   	... 5 more
   Caused by: java.io.IOException: Stream closed
   	at java.util.zip.GZIPInputStream.ensureOpen(GZIPInputStream.java:62) ~[?:1.8.0_91]
   	at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:113) ~[?:1.8.0_91]
   	at org.apache.http.client.entity.LazyDecompressingInputStream.read(LazyDecompressingInputStream.java:70) ~[seatunnel-hadoop3-3.3.6-uber.jar:2.7-WS-test-SNAPSHOT]
   	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) ~[?:1.8.0_91]
   	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) ~[?:1.8.0_91]
   	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) ~[?:1.8.0_91]
   	at java.io.InputStreamReader.read(InputStreamReader.java:184) ~[?:1.8.0_91]
   	at java.io.Reader.read(Reader.java:140) ~[?:1.8.0_91]
   	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:247) ~[seatunnel-hadoop3-3.3.6-uber.jar:2.7-WS-test-SNAPSHOT]
   	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:291) ~[seatunnel-hadoop3-3.3.6-uber.jar:2.7-WS-test-SNAPSHOT]
   	at org.apache.seatunnel.connectors.doris.sink.writer.DorisStreamLoad.handlePreCommitResponse(DorisStreamLoad.java:205) ~[?:?]
   	at org.apache.seatunnel.connectors.doris.sink.writer.DorisStreamLoad.stopLoad(DorisStreamLoad.java:218) ~[?:?]
   	at org.apache.seatunnel.connectors.doris.sink.writer.DorisSinkWriter.flush(DorisSinkWriter.java:159) ~[?:?]
   	at org.apache.seatunnel.connectors.doris.sink.writer.DorisSinkWriter.prepareCommit(DorisSinkWriter.java:145) ~[?:?]
   	at org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableSinkWriter.lambda$prepareCommit$4(MultiTableSinkWriter.java:217) ~[seatunnel-transforms-v2.jar:2.3.5]
   
   第二种情况报错:
   java.lang.RuntimeException: java.lang.RuntimeException: java.lang.InterruptedException
       at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:262)
       at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:68)
       at org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:39)
       ...
       at java.lang.Thread.run(Thread.java:745)
   Caused by: java.lang.RuntimeException: java.lang.InterruptedException
       at org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableSinkWriter.subSinkErrorCheck(MultiTableSinkWriter.java:121)
       at org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableSinkWriter.prepareCommit(MultiTableSinkWriter.java:201)
       ...
   Caused by: java.lang.InterruptedException
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2088)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
       at org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableWriterRunnable.run(MultiTableWriterRunnable.java:47)
       ...
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   1.8.0_181
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "HWTsang (via GitHub)" <gi...@apache.org>.
HWTsang commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-2653042361

   > sink.label-prefix="${database_name}" success
   
   where to add this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "BigdataSurvey (via GitHub)" <gi...@apache.org>.
BigdataSurvey commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-2362874023

   
   
   
   This problem has not been solved yet. Please help
   
   
   
   
   
   
   
   
   
   
   
   
   
   At 2024-09-02 16:26:32, "Yuan Gao" ***@***.***> wrote:
   
   @BigdataSurvey did you resolve this problem?
   
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   You are receiving this because you were mentioned.Message ID: ***@***.***>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7050: Mysql-CDC -> Doris Sink [BUG]
URL: https://github.com/apache/seatunnel/issues/7050


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "HWTsang (via GitHub)" <gi...@apache.org>.
HWTsang commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-2653191790

   add this `sink.label-prefix = "${table_name}"` to conf
   
   ```
   sink {
      Doris {
             fenodes =
             username =
             password = 
             database = 
             table = 
             sink.enable-2pc = "true"
             sink.label-prefix = "${table_name}"
             doris.config = {
               format = "json"
               read_json_by_line="true"
             }
         }
   }
   ```
   
   
   
   > This problem has not been solved yet. Please help
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > At 2024-09-02 16:26:32, "Yuan Gao" ***@***.***> wrote:
   > 
   > [@BigdataSurvey](https://github.com/BigdataSurvey) did you resolve this problem?
   > 
   > —
   > Reply to this email directly, view it on GitHub, or unsubscribe.
   > You are receiving this because you were mentioned.Message ID: ***@***.***>
   > 此问题尚未解决。请帮忙
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 2024-09-02 16:26:32, “Yuan Gao” ***@***.***> 写道:
   > 
   > 您[@BigdataSurvey](https://github.com/BigdataSurvey)解决了这个问题?
   > 
   > —
   > 直接回复此电子邮件,在 GitHub 上查看,或取消订阅。
   > 您收到此消息是因为您被提及。消息 ID:***@***.***>
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "windmemory (via GitHub)" <gi...@apache.org>.
windmemory commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-2324125739

   @BigdataSurvey did you resolve this problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-2254294088

   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 is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-2270143466

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "andytyi (via GitHub)" <gi...@apache.org>.
andytyi commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-3030177108

   你好,请问任务在执行过程中被中断 (InterruptedException)的问题是怎么解决的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Mysql-CDC -> Doris Sink [BUG] [seatunnel]

Posted by "strayye (via GitHub)" <gi...@apache.org>.
strayye commented on issue #7050:
URL: https://github.com/apache/seatunnel/issues/7050#issuecomment-2611409591

   sink.label-prefix="${database_name}"   success


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org