Last modified: 22-January-2025
This guide provides troubleshooting steps for common issues encountered while running Teranode with Docker Compose.
docker compose psThis command lists all services defined in your docker-compose.yml file, along with their current status (Up, Exit, etc.) and health state if health checks are configured.
docker inspect --format='{{json .State.Health}}' container_nameReplace container_name with the name of your specific Teranode service container. For example:
docker inspect --format='{{json .State.Health}}' asset-
Use
docker statsto monitor CPU, memory, and I/O usage of containers:docker stats
-
Consider using Prometheus and Grafana for comprehensive monitoring.
-
Look for services consuming unusually high resources.
docker compose logs
docker compose logs -f # Follow logs in real-time
docker compose logs --tail=100 # View only the most recent logsdocker compose logs [service_name]-
Show timestamps:
docker compose logs -t
-
Limit output:
docker compose logs --tail=50 [service_name]
-
Since time:
docker compose logs --since 2025-01-01T00:00:00 [service_name]
docker compose logs [service_name]For Docker Compose, replace [service_name] with the appropriate service or pod name:
- Propagation Service (service name:
propagation) - Blockchain Service (service name:
blockchain) - Asset Service (service name:
asset) - Block Validation Service (service name:
blockvalidation) - P2P Service (service name:
p2p) - Block Assembly Service (service name:
blockassembly) - Subtree Validation Service (service name:
subtreevalidation) - RPC Server (service name:
rpc) - Postgres Database (service name:
postgres) [Only in Docker] - Aerospike Database (service name:
aerospike) [Only in Docker] - Kafka (service name:
kafka-shared) [Only in Docker] - Kafka Console (service name:
kafka-console-shared) [Only in Docker] - Prometheus (service name:
prometheus) [Only in Docker] - Grafana (service name:
grafana) [Only in Docker]
docker compose logs > teranode_logs.txt
docker compose logs [service_name] > [service_name]_logs.txtRemember to replace placeholders like [service_name], and label selectors with the appropriate values for your Teranode setup.
Check your Grafana TERANODE Service Overview dashboard:
-
Check that there's no blocks in the queue (
Queued Blocks in Block Validation). We expect little or no queueing, and not creeping up. 3 blocks queued up are already a concern. -
Check that the propagation instances are handling around the same load to make sure the load is equally distributed among all the propagation servers. See the
Propagation Processed Transactions per Instancediagram. -
Check that the cache is at a sustainable pattern rather than "exponentially" growing (see both the
Tx Meta Cache in Block ValidationandTx Meta Cache Size in Block Validationdiagrams). -
Check that go routines (
Goroutinesgraph) are not creeping up or reaching excessive levels.
Teranode is highly dependent on its third party dependencies. Postgres, Kafka and Aerospike are critical for Teranode operations, and the node cannot work without them.
If a third party service fails, you must restore its functionality. Once it is back, please restart Teranode cleanly following the instructions in the How to Start and Stop Teranode in Docker guide.
Problem: When attempting to start a different Teranode network (e.g., switching from testnet to mainnet, or testnet to teratestnet) on the same machine, Docker Compose may fail with errors indicating that containers with the same names already exist.
Root Cause: All Teranode Docker Compose configurations (testnet, mainnet, teratestnet) use the same hardcoded container names for their services. Docker requires container names to be unique across all running containers on the host machine, regardless of which Docker Compose project they belong to.
Important Note: Running multiple Teranode network instances simultaneously on the same machine is not recommended. Beyond container name conflicts, you will also encounter port conflicts as all networks attempt to bind to the same host ports. This configuration is not supported for production or testing environments.
Before starting a different Teranode network, run these commands from your current network directory:
# Stop and remove all containers
docker compose down
# Verify containers are removed
docker ps -a | grep teranodeIf any containers remain, remove them with:
docker container pruneThen start your new network from its directory:
cd deploy/docker/[new-network] # e.g., testnet, mainnet
docker compose up -dShould you encounter a bug, please report it following the instructions in the Bug Reporting section.