<@U04S8PLJWMT>, When I trying to create source / d...
# replication-ask-ai
d
@kapa.ai, When I trying to create source / destination definition through Airbyte public API: https://<domain.com>/api/public/v1/workspaces/<workspace_id>/definitions/sources request is not fullfilled and Airbyte is becoming slow and often unavailable.
k
This is a known issue with the
/api/public/v1/workspaces/<workspace_id>/definitions/sources
endpoint in self-managed Airbyte deployments. Based on the knowledge sources, here's what's happening and what you can do: Root Cause When the public API endpoint is used to create a custom source definition, it spins up a connector pod to fetch the spec, but that pod fails to communicate back with the control-plane server — specifically failing to obtain an access token:
Copy code
Failed to obtain or add access token
java.net.ConnectException: Failed to connect to airbyte-server-svc/...:8001
This is an internal auth/token issue between worker pods and the control-plane. [GitHub Issue] Workarounds 1. Use the legacy internal API endpoint (works reliably) Instead of the public API, use the older
/api/v1/source_definitions/create_custom
endpoint:
Copy code
curl --request POST \
     --url http://<YOUR_HOST>/api/v1/source_definitions/create_custom \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
    "workspaceId": "<WORKSPACE_ID>",
    "sourceDefinition": {
        "name": "<NAME>",
        "documentationUrl": "",
        "dockerImageTag": "latest",
        "dockerRepository": "<DOCKER_REPOSITORY>"
    }
}'
This endpoint does not exhibit the same issue. [GitHub Issue] 2. Fix internal auth tokens (for the slowness/unavailability issue) If your instance is also becoming slow or unavailable, a mismatch in internal bearer tokens between services may be the cause. You can regenerate and align them:
Copy code
BEARER_TOKEN=$(openssl rand -hex 16)

kubectl -n <YOUR_NAMESPACE> set env deployment/airbyte-worker \
  WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN" \
  INTERNAL_API_AUTH_TOKEN="$BEARER_TOKEN"

kubectl -n <YOUR_NAMESPACE> set env deployment/airbyte-workload-api-server \
  WORKLOAD_API_BEARER_TOKEN="$BEARER_TOKEN"

kubectl -n <YOUR_NAMESPACE> rollout restart deployment airbyte-worker
kubectl -n <YOUR_NAMESPACE> rollout restart deployment airbyte-workload-api-server
[GitHub Issue] 3. Create via the UI As a last resort, the UI works correctly for creating custom source definitions. [GitHub Issue] Summary The public
/definitions/sources
POST endpoint has a confirmed bug in self-managed deployments related to internal token authentication. The legacy endpoint or UI are the recommended workarounds until this is resolved. 👍 0 button 👎 0 button â„šī¸ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.