Interview Prep/Linux/systemd services and journald

A service's `ExecStartPre` fails and the main service never starts: `Control process exited, code=exited, status=1/FAILURE`.

BeginnerTroubleshootingsystemd services and journald
Answer

Likely causes → A pre-start step (config test, migration, directory creation) returned non-zero.

Diagnose →

journalctl -u myapp -b --no-pager | tail -30
systemctl cat myapp | grep ExecStartPre

Run the pre-step by hand as the service user.

Fix → Fix the config error it reports (e.g. nginx -t output). If a step is optional, prefix with - (ExecStartPre=-/usr/bin/cleanup) so failure is ignored.

Prevent → Validate config in CI before deploy.

All Linux questions Roadmap: Linux

More on systemd services and journald