当前位置:   article > 正文

【Flink 从 Kafka 读取数据报错】_global failure triggered by operatorcoordinator fo

global failure triggered by operatorcoordinator for 'source: kafka-source ->
  1. Exception in thread "main" org.apache.flink.runtime.client.JobExecutionException: Job execution failed.
  2. at org.apache.flink.runtime.jobmaster.JobResult.toJobExecutionResult(JobResult.java:144)
  3. at org.apache.flink.runtime.minicluster.MiniClusterJobClient.lambda$getJobExecutionResult$3(MiniClusterJobClient.java:141)
  4. at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
  5. at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
  6. at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
  7. at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
  8. at org.apache.flink.runtime.rpc.akka.AkkaInvocationHandler.lambda$invokeRpc$1(AkkaInvocationHandler.java:267)
  9. at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
  10. at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
  11. at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
  12. at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
  13. at org.apache.flink.util.concurrent.FutureUtils.doForward(FutureUtils.java:1300)
  14. at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.lambda$null$1(ClassLoadingUtils.java:93)
  15. at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:68)
  16. at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.lambda$guardCompletionWithContextClassLoader$2(ClassLoadingUtils.java:92)
  17. at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
  18. at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
  19. at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
  20. at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
  21. at org.apache.flink.runtime.concurrent.akka.AkkaFutureUtils$1.onComplete(AkkaFutureUtils.java:47)
  22. at akka.dispatch.OnComplete.internal(Future.scala:300)
  23. at akka.dispatch.OnComplete.internal(Future.scala:297)
  24. at akka.dispatch.japi$CallbackBridge.apply(Future.scala:224)
  25. at akka.dispatch.japi$CallbackBridge.apply(Future.scala:221)
  26. at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
  27. at org.apache.flink.runtime.concurrent.akka.AkkaFutureUtils$DirectExecutionContext.execute(AkkaFutureUtils.java:65)
  28. at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:72)
  29. at scala.concurrent.impl.Promise$DefaultPromise.$anonfun$tryComplete$1(Promise.scala:288)
  30. at scala.concurrent.impl.Promise$DefaultPromise.$anonfun$tryComplete$1$adapted(Promise.scala:288)
  31. at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:288)
  32. at akka.pattern.PromiseActorRef.$bang(AskSupport.scala:622)
  33. at akka.pattern.PipeToSupport$PipeableFuture$$anonfun$pipeTo$1.applyOrElse(PipeToSupport.scala:24)
  34. at akka.pattern.PipeToSupport$PipeableFuture$$anonfun$pipeTo$1.applyOrElse(PipeToSupport.scala:23)
  35. at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:536)
  36. at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
  37. at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
  38. at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
  39. at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:63)
  40. at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:100)
  41. at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
  42. at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
  43. at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:100)
  44. at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49)
  45. at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)
  46. at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
  47. at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
  48. at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
  49. at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
  50. Caused by: org.apache.flink.runtime.JobException: Recovery is suppressed by NoRestartBackoffTimeStrategy
  51. at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:139)
  52. at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.getGlobalFailureHandlingResult(ExecutionFailureHandler.java:102)
  53. at org.apache.flink.runtime.scheduler.DefaultScheduler.handleGlobalFailure(DefaultScheduler.java:301)
  54. at org.apache.flink.runtime.operators.coordination.OperatorCoordinatorHolder$LazyInitializedCoordinatorContext.lambda$failJob$0(OperatorCoordinatorHolder.java:618)
  55. at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRunAsync$4(AkkaRpcActor.java:453)
  56. at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:68)
  57. at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRunAsync(AkkaRpcActor.java:453)
  58. at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:218)
  59. at org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:84)
  60. at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:168)
  61. at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24)
  62. at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20)
  63. at scala.PartialFunction.applyOrElse(PartialFunction.scala:127)
  64. at scala.PartialFunction.applyOrElse$(PartialFunction.scala:126)
  65. at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20)
  66. at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:175)
  67. at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:176)
  68. at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:176)
  69. at akka.actor.Actor.aroundReceive(Actor.scala:537)
  70. at akka.actor.Actor.aroundReceive$(Actor.scala:535)
  71. at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220)
  72. at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579)
  73. at akka.actor.ActorCell.invoke(ActorCell.scala:547)
  74. at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
  75. at akka.dispatch.Mailbox.run(Mailbox.scala:231)
  76. at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
  77. ... 4 more
  78. Caused by: org.apache.flink.util.FlinkException: Global failure triggered by OperatorCoordinator for 'Source: Kafka Source -> Sink: Print to Std. Out' (operator cbc357ccb763df2852fee8c4fc7d55f2).
  79. at org.apache.flink.runtime.operators.coordination.OperatorCoordinatorHolder$LazyInitializedCoordinatorContext.failJob(OperatorCoordinatorHolder.java:600)
  80. at org.apache.flink.runtime.operators.coordination.RecreateOnResetOperatorCoordinator$QuiesceableContext.failJob(RecreateOnResetOperatorCoordinator.java:242)
  81. at org.apache.flink.runtime.source.coordinator.SourceCoordinatorContext.failJob(SourceCoordinatorContext.java:394)
  82. at org.apache.flink.runtime.source.coordinator.SourceCoordinatorContext.handleUncaughtExceptionFromAsyncCall(SourceCoordinatorContext.java:407)
  83. at org.apache.flink.util.ThrowableCatchingRunnable.run(ThrowableCatchingRunnable.java:42)
  84. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  85. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  86. at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  87. at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  88. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  89. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  90. at java.lang.Thread.run(Thread.java:748)
  91. Caused by: org.apache.flink.util.FlinkRuntimeException: Failed to list subscribed topic partitions due to
  92. at org.apache.flink.connector.kafka.source.enumerator.KafkaSourceEnumerator.checkPartitionChanges(KafkaSourceEnumerator.java:234)
  93. at org.apache.flink.runtime.source.coordinator.ExecutorNotifier.lambda$null$1(ExecutorNotifier.java:83)
  94. at org.apache.flink.util.ThrowableCatchingRunnable.run(ThrowableCatchingRunnable.java:40)
  95. ... 7 more
  96. Caused by: java.lang.NoSuchMethodError: org.apache.kafka.clients.admin.DescribeTopicsResult.allTopicNames()Lorg/apache/kafka/common/KafkaFuture;
  97. at org.apache.flink.connector.kafka.source.enumerator.subscriber.KafkaSubscriberUtils.getTopicMetadata(KafkaSubscriberUtils.java:44)
  98. at org.apache.flink.connector.kafka.source.enumerator.subscriber.TopicListSubscriber.getSubscribedTopicPartitions(TopicListSubscriber.java:52)
  99. at org.apache.flink.connector.kafka.source.enumerator.KafkaSourceEnumerator.getSubscribedTopicPartitions(KafkaSourceEnumerator.java:219)
  100. at org.apache.flink.runtime.source.coordinator.ExecutorNotifier.lambda$notifyReadyAsync$2(ExecutorNotifier.java:80)
  101. ... 7 more
  102. Process finished with exit code 1

org.apache.kafka.clients.admin.DescribeTopicsResult.allTopicNames()Lorg/apache/kafka/common/KafkaFuture

如上写的这个报错  解决方式如下

上图这两个依赖会冲突  把下面这个注释了  或者删掉 就大概率解决了

此处蓝色注释为自定义颜色,如感兴趣,可点击这个链接查看设置步骤

https://mp.csdn.net/mp_blog/creation/editor/137120207?spm=1001.2014.3001.9457icon-default.png?t=N7T8https://mp.csdn.net/mp_blog/creation/editor/137120207?spm=1001.2014.3001.9457

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/893989
推荐阅读
相关标签
  

闽ICP备14008679号