Skip to content

Latest commit

 

History

History
executable file
·
1124 lines (642 loc) · 71.6 KB

troubleshooting.md

File metadata and controls

executable file
·
1124 lines (642 loc) · 71.6 KB

Troubleshooting

Startup Errors

error: config file not found

Cause: The --config path doesn't exist or isn't readable.

Fix: Ensure the config file exists. Copy from the sample if needed:

cp extenddb.sample.toml extenddb.toml

error: configuration property "X" not found

Cause: Typo in extenddb.toml or an unrecognized config key.

Fix: Compare your config against extenddb.sample.toml. Config keys are case-sensitive.

error connecting to server: Connection refused

Cause: PostgreSQL is not running or not listening on the configured host/port.

Fix:

pg_ctl -D ~/pgdata status          # check if running
pg_ctl -D ~/pgdata -l ~/pgdata/server.log start  # start it

Failed to connect to postgres: Connection error: error with configuration: empty host

Cause: The connection string in extenddb.toml has an invalid format, typically from using a Unix socket path with --pg-host during extenddb init in version tagged 0.1.

Fix: Edit extenddb.toml and manually percent-encode the Unix socket path in the connection string:

# Before (invalid):
connection_string = "postgresql://extenddb:***@/var/run/postgresql:5432/extenddb_catalog"

# After (valid):
connection_string = "postgresql://extenddb:***@%2Fvar%2Frun%2Fpostgresql:5432/extenddb_catalog"

Also update the catalog database. For a catalog without a key ring (no [auth.encryption] key_file):

psql extenddb_catalog -c "UPDATE settings SET value='postgresql://extenddb:***@%2Fvar%2Frun%2Fpostgresql:5432/extenddb' WHERE key='data_database_connection_string';"

