Atualizei recentemente de 14.04 a 16.04. Eu tenho o apache2 no meu servidor, mas recentemente notei isso:
fmf@kodi:~$ systemctl is-system-running
degraded
fmf@kodi:~$
Então eu cavo um pouco:
fmf@kodi:~$ systemctl --state=failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● apache2.service loaded failed failed LSB: Apache2 web server
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
fmf@kodi:~$
Então, um pouco mais de escavação:
fmf@kodi:~$ systemctl status -l apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Wed 2016-08-03 14:57:11 CEST; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 3120 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
CGroup: /system.slice/apache2.service
├─3476 /usr/sbin/apache2 -k start
├─3479 /usr/sbin/apache2 -k start
├─3941 /usr/sbin/apache2 -k start
├─3942 /usr/sbin/apache2 -k start
├─3943 /usr/sbin/apache2 -k start
├─3944 /usr/sbin/apache2 -k start
├─3945 /usr/sbin/apache2 -k start
├─3965 /usr/sbin/apache2 -k start
├─3984 /usr/sbin/apache2 -k start
└─3985 /usr/sbin/apache2 -k start
Aug 03 14:56:38 kodi systemd[1]: Starting LSB: Apache2 web server...
Aug 03 14:56:38 kodi apache2[3120]: * Starting Apache httpd web server apache2
Aug 03 14:57:11 kodi apache2[3120]: *
Aug 03 14:57:11 kodi apache2[3120]: * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Aug 03 14:57:11 kodi systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 03 14:57:11 kodi systemd[1]: Failed to start LSB: Apache2 web server.
Aug 03 14:57:11 kodi systemd[1]: apache2.service: Unit entered failed state.
Aug 03 14:57:11 kodi systemd[1]: apache2.service: Failed with result 'exit-code'.
fmf@kodi:~$
O mais estranho é que, se eu tento me conectar à página da web no meu servidor, posso vê-lo. Onde esse erro vem? Tentei verificar os logs do apache2, mas não consigo encontrar nada de estranho nele.
Talvez isso ajude:
fmf@kodi:~$ netstat -antp | grep 80
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 3929/kodi.bin
tcp 0 1 192.168.254.8:47306 144.76.30.184:80 SYN_SENT 3929/kodi.bin
tcp 0 160 192.168.254.8:46574 144.76.30.184:80 ESTABLISHED 3929/kodi.bin
tcp 0 156 192.168.254.8:46836 144.76.30.184:80 ESTABLISHED 3929/kodi.bin
tcp 0 165 192.168.254.8:47268 144.76.30.184:80 ESTABLISHED 3929/kodi.bin
tcp 0 166 192.168.254.8:47232 144.76.30.184:80 FIN_WAIT1 -
tcp 0 165 192.168.254.8:47112 144.76.30.184:80 ESTABLISHED 3929/kodi.bin
tcp 0 1 192.168.254.8:47304 144.76.30.184:80 SYN_SENT 3929/kodi.bin
tcp 0 1 192.168.254.8:47302 144.76.30.184:80 SYN_SENT 3929/kodi.bin
tcp 1 0 192.168.254.8:38502 104.20.56.43:80 CLOSE_WAIT 3176/python
tcp 0 1 192.168.254.8:47292 144.76.30.184:80 SYN_SENT 3929/kodi.bin
tcp 0 166 192.168.254.8:47252 144.76.30.184:80 FIN_WAIT1 -
tcp 0 1 192.168.254.8:47294 144.76.30.184:80 SYN_SENT 3929/kodi.bin
tcp6 0 0 :::8080 :::* LISTEN 3929/kodi.bin
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 192.168.254.8:80 77.108.48.106:61805 TIME_WAIT -
tcp6 0 0 192.168.254.8:80 77.108.48.106:61851 TIME_WAIT -
fmf@kodi:~$
Qualquer ajuda, por favor?
Eu segui o método mostrado no link para fazer o logrotate.d diário rodar exatamente às 00:00. Eu tenho 2 servidores físicos que o Ubuntu 16.04 com a mesma data e fuso horário. O problema é que um servidor gira na 01:00 e o outro na 00:00.
Existe uma explicação para isso?