Hi team, I faced the following exception (it has o...
# troubleshooting
a
Hi team, I faced the following exception (it has occurred twice in the past month) in my running flink job using the flink kubernetes operator (full trace in the thread):
Copy code
The checkpoint was aborted due to exception of other subtasks sharing the ChannelState file.
The number of task slots for my task managers is set as 1 and I am making use of unaligned checkpointing with maximum checkpointing concurrency of 1. Can anyone help me with this?
Copy code
org.apache.flink.util.SerializedThrowable: org.apache.flink.runtime.checkpoint.CheckpointException: The checkpoint was aborted due to exception of other subtasks sharing the ChannelState file.
	at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.handleExecutionException(AsyncCheckpointRunnable.java:320) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.run(AsyncCheckpointRunnable.java:155) ~[flink-dist-1.17.2.jar:1.17.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: org.apache.flink.util.SerializedThrowable: java.lang.Exception: Could not materialize checkpoint 1998 for operator Source: CrystalBrandsAdsEvents[1] -> Calc[2] (2/3)#1.
	at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.handleExecutionException(AsyncCheckpointRunnable.java:298) ~[flink-dist-1.17.2.jar:1.17.2]
	... 4 more
Caused by: org.apache.flink.util.SerializedThrowable: java.util.concurrent.ExecutionException: org.apache.flink.runtime.checkpoint.CheckpointException: The checkpoint was aborted due to exception of other subtasks sharing the ChannelState file.
	at java.util.concurrent.CompletableFuture.reportGet(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture.get(Unknown Source) ~[?:?]
	at org.apache.flink.streaming.api.operators.OperatorSnapshotFinalizer.<init>(OperatorSnapshotFinalizer.java:66) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.finalizeNonFinishedSnapshots(AsyncCheckpointRunnable.java:191) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.run(AsyncCheckpointRunnable.java:124) ~[flink-dist-1.17.2.jar:1.17.2]
	... 3 more
Caused by: org.apache.flink.util.SerializedThrowable: org.apache.flink.runtime.checkpoint.CheckpointException: The checkpoint was aborted due to exception of other subtasks sharing the ChannelState file.
	at org.apache.flink.runtime.checkpoint.channel.ChannelStateCheckpointWriter.fail(ChannelStateCheckpointWriter.java:298) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.checkpoint.channel.ChannelStateWriteRequestDispatcherImpl.failAndClearWriter(ChannelStateWriteRequestDispatcherImpl.java:212) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.checkpoint.channel.ChannelStateWriteRequestDispatcherImpl.handleCheckpointAbortRequest(ChannelStateWriteRequestDispatcherImpl.java:189) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.checkpoint.channel.ChannelStateWriteRequestDispatcherImpl.dispatchInternal(ChannelStateWriteRequestDispatcherImpl.java:129) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.checkpoint.channel.ChannelStateWriteRequestDispatcherImpl.dispatch(ChannelStateWriteRequestDispatcherImpl.java:94) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.checkpoint.channel.ChannelStateWriteRequestExecutorImpl.loop(ChannelStateWriteRequestExecutorImpl.java:172) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.checkpoint.channel.ChannelStateWriteRequestExecutorImpl.run(ChannelStateWriteRequestExecutorImpl.java:127) ~[flink-dist-1.17.2.jar:1.17.2]
	... 1 more
Copy code
che.flink.runtime.taskmanager.Task.run(Task.java:562) ~[flink-dist-1.17.2.jar:1.17.2]
	at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.io.IOException: One or more Kafka Producer send requests have encountered exception
	at org.apache.flink.connector.kafka.sink.KafkaWriter.checkAsyncException(KafkaWriter.java:417) ~[?:?]
	at org.apache.flink.connector.kafka.sink.KafkaWriter.flush(KafkaWriter.java:211) ~[?:?]
	at org.apache.flink.streaming.runtime.operators.sink.SinkWriterOperator.prepareSnapshotPreBarrier(SinkWriterOperator.java:165) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.prepareSnapshotPreBarrier(RegularOperatorChain.java:89) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.SubtaskCheckpointCoordinatorImpl.checkpointState(SubtaskCheckpointCoordinatorImpl.java:321) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$performCheckpoint$14(StreamTask.java:1299) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.runThrowing(StreamTaskActionExecutor.java:50) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.StreamTask.performCheckpoint(StreamTask.java:1287) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.streaming.runtime.tasks.StreamTask.triggerCheckpointOnBarrier(StreamTask.java:1244) ~[flink-dist-1.17.2.jar:1.17.2]
	... 22 more
Caused by: org.apache.flink.util.FlinkRuntimeException: Failed to send data to Kafka topic-1@-1 with FlinkKafkaInternalProducer{transactionalId='null', inTransaction=false, closed=false}
	at org.apache.flink.connector.kafka.sink.KafkaWriter$WriterCallback.decorateException(KafkaWriter.java:470) ~[?:?]
	at org.apache.flink.connector.kafka.sink.KafkaWriter$WriterCallback.onCompletion(KafkaWriter.java:445) ~[?:?]
	at org.apache.kafka.clients.producer.KafkaProducer$InterceptorCallback.onCompletion(KafkaProducer.java:1418) ~[?:?]
	at org.apache.kafka.clients.producer.internals.ProducerBatch.completeFutureAndFireCallbacks(ProducerBatch.java:273) ~[?:?]
	at org.apache.kafka.clients.producer.internals.ProducerBatch.done(ProducerBatch.java:234) ~[?:?]
	at org.apache.kafka.clients.producer.internals.ProducerBatch.completeExceptionally(ProducerBatch.java:198) ~[?:?]
	at org.apache.kafka.clients.producer.internals.Sender.failBatch(Sender.java:758) ~[?:?]
	at org.apache.kafka.clients.producer.internals.Sender.failBatch(Sender.java:743) ~[?:?]
	at org.apache.kafka.clients.producer.internals.Sender.sendProducerData(Sender.java:384) ~[?:?]
	at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:327) ~[?:?]
	at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:243) ~[?:?]
	... 1 more
Caused by: org.apache.kafka.common.errors.TimeoutException: Expiring 8 record(s) for topic-1:120000 ms has passed since batch creation
2024-02-15 07:21:03,095 WARN  org.apache.flink.runtime.checkpoint.CheckpointFailureManager [] - Failed to trigger or complete checkpoint 1998 for job 12fb33784ddabf7884e4af0fcd45ce36. (0 consecutive failed attempts so far)
org.apache.flink.runtime.checkpoint.CheckpointException: The checkpoint was aborted due to exception of other subtasks sharing the ChannelState file.
	at org.apache.flink.runtime.messages.checkpoint.SerializedCheckpointException.unwrap(SerializedCheckpointException.java:51) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.receiveDeclineMessage(CheckpointCoordinator.java:1080) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.scheduler.ExecutionGraphHandler.lambda$declineCheckpoint$2(ExecutionGraphHandler.java:103) ~[flink-dist-1.17.2.jar:1.17.2]
	at org.apache.flink.runtime.scheduler.ExecutionGraphHandler.lambda$processCheckpointCoordinatorMessage$3(ExecutionGraphHandler.java:119) ~[flink-dist-1.17.2.jar:1.17.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]