A unit fails with `status=226/NAMESPACE`.
AdvancedTroubleshootingsystemd services and journald
Answer
Likely causes → systemd couldn't set up the mount namespace for sandboxing options: a path in ReadWritePaths=, ReadOnlyPaths=, BindPaths= or InaccessiblePaths= doesn't exist, or the kernel/container doesn't allow namespaces.
Diagnose →
journalctl -u myapp -b | grep -i namespace
systemctl cat myapp | grep -E 'Paths=|Protect|Private'
Fix → Create the missing paths or prefix them with - to ignore missing ones (ReadWritePaths=-/var/lib/myapp). Inside unprivileged containers, drop the sandboxing options that need namespaces.
Prevent → Use StateDirectory=/LogsDirectory= so paths exist before the namespace is built.
More on systemd services and journald
`systemctl status myapp` shows `Main process exited, code=exited, status=203/EXEC`.BeginnerA service fails with `status=217/USER`.BeginnerA service fails with `status=200/CHDIR`.BeginnerYou edited a unit file, restarted the service, but the old behaviour persists. `systemctl status` shows `Warning: The unit file, source configuration file or drop-ins of myapp.service changed on disk`.BeginnerYou edited `/usr/lib/systemd/system/nginx.service` directly and after a package update your change vanished.Beginner`systemctl start myapp` returns immediately with success, but the app isn't running a second later and `status` shows `inactive (dead)` with `code=exited, status=0/SUCCESS`.Intermediate