Guide

Check health and read the logs

Read the server log, check that DroppedNeedle is up, and find out what a status warning or a refused start is telling you.

Admins only Checked against v3.1.0 Updated Edit this page Report a problem

Liner notes

At a glance

Who
Admins only
You need
Shell access to the host, for the log and the health check

DroppedNeedle writes its log to the container’s output only, with no log file. When something is wrong, the log usually says what and what to do about it, so start there.

Steps#

  1. Read the server log#

    bash
    docker compose logs droppedneedle

    droppedneedle is the service name in the compose file. Without Compose, docker logs droppedneedle shows the same log, as does the container’s log page on Unraid, Portainer or Synology. Lines that start with [init] come from the container’s start script, before the server itself runs.

  2. Turn up the detail, if you need it#

    Set LOG_LEVEL in the service’s environment to DEBUG, INFO (the default), WARNING or ERROR, and recreate the container with docker compose up -d. For one part of the server, RUST_LOG takes a full filter such as info,droppedneedle_library=debug, and wins over LOG_LEVEL. Set it back once you have what you need.

  3. Check the health endpoint#

    /health needs no sign-in. Open http://your-server:8688/health, or /music/health if you set BASE_PATH=/music.

    Result: it answers {"status":"ok","message":"DroppedNeedle backend running"}. On v2 data still waiting for its upgrade, the status is upgrade with the message DroppedNeedle is waiting for its upgrade from v2.

    The container’s own health check calls the same address inside the container every 30 seconds, and docker ps shows the result as healthy or unhealthy.

  4. Look at the service status#

    While an outside service is having trouble, every signed-in user sees an icon in the top bar labelled “Service status” with the number degraded. Press it for the list: each service, the part of it affected, its message, and “Using … instead. Auto-retrying.” when there is a fallback. It disappears again when the services recover. A toast such as “Trouble reaching MusicBrainz - auto-retrying.” says the same thing once every 10 minutes at most.

  5. Read the warning banner#

    When a page’s answer came back without one of its sources, a banner reads, for example, “Last.fm is unavailable, so some results may be missing”. Dismiss closes it, and it clears by itself 10 seconds after the last report. The page shows what it could get from the sources that answered.

  6. Open Diagnostics#

    Admins can go to Settings › Diagnostics: “Live numbers from the server. Counts reset when it restarts. Refreshes every five seconds while open.” It has tables for Outbound provider calls, Rate limits, Background jobs (with each job’s last heartbeat and last error), Last checkpoint and Job queues.

Check it worked#

  • /health answers with "status":"ok", and docker ps lists the container as healthy.
  • The top bar has no Service status icon.
  • Settings › Diagnostics shows no last error against a background job.

If something went wrong#

Each heading below is the message DroppedNeedle shows. When the server refuses to start, the message is the last thing in the log, and with restart: unless-stopped the container keeps trying again.

[init] FATAL: /app/config is not writable by uid=… gid=…

The same goes for /app/cache. The user in PUID and PGID can’t write the host folder. The log adds “Common causes: FUSE/shfs (Unraid), NFS root_squash, CIFS/SMB, dropped CAP_CHOWN.” Make the host folder writable by that user, or set PUID and PGID to the folder’s owner. /app/plugins and /app/imports only warn, and the server still starts.

[init] FATAL: PUID='…' is not a valid numeric UID.

PUID and PGID must be numbers, from id on the host. UMASK must be three or four octal digits, such as 027.

refusing database on non-local filesystem

The database needs a local disk, and /app/cache is on NFS, SMB/CIFS or a FUSE mount. On Unraid, use a pool or disk path such as /mnt/cache/appdata/droppedneedle/cache, or an exclusive share. On Docker Desktop, use a named volume. A database behind a symlink is refused the same way: refusing database behind a symlink. See Storage and permissions.

the key file … is missing, but the database … already holds this server's data

Or “the key file … does not belong to the database …“. Nothing was changed. Put back the data_enc.key saved with this database: Make and restore a backup.

… is held by another process (a running server or an offline import)

Only one server, or one offline import with droppedneedle-tool, can use a data folder at a time. Stop the other container or command that uses the same /app/cache.

CONFIG_FILE_PATH is no longer read: settings live in the database. Remove it

Remove CONFIG_FILE_PATH from the compose file. If it named a config.json outside the config folder, the message says where to move it first.

invalid LOG_LEVEL value

An environment variable has a value the server can’t use, and the message says what it expected, for example expected DEBUG, INFO, WARNING or ERROR. The same form covers invalid PORT value, invalid BIND_HOST value, invalid BASE_PATH value, invalid TRUSTED_PROXY_IPS and invalid CONTACT_EMAIL value. Fix the value and recreate the container.

database schema version … is newer than this binary's …

An older image was started on a database a newer version migrated. See Update to a new release.

cannot tell what this data directory holds

The config and cache folders hold something that is neither v2 nor v3 data, and nothing was changed. Check that the volumes point at the right host folders. Upgrading from v2 describes what each holds.

database held in memory: it and its backups are lost on restart

The server starts, but /app/cache is on tmpfs or ramfs. Map it to a disk or pool path: Storage and permissions.

The container shows as unhealthy, but DroppedNeedle opens

The health check calls localhost inside the container. If BIND_HOST is pinned to one interface IP, the server doesn’t answer there. Set BIND_HOST back to auto, or to a wildcard such as 0.0.0.0.

Can't reach the server

The web app’s error page reads “DroppedNeedle didn’t answer. Your session is safe - try again shortly.” Press Retry once /health answers again. “Server busy” means the server answered that it was busy, and Retry works the same way.

Docs