Sean Glynn
03/01/2023, 2:27 PM2023-03-02 10:11:16 ERROR i.a.w.g.DefaultReplicationWorker(replicate):259 - Sync worker failed.
io.airbyte.workers.exception.WorkerException: java.io.IOException: kubectl cp failed with exit code 1
2023-03-01 10:10:50 WARNi.t.i.s.WorkflowExecuteRunnable(throwAndFailWorkflowExecution):134 - Workflow execution failure WorkflowId='sync_2465', RunId=9dbc128b-e826-4cf2-b86e-6daad66ea1e2, WorkflowType='SyncWorkflow'
io.temporal.failure.ActivityFailure: scheduledEventId=51, startedEventId=52, activityType='Normalize', activityId='6be893fc-04a9-301c-b7ff-e921b5e0e2c8', identity='1@data-airbyte-worker-7dfdfd79f7-tq9q5', retryState=RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED
.....
Log4j2Appender says: Completing future exceptionally...
2023-03-01 10:10:50 INFOi.a.w.t.TemporalAttemptExecution(lambda$getWorkerThread$5):198 - Completing future exceptionally...
io.airbyte.workers.exception.WorkerException: Normalization Failed.
.....
Log4j2Appender says: Normalization failed for job 2466.
2023-03-01 10:34:56 ERROR i.a.w.g.DefaultReplicationWorker(replicate):259 - Sync worker failed.
io.airbyte.workers.exception.WorkerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "io.airbyte.workers.process.KubePortManagerSingleton.take()" is null
Once we restart the worker pod - things return to normal.
We face this issue 1-2 times per day at different times.
Are there any related open issues or suggestions on how to tune configurations to avoid this?
Related issues:
β’ This issue has been closed but we are experiencing the same issue: https://github.com/airbytehq/airbyte/issues/10748#issuecomment-1069139006
β’ We have deployed the newest Airbyte version which includes the increased timeout fix mentioned here: https://github.com/airbytehq/airbyte/issues/22907
Airbyte version: 0.41.0
I can confirm that the worker has sufficient resources (cpu/memory/disk) so I do not believe this is the issue.Marcos Marx (Airbyte)
03/02/2023, 4:17 PMSean Glynn
03/06/2023, 2:34 PMSean Glynn
03/07/2023, 12:18 PMSean Glynn
03/07/2023, 12:23 PMMarcos Marx (Airbyte)
03/13/2023, 1:25 PMPierre CORBEL
03/13/2023, 3:03 PMMarcos Marx (Airbyte)
03/13/2023, 4:02 PMPierre CORBEL
03/13/2023, 4:02 PMDavin Chia (Airbyte)
03/13/2023, 4:04 PMPierre CORBEL
03/13/2023, 4:21 PMSean Glynn
03/14/2023, 9:58 AMSean Glynn
03/14/2023, 10:56 AMSean Glynn
03/14/2023, 11:00 AMOliver Meyer
03/21/2023, 9:16 AMSean Glynn
03/21/2023, 9:43 AMSean Glynn
03/21/2023, 9:43 AMOliver Meyer
03/21/2023, 9:43 AMOliver Meyer
03/21/2023, 9:44 AMSean Glynn
03/21/2023, 9:45 AMSean Glynn
03/21/2023, 9:45 AMOliver Meyer
03/21/2023, 9:46 AMSean Glynn
03/21/2023, 11:17 AMAkash Patel
04/11/2023, 7:50 AMManish Jaiswal
04/12/2023, 9:16 AM2023-04-12 03:35:20 - Additional Failure Information: Setting attempt to FAILED because the temporal workflow for this connection was restarted, and existing job state was cleaned.
2023-04-12 03:20:00 ERROR i.a.w.g.DefaultCheckConnectionWorker(run):100 - Unexpected error while checking connection:
io.airbyte.workers.exception.WorkerException: null
at io.airbyte.workers.process.KubeProcessFactory.create(KubeProcessFactory.java:138) ~[io.airbyte-airbyte-workers-0.39.42-alpha.jar:?]
at io.airbyte.workers.process.AirbyteIntegrationLauncher.check(AirbyteIntegrationLauncher.java:84) ~[io.airbyte-airbyte-workers-0.39.42-alpha.jar:?]
at io.airbyte.workers.general.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:63) ~[io.airbyte-airbyte-workers-0.39.42-alpha.jar:?]
at io.airbyte.workers.general.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:37) ~[io.airbyte-airbyte-workers-0.39.42-alpha.jar:?]
at io.airbyte.workers.temporal.TemporalAttemptExecution.lambda$getWorkerThread$2(TemporalAttemptExecution.java:155) ~[io.airbyte-airbyte-workers-0.39.42-alpha.jar:?]
at java.lang.Thread.run(Thread.java:1589) [?:?]
Caused by: java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1681) ~[?:?]
at java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:515) ~[?:?]
at java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:677) ~[?:?]
at io.airbyte.workers.process.KubePortManagerSingleton.take(KubePortManagerSingleton.java:67) ~[io.airbyte-airbyte-workers-0.39.42-alpha.jar:?]
at io.airbyte.workers.process.KubeProcessFactory.create(KubeProcessFactory.java:102) ~[io.airbyte-airbyte-workers-0.39.42-alpha.jar:?]
... 5 more
2023-04-12 03:20:00 INFO i.a.w.t.TemporalAttemptExecution(get):131 - Stopping cancellation check scheduling...Sean Glynn
04/12/2023, 11:04 AM0.42.1Sean Glynn
04/12/2023, 11:05 AMAkash Patel
04/12/2023, 11:06 AMSean Glynn
04/12/2023, 11:08 AM0.41.0 -> 0.42.1 πManish Jaiswal
04/12/2023, 11:08 AMManish Jaiswal
04/12/2023, 11:10 AMSean Glynn
04/12/2023, 11:25 AMk get pods -n data-airbyte -l airbyte=job-pod
β’ If there are any stale job pods that exist greater than the TTL expected => Delete the pod
β¦ FYI: this is just a theory that some unexpected stale pods are hogging the portsManish Jaiswal
04/13/2023, 6:39 AMOliver Meyer
04/14/2023, 7:06 AMwe have not encountered this issue since upgradingThat's good news, I'll upgrade our deployment in the next few days and see if that helps in our case. Thanks for the tip->0.41.00.42.1
Manish Jaiswal
04/18/2023, 10:47 AM0.42.1 ?, we are also planing to upgrade.Akash Patel
04/19/2023, 12:53 PMSean Glynn
04/21/2023, 10:44 AMOliver Meyer
05/15/2023, 12:14 PMSean Glynn
05/15/2023, 4:50 PMOliver Meyer
05/18/2023, 10:18 AM2023-05-18 09:44:57 ERROR i.a.w.g.DefaultReplicationWorker(replicate):279 - Sync worker failed.
io.airbyte.workers.exception.WorkerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "io.airbyte.workers.process.KubePortManagerSingleton.take()" is null
It took longer than before for them to appear so it looks like the commit above helped, but didn't fix the problem completely πManish Jaiswal
05/18/2023, 10:24 AMOliver Meyer
05/18/2023, 10:24 AMOliver Meyer
06/05/2023, 6:10 AMSean Glynn
06/06/2023, 8:14 AMSean Glynn
06/06/2023, 8:14 AMOliver Meyer
06/06/2023, 1:11 PMSean Glynn
06/06/2023, 4:59 PM0.45.22
AB app version: 0.44.5
Did you try scaling out the worker replicas?Oliver Meyer
06/09/2023, 7:03 AMChinmay Kulkarni
11/13/2023, 9:29 AMChristopher Hronek
01/21/2024, 4:04 AM0.50.33 and experiencing this issueChinmay Kulkarni
01/22/2024, 5:15 AMDavin Chia (Airbyte)
01/22/2024, 2:52 PManirudh shingala
01/22/2024, 4:09 PMDaniel E
02/05/2024, 5:49 PMJack Hulbert
07/08/2024, 6:59 PMDavin Chia (Airbyte)
Vidit Patel
08/09/2024, 1:39 PMapiVersion: batch/v1
kind: CronJob
metadata:
name: airbyte-worker-restart-cron
namespace: airbyte
spec:
schedule: CRON_TZ=Asia/Kolkata 30 11 * * *
concurrencyPolicy: "Replace"
startingDeadlineSeconds: 200
suspend: false
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
serviceAccountName: scaler-sa
containers:
- name: airbyte-worker-restart-cron
image: bitnami/kubectl:latest
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- |
echo "[+] Checking running orchestrator pods"
while [ $(kubectl get pods -n airbyte | grep -E 'Running|Pending|Init' | awk '{print $1}' | grep orchestrator | wc -l) -gt 0 ]; do
echo "[~] Waiting for orchestrator pods to complete"; sleep 5;
done
echo "[+] Restarting workers"
kubectl scale deploy airbyte-gipl-worker -n airbyte --replicas=0
sleep 1
kubectl scale deploy airbyte-gipl-worker -n airbyte --replicas=2
restartPolicy: OnFailureDavin Chia (Airbyte)