Troubleshooting » History » Version 3
Redmine Admin, 10/26/2026 02:24 AM
deploy-publish.sh
| 1 | 2 | Redmine Admin | ## What is up right now? |
|---|---|---|---|
| 2 | |||
| 3 | ```bash |
||
| 4 | 1 | Redmine Admin | ~/deploy/check-sites.sh # every site-* container: status + HTTP answer through NPM |
| 5 | podman ps --format 'table {{.Names}}\t{{.Status}}\t{{.Networks}}' |
||
| 6 | systemctl --user list-units 'net-*' 'db-*' 'site-*' 'nginx-proxy-manager*' --no-pager |
||
| 7 | systemctl --user --failed # anything that died |
||
| 8 | 2 | Redmine Admin | ``` |
| 9 | |||
| 10 | ## What is defined (even if not running)? |
||
| 11 | |||
| 12 | ```bash |
||
| 13 | 1 | Redmine Admin | ls ~/.config/containers/systemd/ # the live units = the list of sites |
| 14 | systemctl --user list-unit-files 'net-*' 'db-*' 'site-*' 'nginx-proxy-manager*' |
||
| 15 | podman ps -a # containers incl. stopped/exited |
||
| 16 | podman volume ls ; podman network ls ; podman secret ls |
||
| 17 | /usr/libexec/podman/quadlet -dryrun -user 2>&1 | grep -iE 'error|warn' # unit syntax problems |
||
| 18 | 2 | Redmine Admin | ``` |
| 19 | 1 | Redmine Admin | |
| 20 | 2 | Redmine Admin | A site = `net-<name>.network` + `db-<name>.container` + `site-<name>.container` |
| 21 | (+ `.volume` files). If the files are there and `podman ps` doesn't show the |
||
| 22 | containers, the services are stopped or failed — see next. |
||
| 23 | 1 | Redmine Admin | |
| 24 | 2 | Redmine Admin | ## Bringing a site back |
| 25 | |||
| 26 | Order matters (network → db → site); `Requires=`/`After=` do it for you when |
||
| 27 | you start the site unit, but starting them one by one shows where it fails: |
||
| 28 | |||
| 29 | ```bash |
||
| 30 | 1 | Redmine Admin | systemctl --user start net-<name>-network.service |
| 31 | systemctl --user start db-<name>.service && sleep 5 && podman logs --tail 20 db-<name> |
||
| 32 | systemctl --user start site-<name>.service && sleep 5 && podman logs --tail 20 site-<name> |
||
| 33 | systemctl --user status site-<name>.service --no-pager |
||
| 34 | journalctl --user -u site-<name>.service -e --no-pager | tail -30 |
||
| 35 | 2 | Redmine Admin | ``` |
| 36 | 1 | Redmine Admin | |
| 37 | 2 | Redmine Admin | Typical causes: image pull failed (no egress / registry down) → `podman pull <image>`; |
| 38 | secret missing → `podman secret ls` (a container whose `Secret=` is missing |
||
| 39 | won't start); volume removed → the DB initialises **empty** on next start, stop |
||
| 40 | immediately and restore from backup; `Restart=always` loop → `podman logs`. |
||
| 41 | |||
| 42 | ## NPM says 502 / site unreachable but container is up |
||
| 43 | |||
| 44 | ```bash |
||
| 45 | 1 | Redmine Admin | podman inspect nginx-proxy-manager | jq '.[0].NetworkSettings.Networks | keys' # must list net-<name> |
| 46 | podman network inspect net-<name> | jq '.[0].containers | map(.name)' # db, site, nginx-proxy-manager |
||
| 47 | podman exec nginx-proxy-manager sh -c 'getent hosts site-<name>; curl -sI http://site-<name>/ | head -1' |
||
| 48 | 2 | Redmine Admin | ``` |
| 49 | 1 | Redmine Admin | |
| 50 | 2 | Redmine Admin | NPM not in the network → the live `nginx-proxy-manager.container` lost the |
| 51 | `Network=` line (see [[NPM]]) → fix the unit, `cp`, `daemon-reload`, |
||
| 52 | `restart nginx-proxy-manager.service`. Name doesn't resolve inside NPM → NPM |
||
| 53 | joined the network after it started → same restart. Restarting NPM interrupts |
||
| 54 | **all** sites for ~10–20 s. |
||
| 55 | |||
| 56 | 3 | Redmine Admin | ## Snipe-IT shows HTTP 500 — how do I find out why? |
| 57 | |||
| 58 | The long `#67 /var/www/html/vendor/...` list is only the request path. The cause is |
||
| 59 | the `production.ERROR:` line above it: |
||
| 60 | |||
| 61 | ```bash |
||
| 62 | podman exec site-snipeit sh -c 'grep -nE "production\.(ERROR|CRITICAL)" /var/www/html/storage/logs/laravel.log | cut -c1-400 | tail -8' |
||
| 63 | ``` |
||
| 64 | |||
| 65 | * `Email "${MAIL_ENV_FROM_ADDR}" does not comply with addr-spec of RFC 2822` → From/Reply-To |
||
| 66 | were never set; the image's placeholder is not an address. Set `MAIL_FROM_ADDR` and |
||
| 67 | `MAIL_REPLYTO_ADDR` in the unit (Snipe-IT chapter, "Mail"). It only breaks the email step; |
||
| 68 | the record itself (e.g. the new user) is saved. |
||
| 69 | * `Table 'snipeit.password_resets' doesn't exist` from `auth:clear-resets`, repeating every |
||
| 70 | 15 minutes → the scheduler is running against a database whose tables were not created yet |
||
| 71 | (pre-flight "Create database tables" not clicked). In this install the errors stopped once |
||
| 72 | the tables existed. Check: `podman exec db-snipeit sh -c 'mariadb -uroot -p"$MYSQL_ROOT_PASSWORD" -e "show tables from snipeit like \"password%\""'`. |
||
| 73 | |||
| 74 | ## Snipe-IT mail: `451 4.4.4 ... ATTR5` from Exchange |
||
| 75 | |||
| 76 | Seen in the tinker test above when the recipient was external. It is **not** an authentication |
||
| 77 | or TLS problem and not a Snipe-IT setting: Exchange accepted the connection, then refused a |
||
| 78 | message to a recipient outside the tenant. First thing to establish is whether internal works: |
||
| 79 | send the test to `sysadmin@mdsdefense.com` (passes here). If internal passes and external |
||
| 80 | fails, look at the connector / relay permission in Exchange, not at the unit. If **internal |
||
| 81 | also** fails, compare the From address with Redmine's (Administration → Settings → Email |
||
| 82 | notifications → "Emission email address") and the host's egress IP with the connector's IP list |
||
| 83 | (`curl -s https://api.ipify.org` on the host). |
||
| 84 | |||
| 85 | 2 | Redmine Admin | ## Does it come back after a reboot? |
| 86 | |||
| 87 | 1 | Redmine Admin | Yes, by design, if three things hold: |
| 88 | |||
| 89 | 2 | Redmine Admin | 1. **Lingering** for websvcmaster (the user manager starts at boot without a login): |
| 90 | `loginctl show-user websvcmaster | grep Linger` → `Linger=yes` (root: `loginctl enable-linger websvcmaster`). |
||
| 91 | 2. Every unit has `[Install] WantedBy=default.target` — Quadlet units are |
||
| 92 | *enabled by that section*, not by `systemctl enable` (which doesn't work on |
||
| 93 | generated units). Check: `grep -L 'WantedBy=default.target' ~/.config/containers/systemd/*.container` |
||
| 94 | → must print nothing. |
||
| 95 | 3. `Restart=always` in `[Service]` so a crash is retried. |
||
| 96 | 1 | Redmine Admin | |
| 97 | 2 | Redmine Admin | Dry test without rebooting: `systemctl --user stop site-<name>.service db-<name>.service && systemctl --user start default.target` |
| 98 | → both come back. Real test: reboot the host, then `check-sites.sh` after ~2 min |
||
| 99 | (MariaDB + Puma + Apache need a moment). |
||
| 100 | |||
| 101 | ## After a host reboot — checklist |
||
| 102 | |||
| 103 | ```bash |
||
| 104 | 1 | Redmine Admin | loginctl show-user websvcmaster | grep Linger # yes |
| 105 | systemctl --user --failed # empty |
||
| 106 | ~/deploy/check-sites.sh # all 200/30x |
||
| 107 | firewall-cmd --list-all # (root) 81/444 + 8181 rich rules still there |
||
| 108 | 2 | Redmine Admin | ``` |
| 109 | |||
| 110 | ## Data safety reminders |
||
| 111 | |||
| 112 | * Secrets live only in `~/.local/share/containers/storage/secrets/` — back up |
||
| 113 | that directory (or re-create the secrets from your password store); without |
||
| 114 | `snipeit-app-key` the Snipe-IT DB is unreadable, without the DB secrets the |
||
| 115 | containers won't start. |
||
| 116 | * Volumes: `podman volume export <vol> > file.tar` / `podman volume import <vol> file.tar`, |
||
| 117 | plus DB dumps ([[WordPress]], [[Redmine]], [[Snipe-IT]]). |
||
| 118 | * `podman system reset` or removing `~/.local/share/containers` deletes |
||
| 119 | **everything** above; never run it on this host. |
||
| 120 | |||
| 121 | --- |
||
| 122 | _Source: `dmz-web-podman-cheatsheet.md` v1.2 in the `dmz-web-deploy` repo ([[Releases]]). Edit the wiki and the repo copy together._ |