-
-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
cyclonite69 edited this page Feb 7, 2026
·
1 revision
Common issues and solutions for ShadowCheck
Symptoms:
-
ECONNREFUSEDerror - Cannot connect to PostgreSQL
Solution:
# Verify Docker PostgreSQL is running
docker ps | grep shadowcheck_postgres
# Or check local PostgreSQL
sudo systemctl status postgresql
# Test connection
docker exec shadowcheck_postgres psql -U shadowcheck_user -d shadowcheck_dbSolution:
# Reset password in PostgreSQL
sudo -u postgres psql
postgres=# ALTER USER shadowcheck_user WITH PASSWORD 'new_password';
# Update keyring
node scripts/set-secret.js db_password "new_password"Symptoms:
- Map area is empty/gray
- No map tiles loading
Solutions:
- Verify
mapbox_tokenis set in keyring - Check browser console for Mapbox GL errors
- Ensure token has correct permissions
Symptoms:
- All metrics showing 0
- No network data displayed
Solution:
-- Check data exists
SELECT COUNT(*) FROM public.networks;
-- Verify home location
SELECT * FROM app.location_markers WHERE name = 'home';
-- Check materialized views are refreshed
REFRESH MATERIALIZED VIEW analytics_summary_mv;Symptoms:
-
JavaScript heap out of memoryerror - Server crashes with large datasets
Solution:
# Increase Node.js heap size
NODE_OPTIONS="--max-old-space-size=4096" npm startSymptoms:
EADDRINUSE: address already in use :::3001
Solution:
# Find process using port
lsof -i :3001
# Kill process
kill -9 <PID>
# Or change PORT in .env
PORT=3002Solution (Development Only):
# Drop and recreate schema
psql -U shadowcheck_user -d shadowcheck_db -c "DROP SCHEMA app CASCADE; CREATE SCHEMA app;"
# Re-run migrations
psql -U shadowcheck_admin -d shadowcheck_db -f sql/migrations/00_init_schema.sqlSymptoms:
- API requests taking >5 seconds
- Dashboard loading slowly
Solution:
-- Check slow queries
SELECT query, mean_exec_time, calls
FROM pg_stat_statements
ORDER BY mean_exec_time DESC
LIMIT 10;
-- Analyze and vacuum
ANALYZE;
VACUUM ANALYZE;Symptoms:
- "Access Denied" message on Admin page
- Cannot perform admin operations
Solution:
- Verify
db_admin_passwordsecret is configured - Check user has
adminrole in database - Ensure API key is set for protected endpoints
# Set environment variable
DEBUG=shadowcheck:* npm start
# Or in .env
LOG_LEVEL=debug# View Docker logs
docker-compose logs -f api
# Check structured logs
cat logs/combined.log- Development - Development setup
- Installation - Complete setup guide
- Database - Database operations
- Recent Fixes - Recently resolved issues