- Enable navigation.instant, prefetch, progress, content.code.select, content.tabs.link - Fix edit_uri (main→v2), copyright year (2024→2024-2026), consent banner config - Add abbreviations glossary (47 acronyms with hover tooltips via snippets auto-append) - Add tags to all 72 doc pages with consistent taxonomy (audience/module/type) - Add status:new badges to 16 recent feature pages, search:boost to 7 entry pages - Rewrite Architecture page with 5 Mermaid diagrams and full component documentation - Rewrite Troubleshooting page from 5 to 13 sections with actionable checklists - Fix broken links (Monitoring/Contributing pointed to blog placeholder) - Expand Admin Guide roles table from 5 to 11 roles - Create custom 404 page, blog with authors and inaugural v2 announcement post - Fresh Playwright screenshots for login, dashboard, campaigns, users, settings, locations, shifts - Remove 5 test/dev files and orphan template override - Add planning document (DOCS_NEXT_STEPS.md) for future editorial reference Bunker Admin
6.1 KiB
title, description, icon, tags, search
| title | description | icon | tags | search | ||||
|---|---|---|---|---|---|---|---|---|
| Troubleshooting | Solutions for common errors, CORS issues, database problems, and tunnel debugging. | material/bug |
|
|
Troubleshooting
Common issues and their solutions when running Changemaker Lite.
CORS Errors in Production
Symptom: Browser console shows CORS errors when accessing production domain.
Fix: Add your production domain to CORS_ORIGINS in .env:
CORS_ORIGINS=https://app.yourdomain.org,http://localhost:3000
Then restart the API: docker compose restart api
Pangolin Tunnel — 403/302 Errors
Symptom: All API endpoints return 302 redirects to Pangolin auth page, or 403 Forbidden.
Fix: In the Pangolin dashboard, set each resource to Not Protected (public access). Critical resources to fix first:
api.yourdomain.org— Main APIapp.yourdomain.org— Admin GUI + public pagesmedia.yourdomain.org— Media API
Verify:
# Should return JSON, NOT a 302 redirect
curl -I https://api.yourdomain.org/api/health
Database Connection Failures
Symptom: API logs show database connection errors.
Checklist:
- Check PostgreSQL:
docker compose ps v2-postgres - Verify
DATABASE_URLin.envmatches container name and port - View logs:
docker compose logs v2-postgres --tail 50 - Test connection:
docker compose exec api npx prisma db execute --stdin <<< "SELECT 1"
Redis Connection Failures
Symptom: API logs show Redis connection errors, rate limiting doesn't work.
Checklist:
- Check Redis:
docker compose ps redis-changemaker - Verify
REDIS_PASSWORDandREDIS_URLformat (redis://:password@host:port) - View logs:
docker compose logs redis-changemaker --tail 50 - Test:
docker compose exec redis-changemaker redis-cli -a $REDIS_PASSWORD ping
API Not Starting
Symptom: API container keeps restarting or won't start.
Checklist:
- Check logs:
docker compose logs api --tail 100 - Verify all required env vars are set (compare with
.env.example) - Check database is ready:
docker compose ps v2-postgres(should show "healthy") - Run migrations manually:
docker compose exec api npx prisma migrate deploy - Check for port conflicts:
ss -tlnp | grep 4000
Containers in Restart Loops
Symptom: docker compose ps shows containers with "restarting" status.
Diagnosis:
# Find restarting containers
docker compose ps | grep -i restarting
# Check recent logs for the problem container
docker compose logs <service-name> --tail 50
# Check container exit code
docker inspect <container-name> --format='{{.State.ExitCode}}'
Common causes:
- Missing environment variables (check
.env) - Database not ready (healthcheck dependencies)
- Port already in use by another process
- Insufficient memory (check with
free -h)
Newt Tunnel Won't Connect
Checklist (in order):
- Credentials: Verify
PANGOLIN_NEWT_IDandPANGOLIN_NEWT_SECRETin.env - Endpoint: Confirm
PANGOLIN_ENDPOINTmatches your Pangolin server URL - Logs:
docker compose logs newt --tail 50 - Nginx running: Newt depends on nginx —
docker compose ps nginx - Network: Ensure outbound HTTPS is not blocked by your firewall
Migration Errors
Symptom: prisma migrate deploy fails.
Common fixes:
# Check migration status
docker compose exec api npx prisma migrate status
# If migrations are out of sync, reset (DESTRUCTIVE — dev only)
docker compose exec api npx prisma migrate reset
# If shadow database errors, create one
docker compose exec -T v2-postgres createdb -U changemaker prisma_shadow_diff
!!! danger "Never use prisma db push in production"
Always use prisma migrate dev (development) or prisma migrate deploy (production) to keep migration history in sync.
Media API Upload Failures
Symptom: Video uploads fail with permission errors or 500 status.
Checklist:
- Verify inbox volume is writable: check
media/local/inboxhas:rwmount - Check disk space:
df -h - Verify FFmpeg is installed in container:
docker compose exec media-api ffprobe -version - Check upload size limit: default is 10 GB in Fastify multipart config
Email Not Sending
Symptom: Advocacy emails or notifications aren't delivered.
Checklist:
- Check
EMAIL_TEST_MODE— iftrue, all emails go to MailHog (http://localhost:8025) - Verify SMTP credentials in
.env(SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASS) - Check BullMQ queue: visit Admin > Email Queue or check logs
- Test SMTP from Settings: Admin > Settings > Email > Test Connection
Services Unreachable via Tunnel
Checklist:
- Verify nginx is running:
docker compose ps nginx - Test locally first:
curl http://localhost:4000/api/health - Check nginx logs:
docker compose logs nginx --tail 50 - Verify DNS:
dig app.yourdomain.orgshould point to your Pangolin server - Check Pangolin resources are all set to "Not Protected"
Slow Map Performance
Symptom: Map page is slow or returns 500 errors with many locations.
Causes and fixes:
- Too many locations loaded at once — the API limits by address count with debounced bounds queries
- Missing indexes — verify database has the 5 performance indexes on Location/Address tables
- Browser memory — marker clustering activates above zoom level 18; below that, addresses are grouped
Docker Disk Space
Symptom: Builds fail, containers can't start, or images won't pull.
# Check disk usage
df -h
# Clean unused Docker resources
docker system prune -f
# Clean old images (keep only last 2 days)
docker image prune -a --filter "until=48h"
# Check what's using space
docker system df
Getting Help
If your issue isn't listed here:
- Check the API logs:
docker compose logs api --tail 200 - Search the Gitea issues
- Review the Deployment guide for production-specific issues
- File a new issue with your logs and
.env(redact passwords)