Skip to content

VPS

Diagnosing a Linux Service That Will Not Start

Use systemd status and the service journal to find the first failure before changing restart settings.

systemdServicesStartup
Reading time
2 min read
Published
Updated
Maintained by
EnderHost Team

For a systemd-managed service, inspect its status and recent journal before restarting it repeatedly. The earliest application error usually explains more than the final “failed” state. These commands apply to Linux systems using systemd, not every managed hosting container.

Read the failure without changing it

systemctl --failed
systemctl status example.service --no-pager -l
sudo journalctl -u example.service -b -n 100 --no-pager

Replace example.service with the actual unit name. The journal command shows up to 100 records for that service from the current boot. Inspect locally and redact secrets before sharing output; application logs may include request details.

Common failure clues
ClueCheck
Executable not foundConfigured command and installed runtime path
Permission deniedService user and access to the named file
Address already in useAnother process listening on the configured port
Missing configurationWorking directory and expected environment
No space leftFilesystem capacity and inode availability

Check the service environment

A command that works in your interactive shell may fail under a different user or working directory. Shell profile settings are not automatically the service’s configuration. Compare the executable path, readable files and required environment with the unit definition.

  1. Save the current unit and application configuration.
  2. Identify one specific failure and correct its cause.
  3. If the unit definition changed, reload systemd’s unit configuration.
  4. Restart only the affected service during an appropriate window.
  5. Check fresh logs and make a real request to the application.

Confirm sustained operation

An active process can still be unhealthy. Verify its expected listener, dependency connections and user-facing behavior. Check again after the usual failure interval. Increasing restart frequency or clearing a failure state does not fix the underlying error.

Use disk-full diagnostics for storage errors and VPS monitoring to catch recurrence.

Sources and references

Hosting documentation. Publication and update dates reflect this edition.

Related articles

Related topics

Hardware we trust. Software you know.

PREPARING YOUR EXPERIENCE