Diana
10/01/2025, 2:18 PMkapa.ai
10/01/2025, 2:18 PMWORKLOAD_API_BEARER_TOKEN (and sometimes WORKLOAD_API_AUTH_HEADER) environment variables are not set to the same value across the relevant deployments. This causes authorization failures (401 errors) between the worker and workload API server, which in turn leads to failed job launches and 502 errors in the UI. This has been reported and resolved in several user cases for Airbyte v2 OSS on Kubernetes and Docker, especially when using abctl or similar orchestration tools. How to Fix: 1. Generate a Bearer Token: bash BEARER_TOKEN=$(openssl rand -hex 16) echo "Generated token: $BEARER_TOKEN" 2. Set the Token on All Relevant Deployments: bash kubectl -n airbyte-abctl set env deployment/airbyte-abctl-worker \ WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN" \ INTERNAL_API_AUTH_TOKEN="$BEARER_TOKEN" kubectl -n airbyte-abctl set env deployment/airbyte-abctl-workload-api-server \ WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN" kubectl -n airbyte-abctl set env deployment/airbyte-abctl-server \ WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN" 3. Restart the Deployments: bash kubectl -n airbyte-abctl rollout restart deployment airbyte-abctl-worker kubectl -n airbyte-abctl rollout restart deployment airbyte-abctl-workload-api-server kubectl -n airbyte-abctl rollout restart deployment airbyte-abctl-server 4. Wait for the pods to become healthy: bash kubectl -n airbyte-abctl get pods This process ensures that all components use the same authentication token, allowing them to communicate properly and preventing the 502 errors and restarts. This solution has been confirmed to resolve similar issues for other users deploying Airbyte v2 OSS on Kubernetes and Docker environments [see details and user confirmations](https://github.com/airbytehq/airbyte/issues/65567) [and here](https://github.com/airbytehq/airbyte/issues/66692). Note: If you are not using the airbyte-abctl namespace or have customized your deployment, adjust the namespace and deployment names accordingly. If after this fix the pods still keep restarting, check the logs for each pod for additional errors (e.g., resource limits, database connectivity, or other misconfigurations), but the token mismatch is the most common root cause for the symptoms you described.Diana
10/01/2025, 2:20 PMkapa.ai
10/01/2025, 2:20 PMkapa.ai
10/01/2025, 2:21 PMWORKLOAD_API_BEARER_TOKEN) are set consistently across all related deployments. This is not limited to abctl deployments; it can also affect Helm-based Kubernetes installations if the tokens are not aligned [see user confirmations](https://github.com/airbytehq/airbyte/issues/65567) [and here](https://github.com/airbytehq/airbyte/issues/66692). - The official documentation does not provide explicit steps for setting these tokens in Helm-based deployments, but user reports confirm that the same root cause and solution apply. What You Should Do: 1. Generate a Bearer Token: bash BEARER_TOKEN=$(openssl rand -hex 16) echo "Generated token: $BEARER_TOKEN" 2. Set the Token on All Relevant Deployments: Replace airbyte-v2 with your namespace and use the correct deployment names (e.g., airbyte-worker, airbyte-workload-api-server, airbyte-server, etc.): bash kubectl -n airbyte-v2 set env deployment/airbyte-worker WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN" kubectl -n airbyte-v2 set env deployment/airbyte-workload-api-server WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN" kubectl -n airbyte-v2 set env deployment/airbyte-server WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN" # Repeat for other relevant deployments if needed 3. Restart the Deployments: bash kubectl -n airbyte-v2 rollout restart deployment/airbyte-worker kubectl -n airbyte-v2 rollout restart deployment/airbyte-workload-api-server kubectl -n airbyte-v2 rollout restart deployment/airbyte-server # Repeat for other relevant deployments if needed 4. Monitor Pod Status: bash kubectl -n airbyte-v2 get pods If the issue persists: - Check the logs of the restarting pods for more specific errors (e.g., database connectivity, resource limits, or other misconfigurations). - Ensure your values.yaml is correctly configured for your environment, especially for database and storage settings. Summary: Even though you did not use abctl, the 502 error and pod restarts are most commonly caused by a mismatch in the WORKLOAD_API_BEARER_TOKEN across Airbyte components. Aligning this token should resolve the issue, as confirmed by multiple user reports for Helm-based deployments [see user confirmations](https://github.com/airbytehq/airbyte/issues/65567) [and here](https://github.com/airbytehq/airbyte/issues/66692). If you need more detailed troubleshooting, please provide logs from the failing pods.Diana
10/01/2025, 2:25 PMkapa.ai
10/01/2025, 2:26 PMkapa.ai
10/01/2025, 2:26 PMWORKLOAD_API_BEARER_TOKEN, you would typically see an Unauthorized error in the logs, such as: io.airbyte.api.client.ApiException: Unauthorized at io.airbyte.workload.api.client.WorkloadApiClient.workloadCreate(...) This pattern is confirmed in multiple user reports where the root cause was a token mismatch, and the logs clearly showed Unauthorized errors when the worker tried to communicate with the workload API server ([example](https://github.com/airbytehq/airbyte/issues/65567), [example](https://github.com/airbytehq/airbyte/issues/65574)). If you do not see any Unauthorized errors in your logs, it suggests that the root cause of your 502 errors and pod restarts may be different. Other possible causes (based on the knowledge sources) include: - Database connectivity issues - Resource constraints (CPU/memory) - Misconfiguration in your values.yaml - Other internal errors not related to authentication Next steps: - Check the logs of the restarting pods (e.g., airbyte-worker, airbyte-server, etc.) for any error messages or stack traces. - Look for errors related to database connections, out-of-memory kills, or other exceptions. - If you find a different error message, please share it for more targeted troubleshooting. In summary: If the WORKLOAD_API_BEARER_TOKEN was the issue, you should see Unauthorized errors in the logs. Since you do not, the knowledge sources suggest you should look for other causes in the pod logs for further diagnosis. If you provide those logs, I can help interpret them based on the available information. Let me know if you have more log details to share!Diana
10/01/2025, 2:29 PMkapa.ai
10/01/2025, 2:29 PMkapa.ai
10/01/2025, 2:30 PMOOMKilled, it means the container exceeded its memory limit and was terminated by Kubernetes. This is a common issue if the memory requests/limits are set too low for the workload. There are several reports of Airbyte pods (including bootloader and worker) being OOMKilled due to insufficient memory allocation in the Helm values or Kubernetes resource settings [see example](https://github.com/airbytehq/airbyte/issues/48816). What to do: - Increase the memory limits and requests for the airbyte-bootloader in your values.yaml file. For example: yaml airbyte-bootloader: resources: requests: memory: 1Gi cpu: 1 limits: memory: 2Gi cpu: 2 - After updating, run a Helm upgrade: bash helm upgrade airbyte airbyte-v2/airbyte --namespace airbyte-v2 --values ./values.yaml ### 2. airbyte-server and Other Pods Restarting Pods like airbyte-server, airbyte-worker, etc., may also restart if they are running out of memory or if a critical dependency (like the bootloader or database) is not available. If the bootloader is OOMKilled and cannot complete its tasks, it can cause other components to fail or restart as well [see related discussion](https://github.com/airbytehq/airbyte/issues/60318). ### 3. 502 Errors HTTP 502 errors from the Airbyte UI are often a symptom of backend services (like airbyte-server) being unavailable, which can be caused by repeated restarts or OOMKills. This is consistent with your symptoms. --- Summary of Actions: - Increase memory (and possibly CPU) limits for the airbyte-bootloader and other affected pods in your values.yaml. - Apply the changes with a Helm upgrade. - Monitor pod status and logs after the change. If you continue to see restarts or 502 errors after increasing resources, check the logs for other errors (such as database connectivity or misconfiguration), as these are also common causes of such issues. If you can share the specific error logs from the airbyte-server pod, I can help further interpret them. But based on the knowledge sources, OOMKilled is a clear indicator that resource limits are too low for your current workload [see example](https://github.com/airbytehq/airbyte/issues/48816).Diana
10/01/2025, 2:36 PMserver.livenessProbe server.readinessProbe - https://discuss.airbyte.io/t/bad-gateway-error-due-to-airbyte-server-constantly-restarting/4176/3kapa.ai
10/01/2025, 2:36 PMkapa.ai
10/01/2025, 2:37 PMserver.livenessProbe and server.readinessProbe. The default values may be too aggressive for some environments, causing Kubernetes to restart pods that are simply slow to start or respond under load. You can increase the initialDelaySeconds, timeoutSeconds, or even disable the probes in development environments to reduce unnecessary restarts. For example, in your `values.yaml`: yaml server: livenessProbe: enabled: true initialDelaySeconds: 60 periodSeconds: 20 timeoutSeconds: 10 failureThreshold: 5 successThreshold: 1 readinessProbe: enabled: true initialDelaySeconds: 60 periodSeconds: 20 timeoutSeconds: 10 failureThreshold: 5 successThreshold: 1 This approach is supported by the configuration options shown in the knowledge sources, which document how to adjust these probe settings for Airbyte components deployed via Helm [see example configuration](https://github.com/airbytehq/airbyte/issues/49843). So, yes—if you are experiencing restarts and suspect the probes are too strict, increasing their thresholds or disabling them temporarily (especially in dev) is a recommended troubleshooting step.