systemd가 서비스를 다시 시작하는 이유를 어떻게 알 수 있습니까?

systemd가 서비스를 다시 시작하는 이유를 어떻게 알 수 있습니까?

imuxsock을 사용하여 로그의 메시지를 수락하는 rsyslog를 실행하는 호스트가 있습니다. 그러나 부팅 중에 rsyslog가 시작된 후 systemd에 의해 다시 시작(중지 및 시작)됩니다. systemd가 왜 이런 일을 하는지 알아야 합니다.

systemd가 서비스를 다시 시작하게 된 원인을 어떻게 알 수 있나요?(이 경우 초기 부팅 직후)

로깅 시작과 rsyslog 시작 사이에 1분 정도 차이가 있고 rsyslog에 커널 메시지만 표시되고 사용자 공간 메시지는 표시되지 않는 문제에 직면했습니다. 그러나 rsyslog 시작 시간 이후에도 사용자 공간 메시지가 표시됩니다. 예상치 못한 재부팅이 그것과 관련이 있을 수 있다고 생각합니다.

Restart=on-failure내 서비스 파일에 " "이(가) 있습니다.

다음은 재부팅 이유에 대한 단서를 제공하지 않는 내 호스트의 로그입니다.

host_1:/home/admin# journalctl -u rsyslog --no-pager
-- Logs begin at Thu 2019-10-24 15:01:58 UTC, end at Thu 2019-10-24 17:20:37 UTC. --
Oct 24 15:03:25 host_1 rsyslogd[5332]: environment variable TZ is not set, auto correcting this to TZ=/etc/localtime  [v8.36.0 try http://www.rsyslog.com/e/2442 ]
Oct 24 15:03:25 host_1 rsyslogd[5332]: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd.  [v8.36.0]
Oct 24 15:03:25 host_1 rsyslogd[5332]:  [origin software="rsyslogd" swVersion="8.36.0" x-pid="5332" x-info="http://www.rsyslog.com"] start
Oct 24 15:03:25 host_1 systemd[1]: Starting System Logging Service...
Oct 24 15:03:25 host_1 systemd[1]: Started System Logging Service.
Oct 24 15:03:26 host_1 systemd[1]: Stopping System Logging Service...
Oct 24 15:03:26 host_1 rsyslogd[5332]:  [origin software="rsyslogd" swVersion="8.36.0" x-pid="5332" x-info="http://www.rsyslog.com"] exiting on signal 15.
Oct 24 15:03:26 host_1 systemd[1]: Stopped System Logging Service.
Oct 24 15:03:26 host_1 systemd[1]: Starting System Logging Service...
Oct 24 15:03:26 host_1 rsyslogd[6201]: environment variable TZ is not set, auto correcting this to TZ=/etc/localtime  [v8.36.0 try http://www.rsyslog.com/e/2442 ]
Oct 24 15:03:26 host_1 systemd[1]: Started System Logging Service.
Oct 24 15:03:26 host_1 rsyslogd[6201]: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd.  [v8.36.0]
Oct 24 15:03:26 host_1 rsyslogd[6201]:  [origin software="rsyslogd" swVersion="8.36.0" x-pid="6201" x-info="http://www.rsyslog.com"] start

관련 정보