| name | troubleshooting | |||||||
|---|---|---|---|---|---|---|---|---|
| description | Debug container crashes, network connectivity issues, Pi hardware problems, and service failures. | |||||||
| tools |
|
|||||||
| standards-version | 1.10.0 |
Use this skill when the user wants to:
- Diagnose why a Docker container is crashing or restarting
- Debug network connectivity between services or from external clients
- Investigate Raspberry Pi hardware issues (throttling, overheating, undervoltage)
- Troubleshoot systemd service failures (Cockpit, Samba, node_exporter)
- Resolve DNS issues with AdGuard Home
- Debug reverse proxy errors in Nginx Proxy Manager
- Investigate general "service is down" reports from Uptime Kuma or Homepage
- Symptom description -- what is broken, when it started, any recent changes
- Affected service name(s) or container name(s)
- Whether the issue is intermittent or persistent
- Triage -- determine the scope of the problem:
- Single container? Call
homelab_serviceLogsfor that service andhomelab_composePsfor container state. - All services down? Call
homelab_piStatusto check if the Pi itself is healthy. - Network issue? Call
homelab_networkInfoto inspect interfaces, routes, and DNS. - Call
homelab_sshTestfirst -- if SSH is unreachable, the Pi may be offline or network is down.
- Single container? Call
- Container crash debugging:
- Check container status with
homelab_composePs-- look forRestarting,Exited, orunhealthy. - Pull logs with
homelab_serviceLogsfor the specific container. - Common crash causes:
- OOM killed -- check
docker inspect <container> | grep OOMKilledand increasemem_limitin compose. - Config error -- bad environment variable or missing volume mount. Check compose file against service docs.
- Port conflict -- another service or host process is using the same port. Check with
ss -tlnp. - Corrupt data -- volume data corruption. Try removing the volume and redeploying (after backup).
- OOM killed -- check
- Restart the container: call
homelab_serviceRestartorhomelab_composeUpto recreate.
- Check container status with
- Network debugging:
- Call
homelab_networkInfofor interface status, IP addresses, and routing. - DNS resolution: check if AdGuard Home is running via
homelab_serviceHealth. Test resolution withdig @localhost <domain>. - Inter-container networking: containers on the same Docker network should resolve each other by service name. Check the compose network configuration.
- External access through Nginx Proxy Manager: verify proxy host config, SSL certificate status, and upstream target.
- Firewall: if UFW is enabled, check that required ports are allowed. See
security-hardeningskill.
- Call
- Pi hardware issues:
- Call
homelab_piStatus-- look for throttling flags. - Check for undervoltage:
vcgencmd get_throttled-- a non-zero value indicates power issues.0x50005= currently under-voltage and was throttled.- Solution: use the official Pi 5 27W USB-C power supply.
- Check temperature:
vcgencmd measure_temp-- throttling starts at 80C, hard limit at 85C.- Solution: ensure the active cooler or heatsink is properly mounted and fan is running.
- Check CPU frequency:
vcgencmd measure_clock arm-- reduced frequency indicates throttling.
- Call
- Systemd service failures:
- Check service status:
systemctl status <service> - View journal:
journalctl -u <service> --no-pager -n 50 - Common failures:
- Cockpit: check
cockpit.socketis enabled, port 9090 is not blocked. - Samba: config syntax error in smb.conf. Test with
testparm. - node_exporter: port 9100 conflict or service disabled after update.
- Cockpit: check
- Restart: call
homelab_serviceRestartfor the failed service.
- Check service status:
- Compose stack issues:
- Pull latest images: call
homelab_composePullto check for updates. - Recreate containers: call
homelab_composeDownthenhomelab_composeUp. - Check for image pull failures due to rate limiting or network issues.
- Pull latest images: call
- Validate resolution -- after applying fixes:
- Call
homelab_serviceHealthto confirm the affected service is healthy. - Call
homelab_piStatusfor overall system health. - If applicable, call
homelab_networkInfoto verify network state.
- Call
- Docker logs:
docker logs <container> --tail 100 -f - Docker inspect:
docker inspect <container>for full container config and state - Pi throttling:
vcgencmd get_throttledflag interpretation - Systemd journal:
journalctl -u <service> --since "1 hour ago" - Compose stacks:
/opt/homelab/docker/<service>/docker-compose.yml - Uptime Kuma dashboard for historical uptime data
User: "Grafana keeps restarting on my Pi."
Agent response:
- Call
homelab_composePsto confirm Grafana's state -- expectRestartingorExited. - Call
homelab_serviceLogsfor Grafana to find the error:- If OOM: increase
mem_limitin/opt/homelab/docker/grafana/docker-compose.yml. - If permission error: check that the Grafana data volume has correct ownership (UID 472).
- If config error: validate
grafana.inior environment variables.
- If OOM: increase
- Call
homelab_piStatusto check for Pi-level resource exhaustion or throttling. - Apply the fix (e.g., fix volume permissions):
sudo chown -R 472:472 /opt/homelab/docker/grafana/data
- Call
homelab_composeUpto redeploy Grafana. - Call
homelab_serviceHealthto confirm Grafana is now healthy. - Verify in the browser or call
homelab_serviceLogsagain to see clean startup logs.
| Tool | Purpose |
|---|---|
homelab_sshTest |
First check -- is the Pi even reachable? |
homelab_piStatus |
System health, CPU, memory, throttling indicators |
homelab_serviceHealth |
Check if specific services are up or down |
homelab_serviceLogs |
Pull container or service logs for error messages |
homelab_serviceRestart |
Restart a failed service or container |
homelab_composePs |
Container state for a compose stack |
homelab_composeUp |
Recreate containers after config fixes |
homelab_composeDown |
Stop a stack cleanly before redeployment |
homelab_composePull |
Pull latest images to fix known bugs |
homelab_networkInfo |
Inspect network interfaces, routes, DNS |
homelab_diskUsage |
Check if disk full is causing failures |
homelab_aptUpdate |
Check for system package updates that fix bugs |
- Confirm gate on restart and redeploy --
homelab_serviceRestart,homelab_composeUp, andhomelab_composeDownrequireconfirm=true. If a restart call returns "cancelled", the gate is the reason. - Reading only the last few log lines -- some errors are logged at startup, not at the crash. Always pull enough log history to see the initial error.
- Restarting without diagnosing -- blindly restarting a crashing container just resets the restart counter. Find the root cause in logs first.
- Ignoring Pi throttling -- performance degradation and random service failures can be caused by undervoltage or overheating. Always check
homelab_piStatusfor hardware issues. - DNS loops with AdGuard Home -- if the Pi uses itself as DNS and AdGuard Home is down, nothing resolves. Set a fallback DNS in
/etc/resolv.confordhcpcd.conf. - Docker network isolation -- containers on different Docker networks cannot communicate by default. Check that dependent services share a network in their compose files.
- Stale images -- old images may have known bugs. Call
homelab_composePullbefore deep debugging to rule out already-fixed issues. - Filesystem corruption on SD card -- sudden power loss can corrupt the filesystem. Run
fsckfrom a recovery boot if the Pi fails to start cleanly.
pi-system-management-- Pi health monitoring and system-level commandsdocker-compose-stacks-- compose file structure and common configuration issuesnetwork-configuration-- network setup and DNS configurationservice-monitoring-- Prometheus, Grafana, and Uptime Kuma for proactive monitoringstorage-management-- disk-full issues and cleanup strategies