Grading Checklist¶
- Uses
journalctl -u data-sync --no-pager -n 50to read service logs and identify the exit reason. - Examines the systemd unit file to understand the service configuration.
- Identifies the root cause: missing environment variable or config file that exists in dev but not in prod.
- Explains the
start-limit-hitmechanism: systemd stops restarting afterStartLimitBurstattempts withinStartLimitIntervalSec. - Shows how to reset the failure counter:
systemctl reset-failed data-sync. - Explains the difference between the service running as root (manual) vs. a service user (systemd).
- Checks for permission issues: file access, port binding, directory creation.
- Recommends using
systemd-analyze verifyto check the unit file for errors. - Suggests adding
RestartSec=5sto add delay between restarts and avoid hitting the rate limit so quickly. - Mentions debugging with
systemd-runto test the exact environment systemd provides. - Notes that
Environment=orEnvironmentFile=in the unit file is needed for production config. - Recommends checking
Type=is correct (simple, forking, notify, etc.) for the application's behavior.