For the complete documentation index, see llms.txt. This page is also available as Markdown.

Operations and Troubleshooting

KiloCenter operations — health endpoints for KC-Core, KC-Gateway, KC-Identity, common startup issues, diagnostics.

Goal

Run repeatable checks for startup issues, connectivity problems, and message-flow failures.

Health Checks

From kilocenter-modules/:

# KC-Core health
curl -s http://localhost:8086/health

# KC-Gateway health
curl -s http://localhost:8087/health

# gRPC service health
grpcurl -plaintext localhost:9090 grpc.health.v1.Health/Check

# All container services
docker compose ps

Port Checks

Verify all expected services are listening:

Port 5173 is used only in source dev mode (Vite dev server).

Container Mode Operations

Log Files (Source Dev Mode)

All service logs are written to kilocenter-modules/logs/runtime/:

Database Connection Check

Verify PostgreSQL is accessible:

Use port 5432 instead of 5433 if running PostgreSQL directly on the host (not via Docker).

Stopping Services

Container mode:

Source dev mode:

Common Issues

Symptom
Cause
Fix

dial tcp ...5432: connection refused

PostgreSQL port mismatch

Use 5433 for Docker, 5432 for host install

KC-Web shows gRPC errors

KC-Gateway not running or wrong port

Verify KC-Gateway on port 9090; check nginx config in container mode

permission denied /var/run/docker.sock

Docker group membership

Run sudo usermod -aG docker $USER and re-login

failed to load TLS certificate

Missing or invalid certificate files

Run certgen -- see Installation

Base station not connecting

BSSCI port 5000 not listening

Check KC-Core started and TLS certs are configured

SCACI not accepting connections

Missing scaci_tls config block

Check config/config.docker.yaml has scaci_host and scaci_tls section

KC-Web returns 502 for gRPC calls

nginx cannot reach kc-gateway:9090

Verify kc-gateway is healthy: docker compose ps

start-dev.sh fails

Dependencies not running

Start docker compose up -d postgres redis mosquitto first

Bun not found

Bun runtime not installed

Install Bun: curl -fsSL https://bun.sh/install | bash

KC-Web loads but shows no data

KC-Core not running or no base stations connected

Check health endpoints and base station status

Recovery Sequence

Container mode:

  1. Stop all services: docker compose down

  2. Start all services: docker compose up -d

  3. Run health checks (see above)

Source dev mode:

  1. Stop all services: ./stop-all-services.sh

  2. Restart infrastructure: docker compose restart postgres redis mosquitto

  3. Start services: ./start-dev.sh

  4. Run health checks (see above)

Last updated