ArangoDB "not authorized to execute this request" (401) in CI
ArangoDB returns HTTP 401 with "not authorized to execute this request" when a request lacks valid credentials. In CI this usually means the driver did not send the root password set by ARANGO_ROOT_PASSWORD, or sent the wrong one.
What this error means
A request fails with "not authorized to execute this request" and HTTP status 401, even though the server is reachable on 8529.
arangodb
{"error":true,"errorMessage":"not authorized to execute this request",
"code":401,"errorNum":11}Common causes
The driver did not send the root password
The container set ARANGO_ROOT_PASSWORD, but the driver connected with no password or an empty one.
Mismatched credentials between container and client
The password the container was initialized with differs from what the driver uses.
How to fix it
Set the root password and pass it to the driver
- Define
ARANGO_ROOT_PASSWORDon the service container. - Pass the same password in the driver connection.
- Keep both in one CI secret.
.github/workflows/ci.yml
services:
arangodb:
image: arangodb:3.12
env:
ARANGO_ROOT_PASSWORD: password
ports: ['8529:8529']Authenticate the driver with matching credentials
Provide the root user and password the container expects.
node
const db = new Database({
url: "http://127.0.0.1:8529",
auth: { username: "root", password: "password" },
});How to prevent it
- Set
ARANGO_ROOT_PASSWORDand reuse it in the driver. - Store the root password in a CI secret.
- Do not rely on a blank root password.
Related guides
ArangoDB "connection refused" on port 8529 (service not ready) in CIFix ArangoDB "connection refused" on port 8529 in CI - the server is still starting up when the driver tries…
Couchbase "bucket ... not found" / does not exist in CIFix Couchbase "bucket not found" in CI - the SDK opened a bucket that was never created during cluster initia…
Neo4j "Neo.ClientError.Security.Unauthorized" authentication failure in CIFix Neo4j "Neo.ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure" i…