Troubleshooting » History » Version 1
Redmine Admin, 10/25/2026 07:23 PM
| 1 | 1 | Redmine Admin | What is up right now? |
|---|---|---|---|
| 2 | ~/deploy/check-sites.sh # every site-* container: status + HTTP answer through NPM |
||
| 3 | podman ps --format 'table {{.Names}}\t{{.Status}}\t{{.Networks}}' |
||
| 4 | systemctl --user list-units 'net-*' 'db-*' 'site-*' 'nginx-proxy-manager*' --no-pager |
||
| 5 | systemctl --user --failed # anything that died |
||
| 6 | What is defined (even if not running)? |
||
| 7 | ls ~/.config/containers/systemd/ # the live units = the list of sites |
||
| 8 | systemctl --user list-unit-files 'net-*' 'db-*' 'site-*' 'nginx-proxy-manager*' |
||
| 9 | podman ps -a # containers incl. stopped/exited |
||
| 10 | podman volume ls ; podman network ls ; podman secret ls |
||
| 11 | /usr/libexec/podman/quadlet -dryrun -user 2>&1 | grep -iE 'error|warn' # unit syntax problems |
||
| 12 | A site = net-<name>.network + db-<name>.container + site-<name>.container (+ .volume files). If the files are there and podman ps doesn't show the containers, the services are stopped or failed — see next. |
||
| 13 | |||
| 14 | Bringing a site back |
||
| 15 | Order matters (network → db → site); Requires=/After= do it for you when you start the site unit, but starting them one by one shows where it fails: |
||
| 16 | |||
| 17 | systemctl --user start net-<name>-network.service |
||
| 18 | systemctl --user start db-<name>.service && sleep 5 && podman logs --tail 20 db-<name> |
||
| 19 | systemctl --user start site-<name>.service && sleep 5 && podman logs --tail 20 site-<name> |
||
| 20 | systemctl --user status site-<name>.service --no-pager |
||
| 21 | journalctl --user -u site-<name>.service -e --no-pager | tail -30 |
||
| 22 | Typical causes: image pull failed (no egress / registry down) → podman pull <image>; secret missing → podman secret ls (a container whose Secret= is missing won't start); volume removed → the DB initialises empty on next start, stop immediately and restore from backup; Restart=always loop → podman logs. |
||
| 23 | |||
| 24 | NPM says 502 / site unreachable but container is up |
||
| 25 | podman inspect nginx-proxy-manager | jq '.[0].NetworkSettings.Networks | keys' # must list net-<name> |
||
| 26 | podman network inspect net-<name> | jq '.[0].containers | map(.name)' # db, site, nginx-proxy-manager |
||
| 27 | podman exec nginx-proxy-manager sh -c 'getent hosts site-<name>; curl -sI http://site-<name>/ | head -1' |
||
| 28 | NPM not in the network → the live nginx-proxy-manager.container lost the Network= line (see [[NPM]]) → fix the unit, cp, daemon-reload, restart nginx-proxy-manager.service. Name doesn't resolve inside NPM → NPM joined the network after it started → same restart. Restarting NPM interrupts all sites for ~10–20 s. |
||
| 29 | |||
| 30 | Does it come back after a reboot? |
||
| 31 | Yes, by design, if three things hold: |
||
| 32 | |||
| 33 | Lingering for websvcmaster (the user manager starts at boot without a login): loginctl show-user websvcmaster | grep Linger → Linger=yes (root: loginctl enable-linger websvcmaster). |
||
| 34 | Every unit has [Install] WantedBy=default.target — Quadlet units are enabled by that section, not by systemctl enable (which doesn't work on generated units). Check: grep -L 'WantedBy=default.target' ~/.config/containers/systemd/*.container → must print nothing. |
||
| 35 | Restart=always in [Service] so a crash is retried. |
||
| 36 | Dry test without rebooting: systemctl --user stop site-<name>.service db-<name>.service && systemctl --user start default.target → both come back. Real test: reboot the host, then check-sites.sh after ~2 min (MariaDB + Puma + Apache need a moment). |
||
| 37 | |||
| 38 | After a host reboot — checklist |
||
| 39 | loginctl show-user websvcmaster | grep Linger # yes |
||
| 40 | systemctl --user --failed # empty |
||
| 41 | ~/deploy/check-sites.sh # all 200/30x |
||
| 42 | firewall-cmd --list-all # (root) 81/444 + 8181 rich rules still there |
||
| 43 | Data safety reminders |
||
| 44 | Secrets live only in ~/.local/share/containers/storage/secrets/ — back up that directory (or re-create the secrets from your password store); without snipeit-app-key the Snipe-IT DB is unreadable, without the DB secrets the containers won't start. |
||
| 45 | Volumes: podman volume export <vol> > file.tar / podman volume import <vol> file.tar, plus DB dumps ([[WordPress]], [[Redmine]], [[Snipe-IT]]). |
||
| 46 | podman system reset or removing ~/.local/share/containers deletes everything above; never run it on this host. |
||
| 47 | Source: dmz-web-podman-cheatsheet.md v1.2 in the dmz-web-deploy repo ([[Releases]]). Edit the wiki and the repo copy together. |