Luca Castelli created FLINK-37370: ------------------------------------- Summary: [Observer] Finished batch jobs throw ReconciliationException and never reach FINISHED in the CR Key: FLINK-37370 URL: https://issues.apache.org/jira/browse/FLINK-37370 Project: Flink Issue Type: Bug Components: Kubernetes Operator Environment: I've attached the flinkdeployment CR I used to locally replicate. Reporter: Luca Castelli Fix For: kubernetes-operator-1.11.0 Attachments: operator-log-batch-job.log, test-batch-job.yaml
The root error (full logs attached): {code:java} Caused by: org.apache.flink.runtime.rest.util.RestClientException: [org.apache.flink.runtime.rest.handler.RestHandlerException: Checkpointing has not been enabled. at org.apache.flink.runtime.rest.handler.job.checkpoints.CheckpointingStatisticsHandler.createCheckpointingStatistics(CheckpointingStatisticsHandler.java:107) {code} # The job finishes successfully and the job status changes to FINISHED in memory # In the observation loop, in[ AbstractFlinkService.getCheckpointInfo|https://github.com/apache/flink-kubernetes-operator/blob/main/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/AbstractFlinkService.java#L570], the operator successfully connects to the Flink REST API # It tries to get checkpoint statistics via CheckpointingStatisticsHandler, but the handler throws an error because checkpointing is not enabled. This is an expected response since it's a batch job E.g.[ http://localhost:8081/jobs/job-id/checkpoints|http://localhost:8081/jobs/d12843a2a326d5268e550012e620cdca/checkpoints] {code:java} { "errors": [ "org.apache.flink.runtime.rest.handler.RestHandlerException: Checkpointing has not been enabled.\n\tat org.apache.flink.runtime.rest.handler.job.checkpoints.CheckpointingStatisticsHandler.createCheckpointingStatistics(CheckpointingStatisticsHandler.java:107)\n\tat org.apache.flink.runtime.rest.handler.job.checkpoints.CheckpointingStatisticsHandler.handleCheckpointStatsRequest(CheckpointingStatisticsHandler.java:85)\n\tat org.apache.flink.runtime.rest.handler.job.checkpoints.CheckpointingStatisticsHandler.handleCheckpointStatsRequest(CheckpointingStatisticsHandler.java:59)\n\tat org.apache.flink.runtime.rest.handler.job.checkpoints.AbstractCheckpointStatsHandler.lambda$handleRequest$1(AbstractCheckpointStatsHandler.java:89)\n\tat java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642)\n\tat java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\n" ] }{code} # The REST endpoint exists but returns the exception which then bubbles up to {code:java} org.apache.flink.kubernetes.operator.exception.ReconciliationException: Could not observe latest savepoint information{code} in the operator and continues being thrown in a loop # The deployment is never cleaned up and never reaches a FINISHED JOB STATUS in the CR -- This message was sent by Atlassian Jira (v8.20.10#820010)