Skip to content
Latchkey

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

  1. Define ARANGO_ROOT_PASSWORD on the service container.
  2. Pass the same password in the driver connection.
  3. 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_PASSWORD and reuse it in the driver.
  • Store the root password in a CI secret.
  • Do not rely on a blank root password.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →