The lab-demo reporting service failed overnight, and in the morning a colleague fixed it and writes: "Everything works." Check how its last run ended and what the journal recorded about it.
The service state and its journal
Find out how the last run of lab-demo.service ended, and read that service's journal.
First, predict
The service's last run succeeded. What will its journal hold?
Now start the exercise, run the command and compare your prediction with the output.
Why is there an error in the journal of a service whose last run succeeded?
-
Resultdescribes the last run. After the error the journal shows a second run withreport-ready mode=training, and that one succeeded. -
There was a restart: after the error the journal shows a second run,
startandreport-ready mode=training. -
journalctlreads the journal. systemd and thelab-demoprogram wrote the lines at the time of the runs, earlier than your command.
The journal keeps the records of every run of the service, and the first of them ended in failure.