:thread: Jobs not running
# ask-ai
v
🧵 Jobs not running
@kapa.ai My airbyte jobs are failing and we're getting the below error : Workload failed, source: workload-launcher io.airbyte.workload.launcher.pipeline.stages.model.StageError: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-appsflyer-check-231-4-wbdnv. at io.airbyte.workload.launcher.pipeline.stages.model.Stage.apply(Stage.kt:49) at io.airbyte.workload.launcher.pipeline.stages.LaunchPodStage.apply(LaunchPodStage.kt:40) at io.airbyte.workload.launcher.pipeline.stages.$LaunchPodStage$Definition$Intercepted.$$access$$apply(Unknown Source) at io.airbyte.workload.launcher.pipeline.stages.$LaunchPodStage$Definition$Exec.dispatch(Unknown Source) at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invoke(AbstractExecutableMethodsDefinition.java:456) at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:134) at io.airbyte.metrics.interceptors.InstrumentInterceptorBase.doIntercept(InstrumentInterceptorBase.kt:65) at io.airbyte.metrics.interceptors.InstrumentInterceptorBase.intercept(InstrumentInterceptorBase.kt:48) at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:143) at io.airbyte.workload.launcher.pipeline.stages.$LaunchPodStage$Definition$Intercepted.apply(Unknown Source) at io.airbyte.workload.launcher.pipeline.stages.LaunchPodStage.apply(LaunchPodStage.kt:28) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158) at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2571) at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194) at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194) at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194) at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194) at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194) at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367) at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117) at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:193) at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53) at reactor.core.publisher.Mono.subscribe(Mono.java:4560) at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:430) at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:446) at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:533) at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-appsflyer-check-231-4-wbdnv. at io.airbyte.workload.launcher.pods.KubePodClient.launchConnectorWithSidecar$io_airbyte_airbyte_workload_launcher(KubePodClient.kt:272) at io.airbyte.workload.launcher.pods.KubePodClient.launchCheck(KubePodClient.kt:208) at io.airbyte.workload.launcher.pipeline.stages.LaunchPodStage.applyStage(LaunchPodStage.kt:50) at io.airbyte.workload.launcher.pipeline.stages.LaunchPodStage.applyStage(LaunchPodStage.kt:28) at io.airbyte.workload.launcher.pipeline.stages.model.Stage.apply(Stage.kt:45) ... 41 more Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Operation: [patch] for kind: [Pod] with name: [source-appsflyer-check-231-4-wbdnv] in namespace: [airbyte] failed. at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:139) at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.lambda$patch$2(HasMetadataOperation.java:233) at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.patch(HasMetadataOperation.java:236) at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.patch(HasMetadataOperation.java:251) at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.serverSideApply(BaseOperation.java:1179) at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.serverSideApply(BaseOperation.java:98) at io.airbyte.workload.launcher.pods.KubePodLauncher.create$lambda$0(KubePodLauncher.kt:56) at io.airbyte.workload.launcher.pods.KubePodLauncher$runKubeCommand$1.get(KubePodLauncher.kt:296) at dev.failsafe.Functions.lambda$toCtxSupplier$11(Functions.java:243) at dev.failsafe.Functions.lambda$get$0(Functions.java:46) at dev.failsafe.internal.RetryPolicyExecutor.lambda$apply$0(RetryPolicyExecutor.java:74) at dev.failsafe.SyncExecutionImpl.executeSync(SyncExecutionImpl.java:187) at dev.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:376) at dev.failsafe.FailsafeExecutor.get(FailsafeExecutor.java:112) at io.airbyte.workload.launcher.pods.KubePodLauncher.runKubeCommand(KubePodLauncher.kt:294) at io.airbyte.workload.launcher.pods.KubePodLauncher.create(KubePodLauncher.kt:50) at io.airbyte.workload.launcher.pods.KubePodClient.launchConnectorWithSidecar$io_airbyte_airbyte_workload_launcher(KubePodClient.kt:269) ... 45 more Caused by: java.io.IOException: timeout at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.waitForResult(OperationSupport.java:504) at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleResponse(OperationSupport.java:524) at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handlePatch(OperationSupport.java:419) at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handlePatch(OperationSupport.java:397) at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handlePatch(BaseOperation.java:764) at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.lambda$patch$2(HasMetadataOperation.java:231) ... 60 more Caused by: java.io.InterruptedIOException: timeout at okhttp3.internal.connection.RealCall.timeoutExit(RealCall.kt:398) at okhttp3.internal.connection.RealCall.callDone(RealCall.kt:360) at okhttp3.internal.connection.RealCall.noMoreExchanges$okhttp(RealCall.kt:325) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:209) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517) ... 3 more Caused by: java.io.IOException: Canceled at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:72) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ... 4 more 2025-07-27 125439 platform INFO Retry State: RetryManager(completeFailureBackoffPolicy=BackoffPolicy(minInterval=PT10S, maxInterval=PT30M, base=3), partialFailureBackoffPolicy=null, successiveCompleteFailureLimit=5, successivePartialFailureLimit=1000, totalCompleteFailureLimit=10, totalPartialFailureLimit=20, successiveCompleteFailures=4, successivePartialFailures=0, totalCompleteFailures=4, totalPartialFailures=0) 2025-07-27 125440 platform WARN Backing off for: 4 minutes 30 seconds. 2025-07-27 125911 platform INFO APPLY Stage: BUILD — (workloadId=16447954-e6a8-4593-b140-43dea13bc457_231_4_check) 2025-07-27 125911 platform INFO APPLY Stage: CLAIM — (workloadId=16447954-e6a8-4593-b140-43dea13bc457_231_4_check) 2025-07-27 125911 platform INFO Claimed: true for 16447954-e6a8-4593-b140-43dea13bc457_231_4_check via API for d7829c15-1d9e-49c5-9bd4-684658bd6ddd 2025-07-27 125911 platform INFO APPLY Stage: LOAD_SHED — (workloadId=16447954-e6a8-4593-b140-43dea13bc457_231_4_check) 2025-07-27 125911 platform INFO APPLY Stage: CHECK_STATUS — (workloadId=16447954-e6a8-4593-b140-43dea13bc457_231_4_check) 2025-07-27 125911 platform INFO No pod found running for workload 16447954-e6a8-4593-b140-43dea13bc457_231_4_check 2025-07-27 125911 platform INFO APPLY Stage: MUTEX — (workloadId=16447954-e6a8-4593-b140-43dea13bc457_231_4_check) 2025-07-27 125911 platform INFO No mutex key specified for workload: 16447954-e6a8-4593-b140-43dea13bc457_231_4_check. Continuing... 2025-07-27 125911 platform INFO APPLY Stage: LAUNCH — (workloadId=16447954-e6a8-4593-b140-43dea13bc457_231_4_check) 2025-07-27 125911 platform INFO [initContainer] image: airbyte/workload-init-container:1.6.2 resources: ResourceRequirements(claims=[], limits={}, requests={}, additionalProperties={}) 2025-07-27 131215 platform ERROR Stage Pipeline Exception: io.airbyte.workload.launcher.pipeline.stages.model.StageError: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-appsflyer-check-231-4-wbdnv. message: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-appsflyer-check-231-4-wbdnv. stackTrace: [Ljava.lang.StackTraceElement;@4b343816 2025-07-27 131215 platform INFO Attempting to update workload: 16447954-e6a8-4593-b140-43dea13bc457_231_4_check to FAILED. 2025-07-27 131215 platform INFO Pipeline aborted after error for workload: 16447954-e6a8-4593-b140-43dea13bc457_231_4_check. 2025-07-27 131216 platform INFO Retry State: RetryManager(completeFailureBackoffPolicy=BackoffPolicy(minInterval=PT10S, maxInterval=PT30M, base=3), partialFailureBackoffPolicy=null, successiveCompleteFailureLimit=5, successivePartialFailureLimit=1000, totalCompleteFailureLimit=10, totalPartialFailureLimit=20, successiveCompleteFailures=5, successivePartialFailures=0, totalCompleteFailures=5, totalPartialFailures=0) Backoff before next attempt: 13 minutes 30 seconds 2025-07-27 131216 platform ERROR Failing job: 231, reason: Job failed after too many retries for connection bb5159b0-6fd8-4abf-b7be-0c3ddef34bf2 What exactly is going wrong ?
k
Based on the information in the provided knowledge sources, there are several reasons why Airbyte jobs might not be running: 1. Resource Exhaustion or Leaks: In Kubernetes deployments, the
airbyte-worker
process can experience resource leaks, leading to excessive memory and thread usage. When this happens, new jobs cannot spawn the threads they need, resulting in errors like "unable to create native thread: possibly out of memory or process/resource limits reached." Restarting the
airbyte-worker
resolves the issue temporarily, but it may recur if the underlying cause isn't addressed. Monitoring memory and thread usage, and collecting more diagnostics when the issue occurs, is recommended for further troubleshooting [Resource leak in airbyte-worker](https://discuss.airbyte.io/t/2309). 2. Temporal Service Issues: In Docker deployments, if the Temporal service is stuck or overloaded (e.g., "service rate limit exceeded"), jobs may not be triggered, and you may see errors like "Server temporarily unavailable (http.502...)" in the UI or when using Airflow's
AirbyteTriggerSyncOperator
. High CPU usage by the Temporal container and errors such as "query task not found, or already expired" in the worker logs are indicators of this problem. No job containers for syncs or connection checks are created in this state. Restarting the affected containers or the entire stack may be necessary [Self-hosted Airbyte in Docker stuck and will not trigger sync](https://github.com/airbytehq/airbyte/issues/44833). 3. Airflow Integration Issues: When triggering Airbyte jobs from Airflow using the
AirbyteTriggerSyncOperator
, sometimes Airbyte does not communicate the result of the job back to Airflow, leaving the Airflow task in a "running" state even though the Airbyte job has completed successfully. This could be due to issues on either the Airbyte or Airflow side. Checking Airflow and Airbyte logs, and manually querying Airbyte’s Job API to verify job status, can help diagnose where the breakdown is occurring [Trigger Airbyte job using Airflow/Composer](https://discuss.airbyte.io/t/1603). 4. Job Hangs and Missing Stats: There are cases where sync jobs hang indefinitely, with logs showing repeated warnings about "Missing stats for job ... attempt ...". This may indicate deeper issues in the job orchestration or resource management layers, and often requires investigation into pod lifecycle, resource allocation, and the health of supporting services like Temporal and Kubernetes [All sync jobs hanging indefinitely](https://github.com/airbytehq/airbyte/issues/55812). Summary: If your Airbyte jobs are not running, check for resource exhaustion (memory, threads), Temporal service health, integration issues with orchestration tools like Airflow, and review logs for errors or warnings about job status and stats. Restarting affected services may provide a temporary fix, but persistent issues may require deeper investigation into resource management and service health.
Your Airbyte jobs are failing because the workload launcher is unable to create the required Kubernetes pod for the job. The error message:
Copy code
io.airbyte.workload.launcher.pipeline.stages.model.StageError: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-appsflyer-check-231-4-wbdnv. ... Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Operation: [patch] for kind: [Pod] with name: [source-appsflyer-check-231-4-wbdnv] in namespace: [airbyte] failed. ... Caused by: java.io.IOException: timeout ... Caused by: java.io.InterruptedIOException: timeout ... Caused by: java.io.IOException: Canceled
indicates that the Airbyte workload launcher is attempting to create or patch a Kubernetes pod, but the operation is timing out. This is a known class of issues in Airbyte when the Kubernetes API server does not respond in time, or there are networking/connectivity issues between Airbyte and the Kubernetes cluster, or the cluster is under heavy load or misconfigured. Common causes for this error include: - Kubernetes API server is slow or unresponsive (network issues, API server under load, etc.). - Resource constraints in the cluster (not enough CPU/memory to schedule new pods). - Pod security policies, RBAC, or service account misconfiguration that prevent pod creation. - Timeouts in the underlying HTTP client (as seen in the stack trace). Relevant similar issues: - Other users have reported similar errors where pod creation fails due to timeouts or Kubernetes client exceptions, often related to cluster configuration, network, or permissions issues [[Pod creation fails with timeout](https://github.com/airbytehq/airbyte/issues/44443)]. What you can do: 1. Check the health and responsiveness of your Kubernetes API server. 2. Ensure your cluster has enough resources (CPU, memory, etc.) to schedule new pods. 3. Review Airbyte and Kubernetes logs for more details on why the pod creation is timing out. 4. Check for network issues between Airbyte and the Kubernetes API server. 5. Verify your RBAC and service account configuration to ensure Airbyte has permission to create pods. If the problem persists after these checks, you may need to provide more detailed logs or cluster information for further troubleshooting. The error is not specific to Airbyte's application logic, but rather to its interaction with the Kubernetes environment [[Pod creation fails with timeout](https://github.com/airbytehq/airbyte/issues/44443)].