I updated Airbyte, which is running on a VM on GCP...
# replication-troubleshooting
i
I updated Airbyte, which is running on a VM on GCP, using abctl version 0.30.1. However, I'm now getting the following error when configuring a source: An unknown error occurred. (HTTP 504). I tried the following solution below, but it didn't work: https://github.com/szemek/troubleshooting/blob/main/airbyte.md#an-unknown-error-occurred-http-504
k
New message text here
a
Hi, this I think is a somehow known issue with the latest versions of abctl. Reason for that is that behind the scenes, worker and workload-api-server components lack matching bearer tokens for authentication; however, they need to exist, and to be matching, when
API_AUTHORIZATION_ENABLED=true
. In latest abctl deployments, these tokens either aren't set properly or get out of sync, especially after pod restarts. I have several clients that I work with, and use Airbyte for them, so had to come up with a temporary workaround after digging in for what's happening. The following approach worked for me - feel free to try:
Copy code
# Set the kubeconfig environment variable
export KUBECONFIG=/root/.airbyte/abctl/abctl.kubeconfig

# Check if kubectl is installed
which kubectl || (curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x kubectl && sudo mv kubectl /usr/local/bin/)

# Check current 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

# Make the kubeconfig persistent
echo 'export KUBECONFIG=/root/.airbyte/abctl/abctl.kubeconfig' >> ~/.bashrc
Tell me if it works for you, then we can somehow pin it for others to find a way out.
(you can run these commands once ssh'ed into your VM; supposing that you use a default - debian )
y
@Albinas Plėšnys interesting, I suppose this also works on EKS? If I manually set the token in the values.yaml
a
Yeah, should work on EKS too. The key is making sure both the worker and workload-api-server get the exact same token value. In your values.yaml you'd need something like:
Copy code
worker:
  env_vars:
    WORKLOAD_API_BEARER_TOKEN: "your-token-here"
    INTERNAL_API_AUTH_TOKEN: "your-token-here"

workload-api-server:
  env_vars:
    WORKLOAD_API_BEARER_TOKEN: "your-token-here"  # same token
Just generate a token with
openssl rand -hex 16
and use that same value in all three places. Though if you're using the official Helm chart, check if there's already a secret handling this. Likely the chart is supposed to create and share a secret automatically but something's broken.
✅ 1
y
Thanks @Albinas Plėšnys now at least I am getting somewhere. Previously I could not even do a connection test on my destination Snowflake connector. What happens now is that the process starts (a new pod for connection test), but at the end, the pod cannot send the results back
Copy code
2025-08-27 11:21:35,506 [main]	INFO	i.a.w.i.VersionedAirbyteStreamFactory(internalLog$io_airbyte_airbyte_commons_worker):248 - INFO main i.a.c.i.b.IntegrationRunner(runInternal):224 Completed integration: io.airbyte.integrations.destination.snowflake.SnowflakeDestination
2025-08-27 11:21:35,507 [main]	INFO	i.a.w.i.VersionedAirbyteStreamFactory(internalLog$io_airbyte_airbyte_commons_worker):248 - INFO main i.a.c.i.b.a.AdaptiveDestinationRunner$Runner(run):69 Completed destination: io.airbyte.integrations.destination.snowflake.SnowflakeDestination
2025-08-27 11:21:35,508 [main]	INFO	i.a.c.ConnectorMessageProcessor(updateConfigFromControlMessage):267 - Checking for optional control message...
2025-08-27 11:21:35,509 [main]	INFO	i.a.c.ConnectorMessageProcessor(updateConfigFromControlMessage):289 - Optional control message not found. Skipping...
2025-08-27 11:21:35,510 [main]	INFO	i.a.c.ConnectorWatcher(saveConnectorOutput):168 - Writing output of 424892c4-daac-4491-b35d-c6688ba547ba_ef9db2e1-429d-40f9-b048-701bdbab70c2_0_check to the doc store
2025-08-27 11:21:35,839 [main]	INFO	i.a.c.ConnectorWatcher(markWorkloadSuccess):173 - Marking workload 424892c4-daac-4491-b35d-c6688ba547ba_ef9db2e1-429d-40f9-b048-701bdbab70c2_0_check as successful
2025-08-27 11:21:35,850 [main]	ERROR	i.a.c.ConnectorWatcher(handleException):182 - Error performing operation: io.airbyte.api.client.ApiException
io.airbyte.api.client.ApiException: Service Unavailable
	at io.airbyte.workload.api.client.WorkloadApiClient.unit(WorkloadApiClient.kt:405)
	at io.airbyte.workload.api.client.WorkloadApiClient.workloadSuccess(WorkloadApiClient.kt:54)
	at io.airbyte.connectorSidecar.ConnectorWatcher.markWorkloadSuccess(ConnectorWatcher.kt:174)
	at io.airbyte.connectorSidecar.ConnectorWatcher.run(ConnectorWatcher.kt:79)
	at io.airbyte.connectorSidecar.ApplicationKt.main(Application.kt:22)
	at io.airbyte.connectorSidecar.ApplicationKt.main(Application.kt)

2025-08-27 11:21:35,938 [main]	INFO	i.a.c.ConnectorWatcher(failWorkload):324 - Failing workload 424892c4-daac-4491-b35d-c6688ba547ba_ef9db2e1-429d-40f9-b048-701bdbab70c2_0_check.
2025-08-27 11:21:35,946 [main]	INFO	i.a.c.ConnectorWatcher(failWorkload):324 - Failing workload 424892c4-daac-4491-b35d-c6688ba547ba_ef9db2e1-429d-40f9-b048-701bdbab70c2_0_check.
2025-08-27 11:21:35,949 [main]	INFO	i.a.c.ConnectorWatcher(exitInternalError):236 - Deliberately exiting process with code 1.
a
hmm this looks like the workload-api-server might be down or unreachable from the pod? Could you check the following
Copy code
# Check the namespace first
kubectl get namespaces | grep airbyte
Then use whatever namespace shows up (probably 'airbyte')
Copy code
kubectl get pods -n airbyte | grep workload-api

# Check logs:
kubectl logs -n airbyte deployment/airbyte-workload-api-server --tail=20

# See if the service exists and has endpoints:
kubectl get svc -n airbyte | grep workload-api
kubectl get endpoints -n airbyte | grep workload-api
Could you then share the output with me?
i
I downgraded and it was the only solution that worked for Airbyte running in VMs. I used the code below:
Copy code
abctl local uninstall --persisted
abctl local install --chart-version 1.7.0
a
That's probably the best decision. I've stitched the latest version somehow using the above approach, and likely tweaking ingress a bit (don't remember each step now), but it's better to wait for a stable release if you can afford the wait
❤️ 1
i
@Albinas Plėšnys Have you used Airbyte on VMs? Could you tell me if a VM with more cores makes syncs faster?
a
I do. I also typically run them on GCP. I tend to use N2D, for heavier cases 8vcpu 64gb works smooth. Not noticeably faster per se, I'd say, but you get more parallel workers = more syncs at once (or more schemas at once, if a connector uses multiple schemas). So unless you want to play with schedule to put all your connectors in a nice queue, or use outside orchestrator for runnings syncs 1 by 1, more vcpus will meaningfully increase speed, yes.
❤️ 1
i
I built an architecture that turns on and off the virtual machine that contains Airbyte, since I need synchronizations that occur only once a day, follow the design:
Do you think this is a good solution for my case?
a
Probably yes, without putting more effort into understanding the usecase can't tell for sure, but looks good, especially if it does the trick for you. The only simplification option, which I might've used instead of a more complicated pubsub pipeline would be vm self shutdown after airbyte sync is over, using smth like
sudo shutdown -h now
(I believe CE interprets is as a graceful vm stop command), but if you've already configured pubsub for that, it might give you more info (depending on what you've set up and what metadata you need, collect etc) Maybe a dumb question, but have you compared the pricing on running it on native kubernetes, scaling it close-to-0 down when not needed? Probably would be a bit pricier, but idk, would handle a potential scale up in heavier runs as well...
❤️ 1
but yeah, i think looks solid, good work!
❤️ 1
i
The problem with Kubernetes in my case is the issue of deploying and maintaining the solution. I'm still a beginner with k8s, so it would be something that would be beyond my control.
By the way, do you have a Kubernetes implementation guide? I'll start looking into that implementation.
r
hrm, can't even try to do those steps above 😕
Copy code
kubectl get namespaces
E0829 08:03:27.630321   28295 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0829 08:03:27.631938   28295 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0829 08:03:27.633446   28295 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0829 08:03:27.635008   28295 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0829 08:03:27.636477   28295 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Copy code
# Check if kubectl is installed
which kubectl || (curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x kubectl && sudo mv kubectl /usr/local/bin/)
might have been unhealthy
no, seems to have been
export KUBECONFIG=/root/.airbyte/abctl/abctl.kubeconfig
Managed it like this
docker ps
Find your container id
docker exec -it <containerID> bash
Copy code
# Check current 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
y
yes it's the same for EKS on Helm, to hardcode this in the values.yaml. That worked for me. Fix is from @Albinas Plėšnys
s
I have the same issue with 1.8.1, did someone achieved to make it work? I faced the same Unauthorized issue but only on airbyte-workload-launcher ERROR i.a.w.l.StartupApplicationEventListener(onApplicationEvent$lambda$1):43 - Failed to retrieve and resume claimed workloads, exiting. io.airbyte.api.client.ApiException: Unauthorized I already tried to define both WORKLOAD_API_BEARER_TOKEN & INTERNAL_API_AUTH_TOKEN but without success. Both worker & workload-api are running correctly.
b
Hello everyone, sorry for not responding sooner. It appears that there is an issue with our Helm Chart and the 1.8.x releases. You will need to set the API_AUTHORIZATION_ENABLED=true for the workload-api-server to get past this issue. My team is working to get a new chart and release out ASAP to address this issue. Sorry for the problems
🙏 1
s
Will try it now and keep you updated if it helped! Thanks for the reply
👍 1
On my deployment: - name: API_AUTHORIZATION_ENABLED value: "true" Is already defined, so it's not only that
b
for a quick solution, you can look at the
airbyte-airbyte-env
configmap (this might be named slightly different depending on your deploy). Something like: kubectl get cm -n ab airbyte-airbyte-env -o yaml | grep API_AUTHORIZATION_ENABLED
Do you have the workload-api-server defined in your ingress?
r
I outlined what you need to do above
b
we no longer support shared secrets in the 1.8.x releases
👀 1
r
It still works, if you want a working install. Not saying it should be the upstream fix
s
I used to install: • COOKIE_SECURE=false abctl local install --chart-version 1.8.1 --insecure-cookies --no-browser -v To fix the 503, I needed to :
Copy code
kubectl edit ingress ingress-abctl -n airbyte-abctl
# As mentioned on https://github.com/airbytehq/airbyte/issues/65539
# Replace "name: airbyte-abctl-airbyte-webapp-svc" with "name: airbyte-abctl-airbyte-server-svc"
On my deployment (airbyte-abctl-workload-api-server -n airbyte-abctl)
Copy code
- name: WORKLOAD_API_BEARER_TOKEN
          valueFrom:
            secretKeyRef:
              key: WORKLOAD_API_BEARER_TOKEN
              name: airbyte-abctl-airbyte-secrets

- name: API_AUTHORIZATION_ENABLED
          value: "true"
On my deployment (airbyte-abctl-workload-launcher -n airbyte-abctl)
Copy code
- name: INTERNAL_API_AUTH_TOKEN
          valueFrom:
            secretKeyRef:
              key: WORKLOAD_API_BEARER_TOKEN
              name: airbyte-abctl-airbyte-secrets
- name: WORKLOAD_API_BEARER_TOKEN
          valueFrom:
            secretKeyRef:
              key: WORKLOAD_API_BEARER_TOKEN
              name: airbyte-abctl-airbyte-secrets
On my Ingress (ingress-abctl -n airbyte-abctl):
Copy code
spec:
  ingressClassName: nginx
  rules:
  - http:
      paths:
      - backend:
          service:
            name: airbyte-abctl-airbyte-connector-builder-server-svc
            port:
              name: http
        path: /api/v1/connector_builder
        pathType: Prefix
      - backend:
          service:
            name: airbyte-abctl-airbyte-server-svc
            port:
              name: http
        path: /
        pathType: Prefix
@Bryce Groff what do you mean exactly by "we no longer support shared secrets in the 1.8.x releases" ? Like using a secret for WORKLOAD_API_BEARER_TOKEN wouldn't work/be supported ?
b
we have moved to an internal JWT signing system and service accounts for cross service communication
s
I see, and it would be the reason why "airbyte-workload-launcher" would return: ERROR i.a.w.l.StartupApplicationEventListener(onApplicationEvent$lambda$1):43 - Failed to retrieve and resume claimed workloads, exiting. io.airbyte.api.client.ApiException: Unauthorized I'm not talking about the "workload-api-server" neither the "worker" as they look like that they are running correctly.
y
My deployment via the Helm chart on EKS, this was already present in the configmap
API_AUTHORIZATION_ENABLED : true
Like others, I had to manually set the
WORKLOAD_API_BEARER_TOKEN
s
FYI; AirByte now works with "COOKIE_SECURE=false abctl local install --chart-version 1.8.2 --insecure-cookies --no-browser -v" Thanks for the new version as everything is now working as expected! But it abctl would fail and use (I guess a v2) if you don't specify the chart version.
y
This issue is still present though https://github.com/airbytehq/airbyte/issues/65070
👍 1
b
ok very sorry for things being broken for longer than it should have. A new chart has been published 2.0.12, which should now resolve this issue.
y
Thanks @Bryce Groff. I am now on v1.8.2, Helm v2.0.12 deployment on EKS. However, I still had to manually set the bearer_api_token, otherwise it does not work. Plus, the UI refresh bug and missing Client ID here is still present (not just me, but looks like even people deploying via abctl have this)
b
This should be resolved in the latest release