For a catalog with a key ring the row is encrypted under the data encryption key, so write it with extenddb encryption-key set-data-connection --config extenddb.toml --yes < conn.txt, where conn.txt holds the corrected string and was written under umask 077 (the admin guide's Encryption Key section). The command needs the KEK file and may run beside the server, which reads the row at its next start.

Prevention: This issue is fixed in versions after 0.1, which automatically encode Unix socket paths correctly.

password authentication failed for user "extenddb"

Cause: The PostgreSQL extenddb user doesn't exist or the password doesn't match.

Fix:

psql -U $(id -nu) -d postgres -c "CREATE USER extenddb WITH PASSWORD 'extenddb-local-dev';"
psql -U $(id -nu) -d postgres -c "CREATE DATABASE extenddb OWNER extenddb;"

See docs/local-postgres-setup.md for full setup instructions.

migration failed: ...

Cause: The PostgreSQL database exists but the migration SQL failed (permissions, schema conflicts, etc.).

Fix: Check the PostgreSQL logs (~/pgdata/server.log). Ensure the extenddb user has CREATE TABLE permissions on the extenddb database.

serve, migrate or verify exits 3, 4, 5 or 6 naming the catalog

Cause: The catalog's status, read from its migration ledgers, is not one this binary serves: exit 3 means migrations are pending, 4 that the catalog has a breaking migration this binary does not know, 5 that a person must act, and 6 that the migration lock or a running server outlasted --lock-timeout. The status table of the upgrade manual lists each status with its exit codes.

Fix: Run the command the message prints. For pending migrations that is extenddb migrate --config extenddb.toml --yes, after the backup the message names.

the catalog at <location> is not initialized; create it with 'extenddb init'

Cause: The database holds no catalog: no migration ledger and no catalog_version row. serve, migrate and verify exit 1 and change nothing.

Fix: Check that the config names the right database. For a new deployment, run extenddb init to create the catalog and data databases. See docs/getting-started.md.

Database '<name>' already exists. Run 'extenddb destroy --config <config>' first, then re-run 'extenddb init'.

Cause: extenddb init detected that the catalog or data database already exists in PostgreSQL. To prevent accidental data loss, extenddb init refuses to proceed when either database is present.

Fix: If you want to re-initialize from scratch, run extenddb destroy --config extenddb.toml first to drop both databases, then run extenddb init again. If you want to keep the existing data and just apply migrations, use extenddb migrate instead.

Failed to bind <addr>: Address already in use

Cause: Another process is already listening on the configured port (default 18443).

Fix: Check what's using the port and stop it, or use a different port:

ss -tlnp | grep :18443                    # find what's using the port
extenddb serve --port 19443 --config extenddb.toml  # use a different port

another extenddb process is already using <database> (lock held on <database>.lock)

Cause: A SQLite database file has one owner at a time. extenddb serve takes an exclusive lock on <database>.lock (next to the file SQLite opens, after resolving any sqlite: or file: form, relative path, or symlink) before it opens the database and holds it until it exits. init (through to the admin user being written), migrate --yes, and destroy take the same lock for as long as they run, because they rewrite or remove the file; migrate --yes waits for it for up to --lock-timeout seconds (60 by default) and then exits 6. The backend serializes writers inside one process and recovers interrupted work at startup, so a second server, or a migration or destroy under a running server, would corrupt the first one's work. Read-only commands (settings, manage, verify, status, and migrate without --yes) take no lock and run alongside a server.

Fix: Stop the other process (extenddb stop --config <config> for a server), or point this command at a different database (--sqlite-path at init time). The lock is released by the operating system when the holder exits, including after a crash, so a leftover <database>.lock file is harmless and needs no cleanup.

Scope: The lock is flock(2), taken on Linux and macOS. It is advisory, and on network filesystems (NFS, SMB) its behavior depends on the server and mount options; keep SQLite databases on local disk. On other platforms no lock is taken and the server logs a warning at startup. The directory holding the database must be writable so the lock file can be created; a database in a read-only directory now fails to start with cannot open lock file. The lock file is created mode 0600 like the database itself; a world-readable lock file would let any local user hold the lock and keep the server from starting.

Failed to load TLS certificates: <error>

Cause: TLS is enabled (the default) but the server could not load the certificate or private key files. Possible causes:

  • The certificate or key file does not exist at the configured path
  • The file exists but the extenddb process does not have read permission
  • The file is not valid PEM format (e.g., DER-encoded, corrupted, or contains extra data)
  • The path in extenddb.toml is wrong (note: ~ is expanded to $HOME)

The error intentionally does not name the specific file to avoid leaking filesystem path information to logs that may be aggregated.

Fix:

  1. Verify the files exist:
    ls -la ~/.extenddb/tls/cert.pem ~/.extenddb/tls/key.pem
  2. If missing, run extenddb init to generate a self-signed certificate, or provide your own CA-signed certificate.
  3. Check permissions — the extenddb process must be able to read both files:
    chmod 600 ~/.extenddb/tls/key.pem
    chmod 644 ~/.extenddb/tls/cert.pem
  4. Verify PEM format — the cert file should start with -----BEGIN CERTIFICATE----- and the key file with -----BEGIN PRIVATE KEY----- (or -----BEGIN EC PRIVATE KEY-----).

TLS private key readable by other users

WARNING: TLS private key (server.tls.key_path) had permissions <mode>, which let other users read it. …

Cause: extenddb serve, or extenddb init when it keeps an existing certificate, found the TLS private key readable by group or other users. An older init that stopped before it set the key's mode left it that way, as does a key copied in with the default umask. The warning names the setting rather than the file, as the TLS load error above does, and goes to stderr: the terminal that ran the command, or the log stream under --foreground.

What the server did depends on the rest of the message:

  • It is now 0600: group and other access were removed: the server could change the key's mode, because it owns the key or runs as root, and narrowed it. If another service read the key through its group, it can no longer read it. If server.tls.key_path is a symlink, the file it points to was changed.

  • Another user (uid <n>) owns it: the key is readable by every user, and the server cannot change it. What its owner should run depends on the key's group, which the message names:

    • this server reads it through its group: remove other access with chmod o-rwx <file>. The group's access stays, and the server reads the key through it.
    • this server is not in its group: the server reads the key through the access every user has, so chmod o-rwx alone would leave it unable to load the key. Give the key to the server's group first, then remove other access: chgrp <server gid> <file>, then chmod 640 <file>.

    A key another user owns that only its owner and group can read is a supported layout and gets no warning.

  • it is on a read-only filesystem: set the mode where the file is provided. For a Kubernetes Secret volume, use defaultMode: 0440 with the pod's fsGroup set to the server's group (gid 10001 in the official image). Secret volume files are owned by root, so defaultMode: 0400 without a matching group would leave the key unreadable to a server that does not run as root.

  • was accepted but did not take effect: the filesystem keeps no file modes (vfat, some SMB and 9p mounts). Keep the key on a filesystem that does, or mount it with an owner-only mode.

  • setting it to 0600 failed: <error>: run chmod 600 on the file as its owner.

Rotate the key if it may have been copied. While its mode was wider, any local user could read the key. In the four cases where the server could not narrow it, the key stays readable until its mode is fixed, so fix the mode first: a key replaced before that lands at the same mode. Then, if a copy matters, replace the key and certificate by generating a new pair as in Generating a self-signed certificate manually, with the key at the mode above, and restart the server. Do not rely on extenddb init for this: on a deployment that already has a config file, init stops at the config check before it reaches the certificate step. Clients that pinned the old certificate through AWS_CA_BUNDLE need the new cert.pem.

Config file <path> has permissions <mode>, which is too open.

Cause: The config file has group or world-readable permissions. Since the config file may contain the encryption key for credential storage, it must be restricted to owner-only access.

Fix:

chmod 600 extenddb.toml

Import is disabled. Configure [import] paths in extenddb.toml to enable.

Cause: An ImportTable request was made, but no [import] paths are configured. Import is disabled by default for security.

Fix: Add an [import] section to extenddb.toml:

[import]
paths = ["/path/to/imports"]

Export is disabled. Configure [export] paths in extenddb.toml to enable.

Cause: An ExportTableToPointInTime request was made, but no [export] paths are configured. Export is disabled by default for security.

Fix: Add an [export] section to extenddb.toml:

[export]
paths = ["/path/to/exports"]

Path must resolve under one of the configured allowed paths

Cause: An import or export file path does not resolve under the calling account's subtree of a configured allowed directory. Files are namespaced per account, so the path must be under <root>/<account id>/, not directly under <root>. This error also covers symlink escapes and paths outside every configured root; the wording is deliberately identical in all three cases so it cannot be used to probe for another account's files.

Fix: Place the file under <root>/<account id>/, using the account id the request is authenticated as. The export directory is created for you on first use. Do not use symlinks that point outside the allowed directories.

Export file already exists; choose a different FilePath

Cause: Export refuses to overwrite. Something already exists at the requested FilePath, so the export stopped rather than truncating it. A symlink at that path produces the same error rather than being followed.

Fix: Export to a new filename, or remove the existing file first.

Failed to daemonize: <error>

Cause: extenddb runs as a daemon by default. This error means the process could not fork.

Fix: Check that the process has permission to fork. If another extenddb instance is running, stop it first:

extenddb stop --config extenddb.toml     # preferred
extenddb status --config extenddb.toml   # shows PID (if stop is unavailable)
kill <pid>                        # manual fallback

To view logs in real time (useful for debugging):

journalctl -t extenddb -f

Failed to initialize syslog — another syslog logger may already be active

Cause: extenddb logs to syslog. This error means another syslog connection is already active in the process.

Fix: Ensure no other library or init code opens syslog before extenddb starts.

Failed to connect for log-level polling: <error>

Cause: The background task that polls the log_level setting from the database could not connect. The server continues to run with the initial log level from the config file.

Fix: Verify the connection_string in extenddb.toml is correct and PostgreSQL is reachable. The log level can still be set via the config file; runtime changes via extenddb settings set log_level will not take effect until the server is restarted.

Invalid log_level '<value>' in settings: <error>

Cause: The log_level value in the settings table is not a valid tracing filter directive.

Fix: Run extenddb settings set log_level <level> with a valid level: trace, debug, info, warn, or error.

Log level changing to '<level>' (from settings table)

Cause: The background log-level poller detected a change in the log_level setting and is applying it. This is informational, logged at warn level to ensure visibility even when switching to a restrictive level.

Fix: No action needed. This confirms the runtime log level change took effect.

Encryption Key Errors

The server loads the key that opens stored secrets at startup from two catalog settings rows, encryption_key (the catalog key) and encryption_key_ring (the data encryption key, DEK, wrapped under the key-encryption key, KEK, in [auth.encryption] key_file), and refuses a catalog whose key state does not match its configuration. Each refusal below is one such state. The admin guide's Encryption Key section has the commands these fixes name; each previews by default and writes only with --yes. The message text of each refusal names the state and the command, and prints no key.

Encryption key not found in settings table. Run 'extenddb init'

Cause: key_file is not set and the catalog has neither an encryption_key row nor an encryption_key_ring row. The catalog was created without extenddb init, or the row was deleted.

Fix: For a new deployment, run extenddb init. For a catalog that had the row, restore a catalog copy that holds it: a new key opens none of the stored secrets.

Encryption key in settings table is not valid: <reason>. Restore the original key: every stored access key and session secret is encrypted under it

Cause: The encryption_key row is not 32 bytes in standard base64. The server, and each extenddb backup command, refuse it, because a server started on it would fail every signed request with HTTP 500.

Fix: Restore the original value of the row, from a catalog copy if needed.

key_file is not set and the catalog has a key ring marked as an unfinished switch

Cause: extenddb encryption-key switch --yes started on this catalog and stopped before it finished. The ring records the switch as unfinished and the id of the catalog key it started from.

Fix: If a switch of yours stopped, resume it with the same arguments, extenddb encryption-key switch --config extenddb.toml --key-file <path> --yes, with every server stopped; the run checks the ring, accepts only the catalog key whose id the ring recorded, finishes the pass, then set key_file and start the server. If no switch of yours stopped, do not resume: a writer to the catalog database put that ring row back from an older copy. Restore a catalog copy taken after your last encryption-key run finished and check it with encryption-key status (the Backup and Restore manual's Restore a damaged or missing key ring section).

key_file is not set and the catalog has a finished key ring

Cause: The deployment switched to a KEK file, and this configuration does not name it. The message prints the KEK id the ring names.

Fix: Set [auth.encryption] key_file (or EXTENDDB__AUTH__ENCRYPTION__KEY_FILE) to the file whose id the message prints, and start the server.

key_file is set and the file is missing, or fails the ownership, mode or ACL check

Cause: The message names the path and the check that failed. The server and every encryption-key command refuse a KEK file that is not a regular file owned by root or the server's user, that others can read, that gives its group access while root does not own it or while its group is not the server's effective group (or whose ACL grants another user or group), or whose parent directories a user other than root or the owner can write to without the sticky bit. A file that passes those checks and does not hold a key is refused as KEK file <path> is not a KEK file: <reason>; the reason names the length, or the offset of the character that does not decode, and leaves the character out.

Fix: Check that the path is right for this host (a credential directory such as /run/credentials/<unit>/ exists only while the unit runs, so run the commands through the same delivery route as the server) and that the owner, mode, ACL and parent directories meet the rule in the admin guide's The KEK file paragraph. On Kubernetes, fsGroup: 10001 and runAsGroup: 10001 give the file the server's group; on swarm and Podman, pass uid=10001,gid=10001,mode=0400 with the secret. For the format refusal, restore the file from the copy kept away from the host; the file holds exactly 44 base64 characters and at most one trailing newline.

key_file is set and the catalog has the catalog key and no key ring

Cause: In the documented order, key_file is set only after switch --yes has finished, so this state means a deleted ring or a configuration set too early. The message names encryption-key status and the restore steps, and no write command.

Fix: If the switch has not run yet, unset key_file, run the switch with every server stopped, then set it. If the switch had run, the ring is gone: restore a catalog copy taken after the switch and check it with encryption-key status.

key_file is set and the catalog has neither key row

Cause: The catalog has no encryption_key row and no encryption_key_ring row. The ring was deleted, or the catalog was never initialized.

Fix: Restore a catalog copy that holds the ring and check it with encryption-key status. For a catalog that extenddb init never created, see the entry on an uninitialized catalog above.

The key ring names another KEK than the configured file

Cause: The message prints both KEK ids. After encryption-key rewrap --yes, the ring names the new file while key_file still names the old one; otherwise the configured file is not the KEK that this ring was written under, for example after a restore of a catalog copy wrapped under an older KEK. When key_file names the KEK that your last encryption-key run wrote the ring under and you restored no catalog copy since that run, a writer to the catalog database put this ring row back from an older copy.

Fix: After a rewrap, set key_file to the new file. For a ring row that a writer put back, restore a catalog copy taken after your last encryption-key run finished and check it with encryption-key status (the Backup and Restore manual's Restore a damaged or missing key ring section). Otherwise find the KEK whose id the ring names and point key_file at it; if that KEK is lost, encryption-key reset --key-file <new> --discard-secrets keeps every user, role, policy and table and deletes every access key and session (the Backup and Restore manual's lost KEK section).

A DEK of the key ring fails to unwrap under the configured KEK

Cause: The ring has damage or a changed field. The KEK authenticates every field of the ring, so a flipped flag, a changed id, an added or deleted DEK entry, or a wrapped DEK copied from another ring makes a DEK fail to unwrap. The message names encryption-key status and the restore steps, and no write command. status prints the ring's fields, marked as not authenticated, and which DEK ids fail.

Fix: Restore a catalog copy taken before the change and check it with encryption-key status. reset refuses this ring, because its KEK is not lost.

key_file is set and the key ring is marked as an unfinished switch

Cause: key_file was set while a stopped switch was unfinished, or a writer to the catalog database wrote the ring row of an unfinished switch back from a copy taken during the switch. The message names encryption-key status and the restore steps, and no write command.

Fix: If a switch of yours stopped, unset key_file for the run, resume the switch with encryption-key switch --key-file <path> --yes with every server stopped, then set key_file again. If no switch of yours stopped, restore a catalog copy taken after your last run finished and check it with encryption-key status; do not resume a switch you did not start, because the resumed run would re-encrypt rows the writer chose.

key_file is set and the catalog has both a key ring and a catalog key

Cause: A catalog key row appeared after the switch finished. Its writer is an older release started on this catalog, an older SQLite dev image (which writes a new encryption_key row into a switched catalog at startup), or a writer to the catalog database. The message names encryption-key status, which lists each stored secret under that key with its access key ID, owner and creation time, and no write command.

Fix: Run extenddb encryption-key status --config extenddb.toml and read the list. If the rows are yours (the older dev image case), run encryption-key switch --key-file <path> --accept-catalog-key --yes with a configuration that does not set key_file and every server stopped; it re-encrypts the listed secrets under the DEK and deletes the row. If they are not yours, --accept-catalog-key would make a credential the writer chose valid: restore a catalog copy taken before the row appeared instead.

The key ring holds two DEKs

Cause: extenddb encryption-key rotate --yes started on this catalog and stopped before it finished, so the ring holds the older DEK and the new one.

Fix: Stop every server, then run extenddb encryption-key rotate --config extenddb.toml to preview, which takes the migration lock and lists the stored secrets still under the older DEK, then rotate --yes, which resumes the pass with the higher id as its target and writes the ring with that DEK alone.

The key ring changed while rewrap or rotate ran

Cause: rewrap runs beside a server and outside the migration lock, so a rotate can write the ring between the read and the write of a rewrap, and a rewrap between the read and the first write of a rotate. Each of the two writes the ring only while the row still holds the ring it read. The message is "the key ring changed while extenddb encryption-key <command> ran, so nothing was written", and the run that printed it wrote nothing.

Fix: Run the command again. A rewrap beside a rotate that is still running then refuses with the two-DEK refusal above until the rotate finishes. A rotate after a rewrap refuses with both KEK ids: set key_file to the file that the rewrap named, then run rotate again.

The last ring write of rotate is conditional too, on the two-DEK ring of its first write. When another writer changed the ring after that write, rotate stops with "the key ring changed after extenddb encryption-key rotate wrote its two DEKs, so its last ring write did not happen" and names the DEK that the pass put the stored secrets under. Read the ring with encryption-key status before you run rotate again.

The rebuild of the database file failed after an encryption-key command

Cause: On SQLite, switch, rotate and reset end with a rebuild of the catalog file (VACUUM under secure_delete), so no free page keeps a ciphertext the run replaced. The rebuild writes a new copy of the file, so it needs free disk space for that copy, and it ends with a checkpoint of the write-ahead log, which fails while another process has a transaction open on the database. The message is "extenddb encryption-key <command> wrote every row, and then the rebuild of the database file that erases the ciphertexts it replaced failed", followed by the database error. Every row of the run is written.

Fix: Free disk space, or end every process that has the database file open (fuser or lsof on the file names them), then run the same command again with every server stopped. A switch or reset with nothing left to do rebuilds the file, and a rotate replaces the DEK again and then rebuilds the file.

The locked key store cannot be locked

Cause: The server keeps the key that opens stored secrets and the cached signing keys in memory it locks out of swap and core dumps, sized by [auth.cache] max_entries (two 32-byte slots per entry, 640,000 bytes for the default, plus one buffer per runtime worker thread). The process's memlock limit is below that size: 64 KiB is the kernel default before Linux 5.16, and mlock of 1 MiB fails with ENOMEM under it. With key_file set the server refuses to start and names the memlock limit it needs; without key_file it logs a warning and starts with the keys in unlocked memory.

Fix: Raise the limit: LimitMEMLOCK=16M in the systemd unit, --ulimit memlock= for a container, or a smaller max_entries. To start anyway with key_file set, [auth.encryption] require_locked_memory = false turns the refusal into a warning. The startup log line names the protection in force: memfd_secret, locked pages, or none. serve sets the key store up before it reads the catalog, so a refusal from the catalog (one of the entries above) can follow at the next start once the limit is raised.

A request fails with InternalServerError (HTTP 500) after a key change

Cause: The stored secret of that access key opens under no key the server holds. encryption-key status lists such secrets by access key ID. A switch --yes or rotate --yes run with --keep-unopenable leaves them as they are; without the option the run stops before its first write and prints their access key IDs.

Fix: Delete the access key and create a new one, or import the pair the client holds under its old ID with import-access-key (the Backup and Restore manual's lost catalog section, step 2).

Stop Errors

No PID file found at ... Is extenddb running on port ...?

Cause: extenddb stop could not find the PID file for the specified port. Either extenddb is not running, or it was started with a different config/port.

Fix: Check that extenddb is running with extenddb status. If using a non-default port or config, pass the same --config or --port to extenddb stop.

Failed to read PID file <path>: <error>

Cause: The PID file exists but cannot be read (permission denied, I/O error).

Fix: Check file permissions on the PID file. The extenddb process must have read access.

Invalid PID in <path>: '<value>'

Cause: The PID file contains a value that is not a valid integer. The file may be corrupted.

Fix: Delete the PID file manually and use extenddb status or ps to find the extenddb process. Stop it with kill <pid>.

Failed to send SIGTERM to pid <pid>: <error>

Cause: extenddb stop found a valid PID but could not send SIGTERM. Common causes: permission denied (the extenddb process is owned by a different user) or the process exited between the liveness check and the signal send.

Fix: If permission denied, run extenddb stop as the same user that started extenddb. If the process already exited, the stale PID file will be cleaned up on the next extenddb stop invocation.

extenddb (pid <pid>) did not exit within 76s after SIGTERM

Cause: The server received SIGTERM but did not shut down within the 76-second timeout, the sum of its shutdown bounds (5 s to drain connections, 30 s for running backup jobs to end, 36 s to stop its background workers and give up its serving registration, 5 s for its runtime). It may be stuck draining long-running requests or waiting on a database operation.

Fix: Send SIGKILL to force termination: kill -9 <pid>. Check PostgreSQL for long-running queries that may be blocking shutdown.

Runtime Errors

ResourceNotFoundException: Requested resource not found: Table: <name> not found

Cause: The table doesn't exist. It may have been deleted, or the table name is misspelled.

Fix: Run ListTables to see existing tables. Table names are case-sensitive.

ResourceInUseException: Table already exists: <name>

Cause: A CreateTable call for a table that already exists.

Fix: Use DescribeTable to check if the table exists before creating.

ValidationException on CreateTable

Cause: The request doesn't meet DynamoDB's validation rules. Common issues:

  • Table name too short (< 3 chars) or too long (> 255 chars)
  • Table name contains invalid characters (only a-zA-Z0-9_.- allowed)
  • Key schema missing HASH key or has wrong ordering
  • Attribute definitions don't cover all key attributes
  • Unused attribute definitions (defined but not used in any key schema)

Fix: Check the error message — it describes the specific validation failure. Compare against the DynamoDB CreateTable API reference.

Empty response body or connection reset

Cause: Internal serialization failure. The server returns a 500 with {"__type":"...#InternalServerError","message":"Internal error"}.

Fix: Check the server logs for the underlying error. If reproducible, file a bug.

Authentication Errors

These errors occur when auth.provider = "builtin" is enabled.

MissingAuthenticationToken: Request must contain a valid authentication token

Cause: The request has no Authorization header. This happens when an SDK is configured without credentials, or when making raw HTTP requests without SigV4 signing.

Fix: Configure your SDK with valid access key credentials. If using the AWS CLI, set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables or configure a profile.

UnrecognizedClientException: The security token included in the request is invalid

Cause: The access key ID in the request does not exist in extenddb's credential store. Either the key was never created, was deleted, or is misspelled.

Fix: Verify the access key ID with extenddb manage list-access-keys. Create a new access key if needed.

InvalidSignatureException: The request signature we calculated does not match the signature you provided

Cause: The secret key used to sign the request does not match the secret key stored in extenddb. This can happen if the secret key was copied incorrectly (even a single character difference causes a completely different signature).

Fix: Verify you are using the exact secret key returned when the access key was created. Secret keys cannot be retrieved after creation — if lost, delete the access key and create a new one.

AccessDeniedException: User: <ARN> is not authorized to perform: <action>

Cause: The authenticated user does not have an IAM policy granting the requested DynamoDB action. This can be an implicit deny (no matching Allow statement) or an explicit Deny.

Fix: Attach a policy granting the required action to the user, or to a group the user belongs to. Use extenddb manage list-user-policies to check current policies. Remember that explicit Deny always overrides Allow.

A Deny on dynamodb:Attributes (or dynamodb:LeadingKeys) does not deny the request

Cause: dynamodb:Attributes and dynamodb:LeadingKeys are multivalued (multi-valued) condition keys. In IAM, a bare condition operator (one without a ForAnyValue: or ForAllValues: qualifier) applied to a multivalued key never matches — regardless of the operator or how many values the request carries. This mirrors real AWS behavior exactly (verified against the IAM Policy Simulator and live DynamoDB). A policy like the following is therefore a no-op and grants no protection:

{
  "Effect": "Deny",
  "Action": "dynamodb:GetItem",
  "Resource": "*",
  "Condition": { "StringEquals": { "dynamodb:Attributes": ["ssn"] } }
}

Fix: Use a set qualifier. To deny a request that touches any of a set of attributes, use ForAnyValue::

{
  "Effect": "Deny",
  "Action": "dynamodb:GetItem",
  "Resource": "*",
  "Condition": { "ForAnyValue:StringEquals": { "dynamodb:Attributes": ["ssn"] } }
}

To allowlist attributes (allow only when every requested attribute is in the set), use ForAllValues: on an Allow statement. The same rule applies to dynamodb:LeadingKeys.

dynamodb:Attributes holds the top-level names of the attributes the request names: the attributes of a PutItem item and of the items and keys in a BatchWriteItem request, the target of each UpdateExpression action, AttributesToGet, the first name of each projected document path (secret for secret.a), the attributes a ConditionExpression or FilterExpression reads, the legacy Expected, AttributeUpdates, QueryFilter and ScanFilter names, the attributes in a Query key condition, and on every item operation other than SearchVectors the key attributes of the table (and of the index a Query names). The first page of a Scan of an index holds the table's key attributes and not the index's (measured on DynamoDB 2026-11-09), and a later page also holds the index's key attributes, which its ExclusiveStartKey carries (measured 2026-11-10). The attributes a SET value reads are not in it. Batch requests are evaluated per table and transactions per item. The security model manual lists what the key holds for each operation, and how a PartiQL statement is authorized. It follows that:

  • A Deny on ForAnyValue:StringEquals over ssn does not block a DeleteItem of an item that holds ssn, or a read with no projection, which returns ssn with the rest of the item: neither request names ssn. DynamoDB answers the same way (measured 2026-10-31).
  • The same Deny does not block an UpdateItem that reads ssn only in a SET value. SET #n = ssn copies the value of ssn into name, and a projection of name then returns it. DynamoDB answers the same way (measured 2026-11-01).
  • An Allow on ForAllValues:StringEquals that does not list the table's key attributes grants no GetItem, PutItem, UpdateItem, DeleteItem, Query, Scan, batch or transaction request, because each of them holds the key attributes (measured on DynamoDB 2026-11-01 for GetItem, Query, Scan, UpdateItem, DeleteItem and a BatchWriteItem DeleteRequest). List the key attributes of the table and, for a Query of an index or a later page of a Scan of an index, of every index the statement covers. A Query of an index holds the index's full key schema (measured on DynamoDB 2026-11-09 on a global secondary index). The first page of a Scan of an index holds the table's key attributes and not the index's (measured the same day). A later page holds the index's key attributes from its ExclusiveStartKey. On DynamoDB an Allow that lists only the table's keys refused a later page of a Scan of a global and of a local secondary index (measured 2026-11-10).

Note: prior to v0.1.6, extenddb incorrectly treated a bare operator on these keys as an implicit AND across the requested values, so a single-attribute request appeared to be denied while a multi-attribute request leaked. That behavior diverged from AWS and gave a false sense of security. See the upgrade manual for migration guidance.

Connection Issues

AWS CLI returns Could not connect to the endpoint URL

Cause: extenddb is not running, or the endpoint URL is wrong.

Fix:

curl --cacert ~/.extenddb/tls/cert.pem https://127.0.0.1:18443/health
# Should return: {"status":"healthy"}

If the health check fails, start extenddb. If it succeeds, check your --endpoint-url matches the server's bind address and port.

SDK timeout errors

Cause: extenddb is running but slow to respond (e.g., PostgreSQL connection pool exhausted).

Fix: Check extenddb.toml [storage.postgres] pool_size — increase if under heavy concurrent load. Check PostgreSQL logs for slow queries.

Table stuck in CREATING or DELETING state

Cause: The background transition poller processes status changes when notified by CreateTable/DeleteTable, or on a 60-second defensive sweep. If the server was stopped while a table was in a transitional state, the transition completes on the next server startup.

A second cause, on PostgreSQL only, is a session holding any lock on one of the table's relations (the base data table, a GSI or LSI data table, or a vector-index data table): a reader (a table snapshot, an in-catalog backup, a Scan or Query, pg_dump, any client transaction that read the table), an open write transaction, an index build, or VACUUM. DeleteTable then returns DELETING instead of dropping the tables in the request: at once for a reader, and after about a second for any other holder, which is how long its drops wait before they give up. The poller then checks the table for holders about once a second without waiting on them, and drops it at the first check that finds none, so the table disappears within about a second of the last holder's release however many tables are waiting this way, also when the server was restarted in between. A table snapshot or an in-catalog backup that ends also wakes the poller, which then checks at once. Until then a CreateTable of the same name is refused with ResourceInUseException, and a DeleteTable of the table returns its description with TableStatus: DELETING. A table that stays DELETING for longer has a long-running holder. To find it, list the table's relations on the catalog database:

SELECT '_ddb_' || t.table_id FROM tables t
 WHERE t.account_id = '<account_id>' AND t.table_name = '<table_name>'
UNION ALL
SELECT '_ddb_' || i.index_id FROM indexes i JOIN tables t ON t.table_id = i.table_id
 WHERE t.account_id = '<account_id>' AND t.table_name = '<table_name>'
UNION ALL
SELECT '_ddb_vec_' || v.index_id FROM vector_indexes v JOIN tables t ON t.table_id = v.table_id
 WHERE t.account_id = '<account_id>' AND t.table_name = '<table_name>';

and the sessions holding a lock on any of them, on the data database (the same database when no separate data database is configured), with the names from the first query:

SELECT l.pid, l.mode, a.query_start, l.relation::regclass AS relation, a.query
  FROM pg_locks l JOIN pg_stat_activity a ON a.pid = l.pid
 WHERE l.locktype = 'relation' AND l.granted
   AND l.database = (SELECT oid FROM pg_database WHERE datname = current_database())
   AND l.relation IN (SELECT to_regclass(quote_ident(n))
                        FROM unnest(ARRAY['_ddb_<table_id>', '_ddb_<index_id>']) AS n);

Fix: If a table appears stuck:

  1. Check that extenddb is running (extenddb status).
  2. Wait for the configured control_plane_delay_seconds (default: 0.25) — the poller is woken immediately when a table enters a transitional state.
  3. On PostgreSQL, look for a session holding a lock on the table (above); the delete finishes within about a second of its end.
  4. If the server was restarted, transitions are recovered automatically at startup.

Data tables without a catalog row (PostgreSQL, separate data database)

Cause: A table's data relations (_ddb_%) are on the data database with no tables row naming them. Current releases do not create this state from an interrupted DeleteTable: with a separate data database a synchronous DeleteTable marks the catalog row DELETING, commits it, drops the table's data tables on the data database, and removes the row only after that drop has committed. If the data commit fails (the connection is terminated, a failover, a network fault), the server redoes the drop on a fresh connection for up to 60 seconds. A process that dies, or a data database unreachable for that whole window, between the catalog commit and the last retry leaves the row DELETING with its transition due; the control-plane poller (the next startup pass, or a later one) drops the data tables and removes the row once the data database is reachable again, so the relations are not left without a row. When the retries are exhausted the server logs, at error, the table id, the relation names, and the exact DROP TABLE to run, for an operator who would rather finish the drop by hand than wait for the poller. (On one shared database the row and the drops commit together, so none of this applies.) Relations a release from before this behaviour shipped left without a row are not swept automatically; find and drop them as below.

To find such relations, compare the _ddb_% tables on the data database with the table ids the catalog still knows. On the catalog database:

SELECT table_id FROM tables
UNION ALL SELECT index_id FROM indexes
UNION ALL SELECT index_id FROM vector_indexes;

On the data database, every data relation and whether the catalog still names it (replace the VALUES list with the ids from the first query):

SELECT d.tablename
  FROM pg_tables d
  LEFT JOIN (VALUES ('<table_id>'), ('<index_id>'), ('<vector_index_id>')) AS live(id)
    ON d.tablename = '_ddb_' || live.id
    OR d.tablename = '_ddb_vec_' || live.id
 WHERE d.tablename LIKE '\_ddb\_%' AND live.id IS NULL;

Each row is a data relation with no catalog row. After confirming the table is gone from the catalog (DescribeTable returns ResourceNotFoundException), drop the listed relations on the data database:

DROP TABLE IF EXISTS "_ddb_<table_id>", "_ddb_<index_id>", "_ddb_vec_<vector_index_id>";

The error log line names the exact relations for one leaked table and gives this DROP TABLE verbatim.

Do not use extenddb catalog-check --fix to clean these up: it expects a different relation-naming scheme and, against the current schema, reports every live data table as orphaned and would drop tables still in use.

CreateTable returns CREATING instead of ACTIVE

Cause: extenddb emulates real DynamoDB's async control plane behavior. Tables start in CREATING state and transition to ACTIVE after a configurable delay (control_plane_delay_seconds, default: 0.25 seconds).

Fix: This is expected behavior matching real DynamoDB. Poll with DescribeTable until TableStatus is ACTIVE before performing operations on the table. All test code should use a wait_for_active() helper after CreateTable.

Failed to recover control plane transitions

Cause: At startup, extenddb attempts to complete any in-flight control plane transitions (CREATING→ACTIVE, DELETING→removed) left over from a previous server instance. This error means the recovery query failed, likely due to a database connectivity issue.

Fix: Check PostgreSQL connectivity and that the catalog database is accessible. Tables may be stuck in CREATING or DELETING state until the issue is resolved. Once the database is reachable, restart extenddb to retry recovery.

Control plane transition poll failed

Cause: The background poller that processes CREATING→ACTIVE and DELETING→removed transitions encountered a database error. Tables in transitional states will remain stuck until the poller succeeds.

Fix: Check PostgreSQL connectivity. The poller retries on the next wake (triggered by new CreateTable/DeleteTable requests or the 60-second defensive sweep). If the database is healthy and the error persists, check PostgreSQL logs for details.

Management API

Management API: DB error during auth: <error>

Cause: The management API could not query the admin_users table to verify credentials. The database may be unreachable or the catalog schema may be corrupted.

Fix: Check PostgreSQL connectivity and that the admin_users table exists in the catalog database. Run extenddb verify --config extenddb.toml to check catalog health.

Management API: bcrypt hash failed: <error>

Cause: The bcrypt library failed to hash a password during admin creation or password change. This is extremely rare and usually indicates a system-level issue (e.g., out of memory).

Fix: Retry the operation. If the error persists, check system resources.

Management API: create admin failed: <error>

Cause: The INSERT INTO admin_users query failed for a reason other than a unique constraint violation (which returns 409 Conflict). Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list admins failed: <error>

Cause: The SELECT FROM admin_users query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete admin failed: <error>

Cause: The DELETE FROM admin_users query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: change password failed: <error>

Cause: The UPDATE admin_users query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: create account failed: <error>

Cause: The INSERT INTO accounts query failed for a reason other than a unique constraint violation (which returns 409 Conflict). Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list accounts failed: <error>

Cause: The SELECT FROM accounts query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: check tables failed: <error>

Cause: During account deletion, the query to check whether the account owns tables failed. The delete was not attempted.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete account failed: <error>

Cause: The DELETE FROM accounts query failed. Likely a database connectivity issue or an unexpected FK constraint violation.

Fix: Check PostgreSQL connectivity and logs. If the error mentions a foreign key violation, ensure all IAM entities for the account have been cleaned up (this should happen automatically via CASCADE).

Management API: begin transaction failed: <error>

Cause: The management API could not start a database transaction. Likely a database connectivity or pool exhaustion issue.

Fix: Check PostgreSQL connectivity. If the management pool (2 connections) is exhausted, wait and retry.

Management API: commit delete account failed: <error>

Cause: The account deletion succeeded but the transaction commit failed. The deletion was rolled back. Likely a database connectivity issue.

Fix: Retry the operation. Check PostgreSQL connectivity and logs.

Management API: DB error during IAM user auth: <error>

Cause: The management API could not query the iam_users table to verify IAM user credentials. The database may be unreachable or the catalog schema may be corrupted.

Fix: Check PostgreSQL connectivity and that the iam_users table exists in the catalog database. Run extenddb verify --config extenddb.toml to check catalog health.

Management API: create IAM user failed: <error>

Cause: The INSERT INTO iam_users query failed for a reason other than a unique constraint or FK violation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: seed self-service policy failed: <error>

Cause: After creating an IAM user, the default self-service policy could not be inserted. The user was created successfully but may lack the default policy.

Fix: Manually attach a self-service policy using extenddb manage put-user-policy. Check PostgreSQL connectivity.

Management API: list IAM users failed: <error>

Cause: The SELECT FROM iam_users query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete IAM user failed: <error>

Cause: The DELETE FROM iam_users query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: tag IAM user failed: <error>

Cause: The INSERT INTO iam_user_tags query failed for a reason other than a FK violation. Likely a database connectivity issue. The tag transaction is rolled back — no partial tags are applied.

Fix: Check PostgreSQL connectivity and logs.

Management API: commit tag transaction failed: <error>

Cause: All tag upserts succeeded but the transaction commit failed. Tags were rolled back. Likely a database connectivity issue.

Fix: Retry the operation. Check PostgreSQL connectivity and logs.

Management API: untag IAM user failed: <error>

Cause: The DELETE FROM iam_user_tags query failed. The untag transaction is rolled back — no partial deletes are applied. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: commit untag transaction failed: <error>

Cause: All tag deletions succeeded but the transaction commit failed. Deletions were rolled back. Likely a database connectivity issue.

Fix: Retry the operation. Check PostgreSQL connectivity and logs.

Management API: list IAM user tags failed: <error>

Cause: The SELECT FROM iam_user_tags query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: encryption key not found in settings

Cause: The AES-256-GCM encryption key is missing from the settings table. This key is generated during extenddb init and is required for encrypting access key secrets.

Fix: Run extenddb init to regenerate the encryption key. If the settings table exists but the key is missing, the catalog may be corrupted.

Management API: fetch encryption key failed: <error>

Cause: The query to retrieve the encryption key from the settings table failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: encrypt secret key failed: <error>

Cause: AES-256-GCM encryption of the access key secret failed. This is extremely rare and usually indicates a corrupted encryption key or a system-level issue.

Fix: Verify the encryption key in the settings table is a valid base64-encoded 32-byte key. If corrupted, re-run extenddb init (this will generate a new key, invalidating existing access keys).

Management API: create access key failed: <error>

Cause: The INSERT INTO access_keys query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list access keys failed: <error>

Cause: The SELECT FROM access_keys query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete access key failed: <error>

Cause: The DELETE FROM access_keys query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: change IAM user password failed: <error>

Cause: The UPDATE iam_users query to change the password failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Credential import is disabled (allow_credential_import = false)

Cause: The server refused an access key import (extenddb manage import-access-key, or POST /management/accounts/{id}/users/{name}/access-keys/import) with HTTP 403 because the allow_credential_import runtime setting is not true. The message is the same when the catalog has no row for the setting. From v0.1.15 the server refuses the import when the row is missing. A deployment that imported keys before the upgrade without setting it gets this error after the upgrade.

Fix: Enable import, then retry. The next import reads the new value, so you do not need to restart the server:

extenddb settings --config extenddb.toml set allow_credential_import true

Keys imported earlier keep working while import is disabled.

Management API: check allow_credential_import failed: <error>

Cause: The query to check the allow_credential_import runtime setting failed during an access key import. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs. Retry the import operation.

Management API: encrypt imported secret failed: <error>

Cause: AES-256-GCM encryption of the imported access key secret failed. This is extremely rare and usually indicates a corrupted encryption key or a system-level issue.

Fix: Verify the encryption key in the settings table is a valid base64-encoded 32-byte key. If corrupted, re-run extenddb init (this will generate a new key, invalidating existing access keys).

Management API: import access key failed: <error>

Cause: The INSERT INTO access_keys query failed during an access key import for a reason other than a FK or unique constraint violation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: create IAM group failed: <error>

Cause: The INSERT INTO iam_groups query failed for a reason other than a unique constraint or FK violation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list IAM groups failed: <error>

Cause: The SELECT FROM iam_groups query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete IAM group failed: <error>

Cause: The DELETE FROM iam_groups query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: add group member failed: <error>

Cause: The INSERT INTO iam_group_members query failed for a reason other than a unique constraint or FK violation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: remove group member failed: <error>

Cause: The DELETE FROM iam_group_members query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: put user policy failed: <error>

Cause: The INSERT INTO iam_policies query failed for a user policy for a reason other than a FK violation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: put group policy failed: <error>

Cause: The INSERT INTO iam_policies query failed for a group policy for a reason other than a FK violation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list user policies failed: <error>

Cause: The SELECT FROM iam_policies query failed for user policies. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list group policies failed: <error>

Cause: The SELECT FROM iam_policies query failed for group policies. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete user policy failed: <error>

Cause: The DELETE FROM iam_policies query failed for a user policy. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete group policy failed: <error>

Cause: The DELETE FROM iam_policies query failed for a group policy. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

IAM Role Management

Management API: create IAM role failed: <error>

Cause: The INSERT INTO iam_roles query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list IAM roles failed: <error>

Cause: The SELECT query for listing IAM roles failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete IAM role failed: <error>

Cause: The DELETE FROM iam_roles query failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: tag IAM role failed: <error>

Cause: The INSERT INTO iam_role_tags query failed during a tag operation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: untag IAM role failed: <error>

Cause: The DELETE FROM iam_role_tags query failed during an untag operation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list IAM role tags failed: <error>

Cause: The SELECT query for listing IAM role tags failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: put role policy failed: <error>

Cause: The INSERT INTO iam_policies query failed for a role policy. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: list role policies failed: <error>

Cause: The SELECT query for listing role policies failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete role policy failed: <error>

Cause: The DELETE FROM iam_policies query failed for a role policy. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

AssumeRole

Management API: fetch role for assume-role failed: <error>

Cause: The SELECT query to load the role and its trust policy failed during an AssumeRole operation. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: encrypt session secret failed: <error>

Cause: AES-256-GCM encryption of the temporary session secret key failed. The server checks the encryption key at startup and encrypts with the copy it loaded then, so the key in the settings table is not the cause.

Fix: Open an issue with the error that follows the message in the server log.

Management API: store assume-role session failed: <error>

Cause: The INSERT INTO iam_sessions query failed when storing the temporary session. Likely a database connectivity issue or a unique constraint violation on the generated access key ID (extremely unlikely).

Fix: Check PostgreSQL connectivity and logs. Retry the assume-role operation.

Permissions Boundaries

Management API: set user permissions boundary failed: <error>

Cause: The INSERT INTO iam_permissions_boundaries query failed for a user boundary. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: get user permissions boundary failed: <error>

Cause: The SELECT query for a user permissions boundary failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete user permissions boundary failed: <error>

Cause: The DELETE FROM iam_permissions_boundaries query failed for a user boundary. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: set role permissions boundary failed: <error>

Cause: The INSERT INTO iam_permissions_boundaries query failed for a role boundary. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: get role permissions boundary failed: <error>

Cause: The SELECT query for a role permissions boundary failed. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

Management API: delete role permissions boundary failed: <error>

Cause: The DELETE FROM iam_permissions_boundaries query failed for a role boundary. Likely a database connectivity issue.

Fix: Check PostgreSQL connectivity and logs.

DynamoDB Streams

Stream capture: failed to assign shard for <table>: <error>

Cause: After a successful write (PutItem, DeleteItem, UpdateItem), extenddb tried to capture a stream record but could not determine which shard to assign it to. The data write succeeded — only the stream record is missing.

Fix: Check PostgreSQL connectivity. Verify the table's stream shards exist in the stream_shards table. If the table was created before streams were enabled, the shards may not have been initialized.

Stream cleanup worker: <error>

Cause: The background worker that deletes stream records older than 24 hours encountered a database error. Expired records will accumulate until the worker succeeds.

Fix: Check PostgreSQL connectivity. The worker retries every hour automatically.

Stream record numbering failed: <error>

Cause: The background worker that gives PostgreSQL stream records their sequence numbers encountered a database error. GetRecords numbers one batch of the records of the shard it reads before it reads them, so a consumer that keeps reading a shard still receives its records, unless the same error stops that numbering too (see the next entry). The records of shards that nobody reads stay in the stream_pending table, and the retention sweep does not trim them, until the worker succeeds.

Fix: Check PostgreSQL connectivity. After a failure the worker tries again a little over a second later.

Stream record numbering before a read of shard <shard> failed: <error>

Cause: GetRecords, or GetShardIterator with LATEST, could not number the shard's committed stream records before it read the shard, because of a database error. The call went on and answered from the records numbered before. The records left in stream_pending get higher sequence numbers from a later read or the background worker, and a later GetRecords call returns them.

Fix: Check PostgreSQL connectivity and the error in the message. While the error repeats on every read of the shard and in the worker, consumers of that shard receive no new records.

GetRecords is slow on PostgreSQL while a long transaction runs

Cause: Every stream record passes through the stream_pending table, and the numbering step deletes it there. A transaction that stays open on the data database, such as the one a backup of a large table reads from, keeps autovacuum from removing those deleted rows. Until it ends, each GetRecords on a busy shard and each numbering read past them.

Fix: Find the long transaction in pg_stat_activity (xact_start). Once it ends, autovacuum removes the rows; VACUUM stream_pending removes them at once.

Management Console Errors

Console login page shows "Invalid credentials"

Cause: The username or password entered on the /console/login page does not match any admin user or IAM user in the catalog database.

Fix: For admin users, enter the admin username and password printed during extenddb init. For IAM users, enter account_id/user_name as the username and the console password set when the user was created. IAM users without a console password cannot log in to the web console.

Console redirects to login page on every request

Cause: The session cookie has expired (sessions end 8 hours after login, however active they are, and the browser drops the cookie at the same time), the user's password was changed or the user was deleted after the session began, or cookies are blocked by the browser.

Fix: Log in again, with the new password if it was changed. Ensure cookies are enabled for the extenddb server address. If using a reverse proxy, ensure it forwards the Cookie and Set-Cookie headers.

Console pages return HTTP 503 "The catalog is unavailable"

Cause: The console checks every session against the catalog database, and that read failed. The session is kept.

Fix: Check that the catalog database is reachable from the server, then reload the page. After a PostgreSQL restart the first reloads can still answer 503: each pooled catalog connection that the restart closed fails once and is then replaced.

Console shows "Encryption key not found" when creating access keys

Cause: The encryption_key setting is missing from the settings table. This happens if extenddb init was not run or the settings table was manually modified.

Fix: Run extenddb init to bootstrap the encryption key and admin user.

Import/Export Errors

Source path does not exist: <path>

Cause: The FileSource.Path in an ImportTable request points to a file or directory that does not exist on the server's filesystem.

Fix: Verify the path is correct and accessible to the extenddb process. Paths are relative to the server's working directory.

Cannot open source file: <error>

Cause: The import source file exists but cannot be opened (permission denied, is a directory, etc.).

Fix: Check file permissions. The extenddb process must have read access to the file.

Invalid JSON at line N: <error>

Cause: A line in the DYNAMODB_JSON import file is not valid JSON.

Fix: Each line must be a valid JSON object. The format is one item per line: {"Item": {"pk": {"S": "val"}, ...}} or bare {"pk": {"S": "val"}, ...}.

Cannot write export file

Cause: The export destination path is not writable (permission denied, disk full, etc.).

Fix: Check that the extenddb process has write access to the destination directory. The server creates the account directory (<export root>/<account id>) at the account's first export; any other directory in FilePath must already exist, or the export fails with Parent directory does not exist or is not accessible.

Permission denied opening an export file or directory after upgrading to v0.1.15

Cause: From v0.1.15 the server creates export files with mode 0600, and the roots and account directories it creates with mode 0700, so only the server's user and root can read them. A member of the server user's group, or a host user reading through a bind mount while the container runs as another uid, is refused.

Fix: Read the file as the server's user or as root, copy it out of the container with docker cp <container>:<path> ., or run the container as the reader's uid (--user). The upgrade manual's v0.1.15 entry gives the details, and how to keep a group's access to import files.

Invalid table ARN: <arn>

Cause: The TableArn in an ExportTableToPointInTime request is not a valid DynamoDB table ARN.

Fix: Use the full ARN format: arn:aws:dynamodb:<region>:<account>:table/<name>. You can get the ARN from DescribeTable.

GSI Async Update Behavior

GSI query returns stale data after a write

Cause: GSI updates are applied asynchronously with a configurable propagation delay (default 10ms). This matches real DynamoDB's eventually consistent GSI behavior. Each GSI can have its own propagation_delay_ms setting; the system-wide default is controlled by the index_propagation_delay_ms runtime setting.

Fix: This is expected behavior. For tests that query GSIs after writes, poll/retry the GSI query until the expected data appears. To make all GSIs synchronous for testing, set extenddb settings set index_propagation_delay_ms 0. For production-like testing, keep the default async delay.

Connection Pool Exhaustion

HTTP 500 on all requests under heavy load

Cause: The PostgreSQL connection pool is exhausted. All connections are in use and new requests cannot acquire a connection within the timeout. extenddb currently returns HTTP 500 (Internal Server Error) instead of the more appropriate 503 (Service Unavailable).

Fix: Increase the pool size in extenddb.toml:

[storage.postgres]
pool_size = 50  # default is 20

If the problem persists, check for long-running queries or connection leaks with SELECT * FROM pg_stat_activity WHERE datname = 'extenddb'; (the data database's default name).

Known limitation: The HTTP status code should be 503 with a Retry-After header. This is tracked as technical debt.


Vector indexes are not supported by this storage backend

Error text:

Vector indexes are not supported by this storage backend

Also SearchVectors is not supported by this storage backend for a search request.

Cause: Vector indexes are stored in vector(N) columns, a type the pgvector extension provides, so support is a property of the PostgreSQL server rather than of the ExtendDB build. The server probes for the extension once at startup and refuses every vector operation for the rest of its life if it was absent. Other operations are unaffected.

Fix: Confirm what the running server decided, by looking for one of these lines in its startup log:

pgvector 0.8.0 detected on the data database; vector index storage available
pgvector not installed on the data database; vector indexes are not supported

If it is absent, install the extension for your server version (for example postgresql-16-pgvector), then create it on the data database, not the catalog:

CREATE EXTENSION vector;

extenddb init and extenddb migrate both attempt this and print a notice rather than failing when they cannot; a role without permission to create extensions needs a superuser or the database owner to run it once.

Then restart ExtendDB. The probe result is cached at startup, so a server that started without the extension keeps refusing vector operations until it is restarted, even after the extension exists.


License

Copyright 2026 ExtendDB contributors. Licensed under the Apache License, Version 2.0. See LICENSE for the full text.

This software is provided "as is" without warranty of any kind. ExtendDB is an open source project maintained by AWS. It is not Amazon DynamoDB or an AWS service. "DynamoDB" is a trademark of Amazon.com, Inc. or its affiliates.