Troubleshooting

Uptrace version

Before trying anything else, make sure you are running the latest Uptrace version:

shell
uptrace version

Compare with the latest available version at GitHub Releases.

Uptrace logs

View live Uptrace logs:

shell
sudo journalctl -u uptrace -f

Check the service status:

shell
sudo systemctl status uptrace

By default, Uptrace only logs failed HTTP requests and failed database queries. Use environment
variables to enable verbose logging:

shell
# Log all incoming HTTP requests
HTTPDEBUG=2 uptrace serve

# Log all ClickHouse queries
CHDEBUG=2 uptrace serve

# Log all PostgreSQL queries
PGDEBUG=2 uptrace serve

Database logs

View ClickHouse logs:

shell
sudo tail -f /var/log/clickhouse-server/clickhouse-server.err.log -n 100

View PostgreSQL logs:

shell
sudo tail -f /var/log/postgresql/postgresql-17-main.log

Resetting ClickHouse database

If ClickHouse queries are failing, try resetting the database:

shell
uptrace ch reset

To check the database status:

shell
uptrace ch status

Distributed and Kafka tables

In sharded (Premium) and Kafka-based (Enterprise) deployments, uptrace ch migrate already creates the distributed tables, the ClickHouse Kafka engine tables, and the materialized views that connect them. The commands below let you recreate or tear down those objects by hand — useful after adding a shard, changing Kafka engine settings, or pausing ingestion for maintenance. They operate on every read-write replica.

Distributed tables

Recreate the distributed tables (*_dist, plus the uptrace_all variants) on each replica:

shell
uptrace ch dist

This is a no-op unless ch_cluster.distributed is enabled. It is safe to run at any time without holding the migration lock — run it after adding a shard or if a distributed table is missing.

Kafka engine tables

Recreate the ClickHouse Kafka engine tables (<table>_queue) that consume from the Kafka topics. The broker list comes from ch_cluster.kafka.brokers, and the number of consumers is sized from the topic's partition count:

shell
uptrace ch kafka_create

Pass --setting (repeatable) to override or add Kafka engine settings on the created tables:

shell
uptrace ch kafka_create --setting "kafka_max_block_size = 1048576"

The tables are created with CREATE OR REPLACE, so it is safe to re-run.

Kafka materialized views

The materialized views (<table>_queue_mv) are what actually move rows from each Kafka queue table into its destination table, so creating them starts ingestion and dropping them stops it without touching the queue tables or the data buffered in Kafka.

Create (or recreate) the views:

shell
uptrace ch kafka_create_view

It also accepts repeatable --setting flags.

Drop the views to pause consumption from Kafka — for example before a maintenance window:

shell
uptrace ch kafka_drop_view

Recreate them with uptrace ch kafka_create_view to resume. While the views are dropped, data accumulates in Kafka and is consumed once they are recreated.

Resetting PostgreSQL database

You can also reset the PostgreSQL database that Uptrace uses to store metadata:

shell
uptrace pg reset

To check the database status:

shell
uptrace pg status

Re-seeding the database

After resetting ClickHouse or PostgreSQL, you may need to re-seed the database with default data:

shell
uptrace db seed

TLS certificate issues

Verify that the certificate is valid and not expired:

shell
openssl x509 -in uptrace.crt -text -noout
openssl x509 -in uptrace.crt -checkend 86400

Test the TLS connection:

shell
openssl s_client -connect uptrace.local:443

Health check

Verify that Uptrace is running and can reach its databases:

shell
curl -f http://localhost:14318/api/health