8
8
80h2017-05-11 06:04:01
linux
80h, 2017-05-11 06:04:01

How to find out the reason for stopping a service in systemd?

There is a service that has the following in the logs:

май 10 22:40:01 host.local systemd[1]: Stopping Site test.ru...
май 10 22:40:01 host.local systemd[1]: Stopped Site test.ru.
май 11 05:46:47 host.local systemd[1]: Started Site test.ru.
май 11 05:46:47 host.local systemd[1]: Starting Site test.ru...

How to determine for what reason the service was stopped?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alex maslakoff, 2017-05-11
@teke_teke

look at the logs of the application itself. try running it first without the service.

8
80h, 2017-05-11
@80h

I solved my problem - by digging in the audit logs, I found out that the reason for the stop was the stop of mariadb.service.
The application config was:

[Unit]
Description=Site host
After=httpd.service
After=mariadb.service
Requires=mariadb.service
....

After cutting out "Requires=mariadb.service" the service stopped stopping immediately after mariadb was stopped.
Maybe someone will help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question