5-11-05 12:38:08,217 [main] ERROR i.a.i.InputFe...
# ask-ai
t
2025-11-05 123808,217 [main] ERROR i.a.i.InputFetcher(failWorkloadAndExit):70 - Error encountered failing workload for id: e04b8584-16f9-448b-a3d1-85c3cba6e7c8_123_0_check. Ignoring... io.airbyte.workload.api.client.generated.infrastructure.ClientException: Client error : 401 Unauthorized {"message":"Unauthorized","logref":null,"path":null,"_links":{"self":{"href":"/api/v1/workload/failure","templated":false,"profile":null,"deprecation":null,"title":null,"hreflang":null,"type":null,"name":null}},"_embedded":{"errors":[{"message":"Unauthorized","logref":null,"path":null,"_links":{},"_embedded":{}}]}}
k
Based on the error log you've provided, you're encountering a 401 Unauthorized error when Airbyte is trying to fail a workload. This is an authentication issue between internal Airbyte components, specifically related to the Workload API. ## Root Cause The error indicates that the
WORKLOAD_API_BEARER_TOKEN
is not properly aligned between the Worker and the Workload API Server pods. This is a known issue with Airbyte deployments, particularly when using
abctl
. ## Solution According to [this GitHub issue comment](https://github.com/airbytehq/airbyte/issues/65567), you need to set the same authentication header and bearer token on all relevant deployments. Here's how to fix it: 1. Generate a token:
Copy code
bash    TOKEN=$(openssl rand -hex 24)
2. Set the token on all deployments:
Copy code
bash    kubectl -n airbyte-abctl set env deployment/airbyte-abctl-workload-api-server WORKLOAD_API_AUTH_HEADER=Authorization WORKLOAD_API_BEARER_TOKEN=$TOKEN    kubectl -n airbyte-abctl set env deployment/airbyte-abctl-worker WORKLOAD_API_AUTH_HEADER=Authorization WORKLOAD_API_BEARER_TOKEN=$TOKEN    kubectl -n airbyte-abctl set env deployment/airbyte-abctl-server WORKLOAD_API_AUTH_HEADER=Authorization WORKLOAD_API_BEARER_TOKEN=$TOKEN
3. Restart the deployments:
Copy code
bash    kubectl -n airbyte-abctl rollout restart deploy/airbyte-abctl-workload-api-server airbyte-abctl-worker airbyte-abctl-server
4. Wait for rollouts to complete:
Copy code
bash    kubectl -n airbyte-abctl rollout status deployment airbyte-abctl-worker    kubectl -n airbyte-abctl rollout status deployment airbyte-abctl-workload-api-server
This should resolve the 401 Unauthorized error by ensuring all components are using the same authentication token.
t
the value is currently @kapa.ai .Values.workload-api.bearerToken is that the default?
k
A message from kapa.ai
Based on the knowledge sources provided, I cannot find specific information about the default value of
.Values.workload-api.bearerToken
in Airbyte's Helm chart configuration. However, based on the GitHub issues I referenced in my previous answer, the problem you're experiencing is that the
WORKLOAD_API_BEARER_TOKEN
is not properly set or synchronized between components. The issues ([GitHub issue #65567](https://github.com/airbytehq/airbyte/issues/65567) and [GitHub issue #66692](https://github.com/airbytehq/airbyte/issues/66692)) indicate that this token needs to be manually generated and set, suggesting that the default configuration may not be working correctly in certain deployment scenarios. The solution involves generating a new token and explicitly setting it across all relevant deployments, as I outlined in my previous response. This suggests that relying on the default Helm value may not be sufficient to resolve the authentication issue you're experiencing. If you need more specific information about the default Helm values, I recommend checking your Airbyte Helm chart's
values.yaml
file or the official Airbyte Helm chart documentation, which are not included in the knowledge sources I have access to.
t
java.lang.IllegalArgumentException: Detected a Non-hex character at 5 or 6 position
java.lang.IllegalArgumentException: Detected a Non-hex character at 5 or 6 position @kapa.ai
k
A message from kapa.ai
Based on the error message you're encountering and the context of our previous conversation about the
WORKLOAD_API_BEARER_TOKEN
, this error suggests that the bearer token value contains non-hexadecimal characters. ## Root Cause The error
java.lang.IllegalArgumentException: Detected a Non-hex character at 5 or 6 position
indicates that the token being used is expected to be in hexadecimal format, but contains invalid characters. ## Solution When generating the bearer token, you need to ensure it's a valid hexadecimal string. Based on the solutions provided in the [GitHub issue #65567](https://github.com/airbytehq/airbyte/issues/65567) and [GitHub issue #66692](https://github.com/airbytehq/airbyte/issues/66692), the correct way to generate the token is:
Copy code
bash BEARER_TOKEN=$(openssl rand -hex 16)
or
Copy code
bash TOKEN=$(openssl rand -hex 24)
The
-hex
flag ensures that the output is in hexadecimal format, which is what Airbyte expects. If your current
.Values.workload-api.bearerToken
contains non-hexadecimal characters (such as special characters, spaces, or letters beyond a-f), this would cause the error you're seeing. Make sure to regenerate the token using the
openssl rand -hex
command and apply it to all relevant deployments as outlined in my previous response.
t
how do I view the value for .Values.workload-api.bearerToken in a deployment?
how do I view the value for .Values.workload-api.bearerToken in a deployment? @kapa.ai
k
A message from kapa.ai
Based on the context of our conversation about Kubernetes deployments and the
WORKLOAD_API_BEARER_TOKEN
, here's how you can view the current value: ## View the Bearer Token from the Deployment You can check the environment variable value in the deployment using kubectl:
Copy code
bash kubectl -n airbyte-abctl get deployment airbyte-abctl-workload-api-server -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name=="WORKLOAD_API_BEARER_TOKEN")].value}'
Or for the worker deployment:
Copy code
bash kubectl -n airbyte-abctl get deployment airbyte-abctl-worker -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name=="WORKLOAD_API_BEARER_TOKEN")].value}'
## View the Bearer Token from the Secret If the token is stored in a Kubernetes secret (which is common), you can view it with:
Copy code
bash kubectl -n airbyte-abctl get secret airbyte-airbyte-secrets -o jsonpath='{.data.WORKLOAD_API_BEARER_TOKEN}' | base64 -d
According to the [GitHub issue #48809](https://github.com/airbytehq/airbyte/issues/48809) and [GitHub issue #50979](https://github.com/airbytehq/airbyte/issues/50979), the
WORKLOAD_API_BEARER_TOKEN
is typically stored in the
airbyte-airbyte-secrets
secret and referenced by the deployments. ## View All Environment Variables To see all environment variables in a deployment:
Copy code
bash kubectl -n airbyte-abctl describe deployment airbyte-abctl-workload-api-server
This will show you all the environment variables, including whether
WORKLOAD_API_BEARER_TOKEN
is set directly or referenced from a secret.
t
my API are unable to get a dataplane token @kapa.ai
k
A message from kapa.ai
Based on the knowledge sources and the context of our conversation about authentication issues, the problem with your API being unable to get a dataplane token is likely related to the
dataplane-client-id
and
dataplane-client-secret
credentials. ## Common Causes According to the [GitHub issue #58587](https://github.com/airbytehq/airbyte/issues/58587), there are several known issues with dataplane credentials: 1. Missing credentials in secrets: The error
couldn't find key dataplane-client-id in Secret airbyte-abctl/airbyte-auth-secrets
is a common issue, particularly in versions 1.6.x through 1.8.x. 2. Credentials not being generated properly: The [GitHub issue #64159](https://github.com/airbytehq/airbyte/issues/64159) mentions that the bootloader was regenerating
dataplane-client-id
and
dataplane-client-secret
on every restart in version 1.7.2, which was fixed in version 1.8.0. 3. Token generation failures: According to [GitHub issue #65595](https://github.com/airbytehq/airbyte/issues/65595), users experienced "Invalid client id or token" errors when trying to generate tokens, with the issue reportedly fixed in version 1.8.3 and later. ## Solutions ### 1. Check if credentials exist in the database
Copy code
bash export KUBECONFIG="$HOME/.airbyte/abctl/abctl.kubeconfig" kubectl exec -it -n airbyte-abctl airbyte-db-0 -- /bin/bash psql -U airbyte db-airbyte SELECT * FROM dataplane_client_credentials; \q exit
### 2. Reset dataplane credentials (if needed) If the credentials are corrupted or missing, you can reset them:
Copy code
bash export KUBECONFIG="$HOME/.airbyte/abctl/abctl.kubeconfig" kubectl exec -it -n airbyte-abctl airbyte-db-0 -- /bin/bash psql -U airbyte db-airbyte delete from dataplane_client_credentials; delete from dataplane; \q exit
Then reinstall or restart Airbyte to regenerate the credentials. ### 3. Upgrade to a stable version According to the [GitHub issue #65595](https://github.com/airbytehq/airbyte/issues/65595), the issue was resolved in version 1.8.3, and a contributor confirmed that version 2.0.0 should have this issue fully resolved. ### 4. Verify the secret contains the credentials Check if the
airbyte-auth-secrets
secret contains the dataplane credentials:
Copy code
bash kubectl -n airbyte-abctl get secret airbyte-auth-secrets -o yaml
The knowledge sources indicate that for Self-Managed Enterprise deployments, you need to configure the
DATA_PLANE_CLIENT_ID
and
DATA_PLANE_CLIENT_SECRET
in your Kubernetes secrets, as shown in the [Enterprise Flex data plane configuration](https://docs.airbyte.com/platform/enterprise-flex/data-plane#step-3). If you're still experiencing issues after trying these solutions, please let me know which version of Airbyte you're running, as the fix may depend on your specific version.