Troubleshooting
Common issues and how to fix them.
Container Issues
Containers Won't Start
Check logs:
Check container status:
Look for containers in "Exited" state and check their logs.
Port Already in Use
Something else is using port 3000 (web) or 8000 (api).
Find what's using the port:
Options:
1. Stop the conflicting service
2. Change ports in .env or compose file
Out of Memory
orThe API container needs memory for ML models.
Check memory:
Solutions:
- Ensure 8GB+ RAM available
- Reduce MAX_CONCURRENT_JOBS in .env
- Use CPU mode if GPU memory is limited
Container Health Check Failing
Check health status:
Common causes: - Database not ready yet (wait longer) - API startup still in progress (models loading) - Configuration error (check logs)
Database Issues
Database Connection Failed
Check PostgreSQL is running:
Check network:
Migration Errors
Check migration logs:
Run migrations manually:
Database Corrupted
If PostgreSQL won't start due to corruption:
-
Try recovery mode:
-
Restore from backup:
-
Last resort - reinitialize:
Authentication Issues
Can't Log In
Check OAuth client exists:
docker exec kg-postgres psql -U admin -d knowledge_graph -c \
"SELECT client_id, redirect_uris FROM kg_auth.oauth_clients;"
Ensure redirect URI matches:
The registered redirect URI must match your WEB_HOSTNAME.
Reset admin password:
500 Error on Login
Check API logs:
Common causes:
- OAuth client missing scopes column (fixed in recent versions)
- Database connection issue
- Secret key mismatch
Token Expired
Tokens expire after ACCESS_TOKEN_EXPIRE_MINUTES (default 60).
Solution: Log out and log in again, or increase the timeout in .env.
HTTPS/SSL Issues
Certificate Not Found
Check certificate paths:
Check nginx config matches:
Certificate Expired
Renew manually:
~/.acme.sh/acme.sh --renew -d kg.example.com
~/.acme.sh/acme.sh --install-cert -d kg.example.com \
--key-file /srv/docker/data/knowledge-graph/certs/kg.example.com.key \
--fullchain-file /srv/docker/data/knowledge-graph/certs/kg.example.com.fullchain.cer
docker exec kg-web nginx -s reload
Mixed Content Warnings
Browser blocks HTTP requests from HTTPS page.
Check frontend config:
The apiUrl should use https:// if your site uses HTTPS.
Fix: Set correct WEB_HOSTNAME and restart:
GPU Issues
GPU Not Detected
Check NVIDIA runtime:
Check container GPU access:
Reinstall NVIDIA Container Toolkit:
CUDA Out of Memory
Reduce batch size by setting environment variable or reducing concurrent jobs.
Use CPU fallback:
Set GPU_MODE=cpu in .operator.conf and restart.
Ingestion Issues
Job Stuck in Pending
Jobs require approval by default.
Check job status:
Approve pending jobs:
Enable auto-approval in ingestion request:
Extraction Failing
Check API logs:
Common causes: - AI provider API key invalid or expired - Rate limited by provider - Document format not supported
Large Document Timeout
Increase timeout: Edit nginx configuration or API timeout settings.
Split document: Break into smaller files before ingestion.
CLI Issues
kg Command Not Found
Reinstall CLI:
Check PATH:
CLI Authentication Failed
Re-authenticate:
Check API URL:
Getting More Help
Collect Diagnostic Info
./operator.sh status
./operator.sh logs > logs.txt 2>&1
docker ps -a
docker version
cat .env | grep -v KEY | grep -v SECRET | grep -v PASSWORD
Report an Issue
Open an issue at https://github.com/aaronsb/knowledge-graph-system/issues with: - What you were trying to do - What happened instead - Relevant logs (sanitize secrets!) - System info (OS, Docker version, GPU)