Troubleshooting
Run the Docker commands below from the directory containing compose.yml, metric.toml, symbolicator.yml and .env.
Metric does not start
Show the logs:
docker compose logs metricCommon causes:
- a placeholder remains in
.env; METRIC_PROFILEin.envdoes not match the installedmetric.toml;metric.tomlis not besidecompose.yml;- on Medium or High,
symbolicator.ymlis not besidecompose.yml; METRIC_SCRUB_HMAC_KEYis not 64 hexadecimal characters;- port 4001 is already used;
- MongoDB is still starting;
- the database schema belongs to another Metric version.
Check the configuration
docker compose run --rm --no-deps metric \
--config /etc/metric/metric.toml \
--check-configMetric reports unknown settings and invalid values before starting. This check does not connect to the database; successful validation does not prove reachability.
Existing database connection fails
Check the selected backend and the installed connection secret without posting its password in logs or issue reports. For PostgreSQL the database must already exist and the role needs permission to create/migrate the metric schema. For Mongo, check the separate authSource and Metric data database.
Inside a container localhost refers to that container. The installer maps a same-computer URI to the Docker host address. On Linux, a loopback-only database listener may remain inaccessible through the host gateway; configure the database listener/firewall yourself, or use a reachable named Docker service address.
For TLS errors, check CA trust, hostname matching and certificate expiry. Check that certificate/key files are mounted read-only at the paths seen by Metric. PostgreSQL supports sslmode in its URI; arbitrary libpq query options are not accepted by Metric's URI policy. Correct the selected protected connection rather than disabling checks to hide an error. No TLS failure falls back to plaintext.
For intentional local plain TCP, explicitly select installer TLS off, PostgreSQL sslmode=disable or Mongo tls=false. Changing a Docker database initialization password does not change credentials in an already populated database volume.
MongoDB reports Authentication failed after restart
MongoDB creates its metric user only when the data volume is empty. Its password must continue to match METRIC_MONGO_PASSWORD in the original .env.
Do not delete metric_mongo-data. Restore the original .env, remove any shell override with unset METRIC_MONGO_PASSWORD, and recreate the containers:
cd /root/metric
unset METRIC_MONGO_PASSWORD
docker compose up -d --force-recreateThe installer preserves an existing .env. If the volume exists but that file is missing, it stops instead of generating a new password.
The browser returns to the sign-in page
The supplied Docker profiles support sign-in over HTTP. Check that metric.toml contains both settings:
[development]
allow_insecure_cookies = true
[auth]
secure_cookie = falseThen restart Metric with docker compose up -d. If you use a custom configuration with auth.secure_cookie = true, open Metric through HTTPS.
The SDK sends no events
Check:
- the DSN belongs to the selected project;
- the DSN key is active;
- the application can reach the Metric hostname;
- the project accepts Error Events;
- the Metric
/readyendpoint returns HTTP 200.
Then inspect the SDK debug log and the Metric container log.
Readiness fails
curl -i http://localhost:4001/ready
docker compose psCheck the MongoDB container first. If it is unhealthy, inspect its logs:
docker compose logs mongodbOn Medium or High, inspect Symbolicator when it is unhealthy:
docker compose logs symbolicatorIts cache is rebuildable. If the logs report corrupted cache data, stop the installation and remove only the metric_symbolicator-cache volume. Never remove metric_mongo-data or metric_blob-data while troubleshooting Symbolicator.
Min and Low do not show a Symbolicator container in docker compose ps. That is expected.
Container restarts or out-of-memory errors
Check current use and the selected profile:
docker stats
grep '^METRIC_PROFILE=' .envOn Min, configure 1–2 GiB of host swap and stop unrelated services. Do not raise the Metric limit without leaving memory for MongoDB and Linux. Repeated restarts under normal traffic mean the installation should move to the next profile.
If the server stays up but returns 429 or 503 during a brief spike, its bounded queues are protecting it from running out of memory.
Disk is filling
Check Docker and volume use:
docker system df
docker compose logs --tail=50 metric mongodbDo not delete files directly from mongo-data or blob-data. Reduce SDK log, trace or Replay volume, shorten retention in metric.toml, or move to a larger disk. Container logs already rotate according to the selected profile.
Schema mismatch
During a supported automatic migration, /live is HTTP 200, /ready is HTTP 503 and the root browser page shows migration progress. Follow the Metric logs; do not start a second manual migration command.
If Metric exits with a schema error, the condition is not transient: the image is missing a required transition, the database is newer, a required invariant failed or the transformation is ambiguous. Keep the data unchanged. Do not edit schema_meta, drop the database or delete Docker volumes. Follow Update Metric.
Ask for help
When opening a GitHub issue, include:
- Metric version;
- Docker or binary installation;
- operating system;
- the exact error;
- relevant logs with passwords, tokens, DSNs and private event data removed.