Linux Labs

Packages, services, and logs / Stage 7 of 13

Diagnosing a failed service

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 8 · on a machine · 4 min

The service will not start

What you will learn

  • Find the cause of a failure from the service status, the journal of the start attempt and the unit file.
  • Tell systemd failing to start a program from an error in the program itself.
  • Apply a fix and confirm that the service runs and does its job.

Yesterday a report service, lab-worker, was installed on the server. Today starting it ends in an error, and no reports get built. Start the service yourself and see what systemd reports.

Exercise · look

Start lab-worker

Start the lab-worker service, then look at its summary.

Sign in and start The machine is available after signing in
Check yourself 1 question

Why did lab-worker fail to start?

  • You started the service with start, which does not need autostart. The failure happened on the program from the Process line.

  • There is no program called sleeeep on the machine, so there was nothing to start. The sleep program with one e exists: sleep 1 works in the terminal.

  • You started the service with sudo, as root. The summary talks about the program: the Process line shows /usr/bin/sleeeep and an error code.

systemd could not run /usr/bin/sleeeep from the ExecStart line: there is no such program on the machine.

Ubuntu 24.04
Loading…