How to find out the cause of a stop of the service in systemd?

There is a service which logs the following:

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


How to determine why the service was stopped ?
June 26th 19 at 14:16
2 answers
June 26th 19 at 14:18
see logs of the application itself. try to run it first without the service.
There are no errors.
I'm interested in what you have initialized the stop of the service. - nikita.Stracke commented on June 26th 19 at 14:21
: watch this https://wiki.archlinux.org/index.php/Systemd#Inves...

I have not tried - Roger99 commented on June 26th 19 at 14:24
: alas, no - nikita.Stracke commented on June 26th 19 at 14:27
June 26th 19 at 14:20
My problem I decided digging in the audit logs, found out that the reason for the stop was a stop mariadb.service.

Config app was:

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


After cutting out "Requires=mariadb.service" service stopped is stopped immediately after a stop mariadb.
Maybe someone will help.
journalctl -u nazvaniya -x - nikita.Stracke commented on June 26th 19 at 14:23
:

-- Subject: unit Starts the stop host.service
-- Defined-By: systemd
-- Support: <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a>
-- 
-- Started the process of stopping a unit host.service.
may 11 08:32:39 host.local systemd[1]: Stopped Site host.ru.
-- Subject: Complete stop of the unit host.service.
-- Defined-By: systemd
-- Support: <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a>
-- 
-- The process of stopping a unit host.service was completed.


It is unclear what caused the stop. - Roger99 commented on June 26th 19 at 14:26

Find more questions by tags Linux