Service recovery requires more than a successful restart command.
Phase 01 taught you to collect log evidence. Phase 02 taught you to evaluate the service account and access permissions. Phase 03 looks at the next layer: the process, the service manager, its configuration and dependencies, and whether the application actually starts and responds.
JUMP TO SECTION · 0 / 11Start with the introduction
The certificate is readable. Why is the service still down?
The previous phase established that the service account could open its certificate after an approved access correction. This new startup attempt passes the certificate check but exits before becoming active. The startup log reports an invalid application port value. Those are separate failures, and fixing one doesn't guarantee the other is resolved.
The modeled service account can read the approved certificate.
Application configuration validation rejects an invalid LISTEN_PORT value.
Start with systemctl status for an overview, then look at the journal and effective service definition. The correct next question is what failed this time, not what fixed the previous incident.
A log message is evidence of an observed operation, not automatic permission to change security settings. Keep hypotheses, proposed action and verified results separate.
Find the right process before changing anything.
A Linux process has a PID, parent PID, user/group credentials, command line, state and resource usage. A service manager can supervise that process, restart it after failure or track its exit status, but the process and its unit file are not the same thing.
ps -eo pid,ppid,user,stat,cmdReview process identityInspect PIDs, parent relationships, users, states and commands.
topCheck current resource demandObserve CPU, memory and active tasks before deciding whether resource contention matters.
pgrep -a northstar-webFind candidate PIDsMatch process names and inspect commands. Verify you have the correct process.
ss -ltnpInspect listening socketsCorrelate local TCP ports with owning processes where permissions allow.
Signals deserve care. SIGTERM requests a graceful stop where supported; SIGKILL forcibly terminates without normal cleanup. Do not start with kill -9 or forcefully stop an unrelated process just because it owns a port. Identify its owner, purpose and operational impact first.
A service configured with Restart=on-failure may repeatedly crash until rate limits prevent further starts. Adjusting restart delays or clearing a failed state doesn't correct an invalid configuration or an occupied port.
Active, enabled, disabled and masked mean different things.
On many modern distributions, systemd coordinates service processes and other unit types. The [Unit], [Service] and [Install] sections describe dependencies, execution and activation settings. Important directives include User, ExecStartPre, ExecStart, Environment and Restart.
The unit is active; the application and client path still require separate validation.
The unit is not currently active. For an exited oneshot job, this may be normal.
A start or runtime operation reported failure; inspect its result, exit status and journal.
A unit is configured for automatic activation; it may still be failed or inactive now.
Not enabled through install links, but may be started manually or as a dependency.
Intentionally blocked from activation; investigate maintenance or security holds before changing it.
systemctl start, stop and restart affect the current unit state. enable and disable manage installation/activation links and do not by themselves establish service health. A masked unit is deliberately blocked from activation; investigate the reason before removing the mask.
systemctl status northstar-web --no-pagerReview unit status, failed process exits and recent log lines.
systemctl is-active northstar-web.serviceCheck current active state; enablement is a separate question.
systemctl is-enabled northstar-web.serviceCheck installation/start-on-boot policy; enabled does not mean running.
journalctl -u northstar-web -b -n 30 --no-pagerRead 30 recent journal entries for the unit from the current boot.
systemctl cat northstar-web.serviceInspect the unit definition and drop-ins on disk.
systemctl show northstar-web -p NeedDaemonReload -p ExecStartExamine the unit definition known to the manager and whether it needs reloading.
Use journalctl instead of guessing.
systemd-journald collects structured events from compatible services and the kernel. journalctl -u UNIT selects a unit; -b selects the current boot; -n 30 limits the number of recent records. --since and --until can narrow a maintenance window. Log permissions and retention may limit what you can inspect.
$ journalctl -u northstar-web -b -n 15 --no-pager09:05:14 northstar-web: Certificate read check: PASS 09:05:15 northstar-web: Invalid LISTEN_PORT 'eighty-eighty' 09:05:15 systemd[1]: ExecStartPre exited with status 2 09:05:15 systemd[1]: Failed to start Northstar intranet
Correlate times with the last configuration or package change. Journal lines may identify the failing operation, but they don't necessarily prove the entire root cause. Missing journal records do not establish that an event never happened; the journal may be volatile, rotated or inaccessible to your account.
Read the journalctl manual ↗Requires= and After= serve different purposes.
Wants= pulls in a weaker dependency, while Requires= expresses a stronger requirement when a unit is activated. After= expresses ordering, not a requirement by itself. Combining Requires= with After= may block a dependent unit's activation when the required ordered unit fails to start.
When a required unit is masked intentionally, the right response isn't an automatic unmask or rewriting the dependency graph. Preserve the hold, identify the owner, document the failing dependency, and request authorization before changes. A justified escalation is an appropriate troubleshooting outcome even though the original application remains unavailable.
Other unit relationships such as BindsTo=, PartOf= and Conflicts= have their own semantics. Avoid assuming that all dependencies imply continuous health or automatic recovery.
Understand which configuration layer you changed.
systemctl reload UNITApplication-level reloadRequests a service-supported configuration reload; it does not make systemd re-read edited unit definitions.
systemctl daemon-reloadManager/unit reloadRe-reads systemd unit files and drop-ins, but does not by itself restart running application processes.
systemctl restart UNITNew service processStops then starts according to the loaded unit. Coordinate downtime and verify the new instance.
systemctl show UNIT -p NeedDaemonReloadManager metadata checkCheck whether the unit files on disk differ from the manager's currently loaded definition.
After editing an application configuration, validate the syntax using an application-specific check before a controlled reload/restart. After editing a unit drop-in under /etc/systemd/system/, review systemctl cat and the manager's effective properties, then use daemon-reload and an approved restart if the updated ExecStart must take effect.
Preserve the prior configuration, identify dependencies and affected users, establish rollback criteria, obtain authorization, and verify health after the change. A successful command exit code is not proof of restored service.
Package maintenance changes runtime behavior.
Linux distributions use package managers and repositories to distribute applications, libraries and security fixes. Debian/Ubuntu commonly use APT; many Red Hat-derived environments use DNF and RPM. Package updates can affect binaries, dependencies, service definitions and required restarts. Match your commands to the installed distribution.
apt updateRefresh the Debian/Ubuntu repository package index; it doesn't itself install upgrades.
apt list --upgradableInspect available upgrades before an approved maintenance window.
apt-cache policy PACKAGECheck available versions, candidate selection and repository origin.
apt upgradeApply permitted package upgrades, potentially affecting running services.
dnf check-updateCheck for updates on a supported DNF-based distribution.
dnf info PACKAGEInspect installed and candidate package metadata.
On Ubuntu, apt update refreshes index metadata whereas apt upgrade installs permitted upgrades. For scripts, Ubuntu generally recommends apt-get rather than interactive apt. A production change should review affected versions, package origins, dependencies, maintenance approvals, backup state and rollback options first.
If a service begins failing after patching, compare the change record, package history and journal evidence before attempting a downgrade. Never assume that another broad update will fix a version mismatch.
Ubuntu Server package management ↗Timers and cron need their own verification.
Linux supports cron schedules and systemd timers. A .timer unit schedules an associated service; the service performs the work. An enabled timer can fail to run when expected, or it may trigger successfully while the service itself exits with an error.
systemctl list-timers --allInspect schedule stateCompare last/next triggers and the unit each timer activates.
systemctl status northstar-job.timerReview timer activityCheck whether the timer is active and when its most recent trigger occurred.
journalctl -u northstar-job.serviceCheck execution resultsRead the actual job service's logs and success/failure outcome.
crontab -lReview a user's cron entriesList the current user's crontab; system cron and other users may be separate.
Scheduled work needs approved credentials, predictable environment and working directories, resource controls, idempotence where practical, and failure monitoring. Timer enablement is not evidence of a successful backup or task. We'll study backups, recovery and monitoring in Phase 05.
Diagnose, correct, and independently verify.
The investigations include a failed startup preflight, a masked dependency, a port conflict, and a stale unit definition after a reviewed drop-in change. Each asks you to inspect four evidence sources, justify the safest response, apply simulated steps in order and run two validation checks. No real Linux commands are executed.
Northstar Service Recovery Workbench
Investigate systemd evidence, plan a justified response, apply a scoped simulated change, then separately verify the result.
Configuration passes access checks, but service still fails
Following the Phase 02 permission correction, northstar-web can read its TLS certificate. A new startup check now exits before the application becomes active.
Output is fictional and prewritten. Clicking an inspection does not run a command.
Configuration validator exits 2: invalid LISTEN_PORT.
Read the other sources before inferring a cause.Inspect all four evidence sources to unlock the decision.
Can you choose the correct administrative evidence?
These six decisions reinforce runtime state, dependencies, journal filtering, package maintenance and timer operations. Revise answers after reading the explanation rather than memorizing a single command.
A service that starts still needs an application test.
You've investigated three narrowly scoped simulated recoveries and one intentionally masked dependency that requires an owner's decision. Successful local checks are a starting point; external clients, upstream routing and sustained reliability may need further verification.
Confirm owner, process, loaded definition and expected state.
Use timestamps, configuration and return codes to test hypotheses.
Handle application configuration, unit overrides and dependencies differently.
Check active state, local endpoint, monitoring clients and rollback criteria.
Linux Networking & Storage
Next we'll investigate IP addressing, routing, DNS, firewalls, listening services, disks, filesystems, persistent mounts and LVM. A locally healthy process can still be unreachable or unable to access data.
Continue to Phase 04 — Linux Networking & Storage →Read the lesson before starting the Northstar workbench. Each investigation requires evidence, a justified action and separate validation.
