<@U04S8PLJWMT> In v2.0.1 When I test the connector...
# replication-ask-ai
ç
@kapa.ai In v2.0.1 When I test the connector it gives me Airbyte is temporarily unavailable. Please try again. (HTTP 502). How to solve tihs?
k
The HTTP 502 error when testing a connector in Airbyte (self-hosted via
abctl
) is a known platform infrastructure issue, not a connector-specific bug. It has been reported across multiple connectors (Postgres, MySQL, MongoDB, CSV/File, etc.). [source-postgres 502 issue] A community-confirmed workaround is to regenerate and synchronize the authentication tokens between the
worker
and
workload-api-server
deployments. Here are the steps: 1. Get into your Docker container:
Copy code
docker ps
# Find your container ID, then:
docker exec -it <containerID> bash
2. Inside the container, run the following:
Copy code
# Check current pod status
kubectl -n airbyte-abctl get pods

# Generate and apply matching auth tokens to both services
BEARER_TOKEN=$(openssl rand -hex 16)
echo "Generated token: $BEARER_TOKEN"

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"

# Restart both services
kubectl -n airbyte-abctl rollout restart deployment airbyte-abctl-worker
kubectl -n airbyte-abctl rollout restart deployment airbyte-abctl-workload-api-server

# Wait for rollouts to complete
kubectl -n airbyte-abctl rollout status deployment airbyte-abctl-worker
kubectl -n airbyte-abctl rollout status deployment airbyte-abctl-workload-api-server
Multiple users have confirmed this resolves the 502 error across different connectors. [502 fix confirmed] > Note: The knowledge sources do not contain specific information about version
v2.0.1
in particular, but this fix has been reported to work on versions such as
1.8.3
and with
abctl
-based installations. If the issue persists after applying this fix, consider checking the Airbyte GitHub issues or community forums for further assistance. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
ç
@kapa.ai I installed with abctl and from version 1 to version 2. But after the installation with the fix above still getting the same problem. Also inside the worker pod I cannot acces to http://airbyte-abctl-workload-api-server-svc.airbyte-abctl.svc.cluster.local:8001/api/v1/health it gives me unauthorized. Where should I look or what should I do?
k
The "Unauthorized" response from the workload API server health endpoint, even after applying the token fix, suggests the
WORKLOAD_API_AUTH_HEADER
environment variable may also need to be set explicitly alongside the bearer token. Based on the knowledge sources, here's what to check and try: 1. Set both
WORKLOAD_API_AUTH_HEADER
and
WORKLOAD_API_BEARER_TOKEN
on all relevant deployments:
Copy code
# Generate a token
TOKEN=$(openssl rand -hex 24)
echo "Generated token: $TOKEN"

# Set on workload-api-server
kubectl -n airbyte-abctl set env deployment/airbyte-abctl-workload-api-server \
  WORKLOAD_API_AUTH_HEADER=Authorization \
  WORKLOAD_API_BEARER_TOKEN="$TOKEN"

# Set on worker
kubectl -n airbyte-abctl set env deployment/airbyte-abctl-worker \
  WORKLOAD_API_AUTH_HEADER=Authorization \
  WORKLOAD_API_BEARER_TOKEN="$TOKEN"

# Set on server (if applicable)
kubectl -n airbyte-abctl set env deployment/airbyte-abctl-server \
  WORKLOAD_API_AUTH_HEADER=Authorization \
  WORKLOAD_API_BEARER_TOKEN="$TOKEN"

# Restart all affected deployments
kubectl -n airbyte-abctl rollout restart deploy/airbyte-abctl-workload-api-server airbyte-abctl-worker airbyte-abctl-server
[source-postgres 502 issue] 2. Recreate the workload API secret: There is also a known issue where the
airbyte-abctl-workload-api-secrets
Kubernetes secret may be missing or mismatched after an upgrade. You can recreate it:
Copy code
KUBECONFIG="${HOME}/.airbyte/abctl/abctl.kubeconfig"
NAMESPACE="airbyte-abctl"
SECRET_NAME="airbyte-abctl-workload-api-secrets"

WORKLOAD_TOKEN=$(openssl rand -hex 32)

kubectl delete secret "$SECRET_NAME" -n "$NAMESPACE" --ignore-not-found --kubeconfig "$KUBECONFIG"

kubectl create secret generic "$SECRET_NAME" \
  --from-literal=bearer-token="$WORKLOAD_TOKEN" \
  -n "$NAMESPACE" \
  --kubeconfig "$KUBECONFIG"

kubectl set env deploy/airbyte-abctl-workload-api-server \
  -n "$NAMESPACE" \
  WORKLOAD_API_BEARER_TOKEN="$WORKLOAD_TOKEN" \
  --kubeconfig "$KUBECONFIG"

kubectl set env deploy/airbyte-abctl-worker \
  -n "$NAMESPACE" \
  WORKLOAD_API_BEARER_TOKEN="$WORKLOAD_TOKEN" \
  --kubeconfig "$KUBECONFIG"

kubectl rollout restart deploy/airbyte-abctl-workload-api-server -n "$NAMESPACE" --kubeconfig "$KUBECONFIG"
kubectl rollout restart deploy/airbyte-abctl-worker -n "$NAMESPACE" --kubeconfig "$KUBECONFIG"
[source-file 502 issue] 3. After restarting, verify the tokens are consistent: Make sure the
WORKLOAD_API_BEARER_TOKEN
value is identical across the
workload-api-server
,
worker
, and
server
deployments. A mismatch between any of these is the most common cause of persistent 401 Unauthorized errors. [source-postgres 502 issue] > Important note: There is an open bug report (v2.0.1, Helm chart 2.0.19) indicating that even when tokens are correctly set on the
workload-launcher
, the connector-sidecar pods spawned during connection tests do not inherit
WORKLOAD_API_AUTH_HEADER
and
WORKLOAD_API_BEARER_TOKEN
. This is described as a likely regression/bug in v2, and there is currently no documented Helm value to inject these into sidecar containers. [connector-sidecar auth bug] If you are hitting this specific issue, the knowledge sources do not contain a confirmed fix beyond what is described above. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.