Um serviço morre e eu só fico sabendo, percebendo que algo está quebrado. Eu tenho certeza que isso está acontecendo mais desde a atualização do Debian 8 que trouxe o systemd, embora eu não esteja totalmente certo que o systemd seja o culpado.
Não tenho certeza se o init anteriormente apenas reiniciou as coisas que morreram e o systemd não.
O sintoma é systemctl status foo.service
mostra coisas como ativo (saída) ou algo assim.
Existe uma maneira de notar uma mudança no status dos serviços gerenciados do systemd? E / ou tentar reativar algumas vezes?
(Sou novo no systemd.)
Veja um exemplo: Stunnel parou. Veja o que fiz para que funcionasse novamente:
root@server:/root# systemctl status stunnel4
● stunnel4.service - LSB: Start or stop stunnel 4.x (SSL tunnel for network daemons)
Loaded: loaded (/etc/init.d/stunnel4)
Active: active (exited) since Sun 2016-05-01 07:03:54 BST; 2 days ago
Process: 13443 ExecStop=/etc/init.d/stunnel4 stop (code=exited, status=0/SUCCESS)
Process: 13455 ExecStart=/etc/init.d/stunnel4 start (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@server:/root# systemctl stop stunnel4
root@server:/root# systemctl status stunnel4
● stunnel4.service - LSB: Start or stop stunnel 4.x (SSL tunnel for network daemons)
Loaded: loaded (/etc/init.d/stunnel4)
Active: inactive (dead) since Tue 2016-05-03 10:00:10 BST; 947ms ago
Process: 13006 ExecStop=/etc/init.d/stunnel4 stop (code=exited, status=0/SUCCESS)
Process: 13455 ExecStart=/etc/init.d/stunnel4 start (code=exited, status=0/SUCCESS)
May 03 10:00:10 servername stunnel4[13006]: Stopping SSL tunnels: stunnel.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
✗ Error in last command
root@server:/root# systemctl start stunnel4
root@server:/root# systemctl status stunnel4
● stunnel4.service - LSB: Start or stop stunnel 4.x (SSL tunnel for network daemons)
Loaded: loaded (/etc/init.d/stunnel4)
Active: active (running) since Tue 2016-05-03 10:00:18 BST; 1s ago
Process: 13006 ExecStop=/etc/init.d/stunnel4 stop (code=exited, status=0/SUCCESS)
Process: 13031 ExecStart=/etc/init.d/stunnel4 start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/stunnel4.service
└─13044 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
May 03 10:00:18 servername stunnel4[13031]: Starting SSL tunnels: [Started: /etc/stunnel/stunnel.conf] stunnel.
Os únicos registros que posso encontrar parecem ser uma reinicialização:
syslog.2.gz:May 1 07:03:54 pap1 stunnel4[13443]: Stopping SSL tunnels: [stopped: /etc/stunnel/stunnel.conf] stunnel.
syslog.2.gz:May 1 07:03:54 pap1 stunnel4[13455]: Starting SSL tunnels: [Already running: /etc/stunnel/stunnel.conf] stunnel.
parece que falhou. Não consigo entender por que a reinicialização ocorreu ( outra pergunta no systemd ) nem por que ela falhou .
Tags systemd debian-jessie