the problem is not really in the log file produced by journalctl, the problem is in the 'boot screen', when systemd prints the status of each unit service, the current design is not suitable for the use case 'Restart=on failure',
Why did we have to go to 'systemctl restart network.service' which doesn't work either?! Code: Select all # systemctl restart network.service. Unit network.service entered failed state Why is this failing and what do I have to do to troubleshoot it? I really do not find this helpful: Code: Select all.
for example if a unit service has this option :
[Service]
Restart=on-failure
RestartSec=1
and if this unit service fails to start the first time then systemd will print on boot at screen :
[FAILED]
the correct behaviour ( when an unit service is configured with 'Restart=on failure' ) would be to print at first [Restarting unit] when the unit fails to start at the first attempt, then if the restart works with a zero exit code then systemd should print [OK] or [restarted OK], the [FAILED] message should occur only if the retries fail,
if I check the journalctl log I can see this ( the unit service name is : [email protected] ( A basic static ethernet connection ) :
janv. 24 09:37:56 ultima-dbr systemd[1]: Starting A basic static ethernet connection...
janv. 24 09:37:57 ultima-dbr network[475]: Starting network profile 'mynetwork'...
janv. 24 09:37:57 ultima-dbr kernel: r8169 0000:05:00.0 enp5s0: link down
janv. 24 09:37:57 ultima-dbr kernel: r8169 0000:05:00.0 enp5s0: link down
janv. 24 09:37:57 ultima-dbr kernel: IPv6: ADDRCONF(NETDEV_UP): enp5s0: link is not ready
janv. 24 09:38:02 ultima-dbr network[475]: No connection found on interface 'enp5s0' (timeout)
janv. 24 09:38:02 ultima-dbr network[475]: Failed to bring the network up for profile 'mynetwork'
janv. 24 09:38:02 ultima-dbr systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
janv. 24 09:38:02 ultima-dbr systemd[1]: [email protected]: Failed with result 'exit-code'.
janv. 24 09:38:02 ultima-dbr systemd[1]: Failed to start A basic static ethernet connection.
janv. 24 09:38:02 ultima-dbr systemd[1]: Reached target Network.
janv. 24 09:38:02 ultima-dbr systemd[1]: Starting Samba SMB/CIFS server...
janv. 24 09:38:02 ultima-dbr systemd[1]: Starting Permit User Sessions...
janv. 24 09:38:02 ultima-dbr systemd[1]: Started Permit User Sessions.
janv. 24 09:38:02 ultima-dbr systemd[1]: Started Simple Desktop Display Manager.
janv. 24 09:38:03 ultima-dbr systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
janv. 24 09:38:03 ultima-dbr systemd[1]: [email protected]: Scheduled restart job, restart counter is at 1.
janv. 24 09:38:03 ultima-dbr systemd[1]: Stopped A basic static ethernet connection.
janv. 24 09:38:03 ultima-dbr systemd[1]: Starting A basic static ethernet connection...
janv. 24 09:38:03 ultima-dbr network[535]: Starting network profile 'mynetwork'...
janv. 24 09:38:03 ultima-dbr kernel: r8169 0000:05:00.0 enp5s0: link down
janv. 24 09:38:03 ultima-dbr kernel: r8169 0000:05:00.0 enp5s0: link down
janv. 24 09:38:03 ultima-dbr kernel: IPv6: ADDRCONF(NETDEV_UP): enp5s0: link is not ready
janv. 24 09:38:03 ultima-dbr sddm[534]: Initializing...
janv. 24 09:38:04 ultima-dbr sddm[534]: Logind interface found
janv. 24 09:38:04 ultima-dbr sddm[534]: Starting...
janv. 24 09:38:04 ultima-dbr sddm[534]: Adding new display on vt 1 ...
janv. 24 09:38:04 ultima-dbr sddm[534]: Loading theme configuration from '
janv. 24 09:38:04 ultima-dbr sddm[534]: Display server starting...
janv. 24 09:38:04 ultima-dbr sddm[534]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{9cc84886-15bd-496a-a73d-5290c7a96c99} -background none -noreset -displayfd 17 -seat seat0 vt1
janv. 24 09:38:05 ultima-dbr kernel: r8169 0000:05:00.0 enp5s0: link up
janv. 24 09:38:05 ultima-dbr kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp5s0: link becomes ready
janv. 24 09:38:06 ultima-dbr systemd[1]: Started Samba SMB/CIFS server.
janv. 24 09:38:06 ultima-dbr systemd[1]: Started A basic static ethernet connection.
here all seem coherent, but not on boot screen, the message [FAILED] can led to confusion and misunderstanding ( because the service has not really failed because the restarting worked as expected, with a zero exit code ), the improvement here would to be to track the result of the restart process by printing on boot screen information like [Restart], then [OK] if the restart attempts succeed, or [FAILED] if all attemps fail
you can find the journalctl log as attached file
systemd_netctl.log
I have similiar problems on CentOS 7.4 here since tonight. It is on a production server
[root@ms1 log]# journalctl | grep rsys
Nov 29 10:20:58 ms1.p.tomgugel.com systemd[1]: rsyslog.service start operation timed out. Terminating.
Nov 29 10:20:58 ms1.p.tomgugel.com systemd[1]: Unit rsyslog.service entered failed state.
Nov 29 10:20:58 ms1.p.tomgugel.com systemd[1]: rsyslog.service failed.
Nov 29 10:20:58 ms1.p.tomgugel.com systemd[1]: rsyslog.service holdoff time over, scheduling restart.
... excluded messages all 1.5 minutes
Nov 29 10:36:03 ms1.p.tomgugel.com systemd[1]: rsyslog.service start operation timed out. Terminating.
Nov 29 10:36:03 ms1.p.tomgugel.com systemd[1]: Unit rsyslog.service entered failed state.
Nov 29 10:36:03 ms1.p.tomgugel.com systemd[1]: rsyslog.service failed.
Nov 29 10:36:03 ms1.p.tomgugel.com systemd[1]: rsyslog.service holdoff time over, scheduling restart.
This is from journalctl -xe
Nov 29 10:40:34 ms1.p.tomgugel.com systemd[1]: rsyslog.service start operation timed out. Terminating.
Nov 29 10:40:34 ms1.p.tomgugel.com systemd[1]: Failed to start System Logging Service.
The server was also rebooted a few minutes ago that did not solve a problem. Rsyslog config files weren't changed also
Nov 29 10:40:34 ms1.p.tomgugel.com systemd[1]: Failed to start System Logging Service.
Subject: Unit rsyslog.service has failed
Defined-By: systemd
Unit rsyslog.service has failed.
The result is failed.
Nov 29 10:40:34 ms1.p.tomgugel.com systemd[1]: Unit rsyslog.service entered failed state.
Nov 29 10:40:34 ms1.p.tomgugel.com systemd[1]: rsyslog.service failed.
Nov 29 10:40:34 ms1.p.tomgugel.com systemd[1]: rsyslog.service holdoff time over, scheduling restart.
Nov 29 10:40:34 ms1.p.tomgugel.com systemd[1]: Starting System Logging Service...
Subject: Unit rsyslog.service has begun start-up
Defined-By: systemd
Unit rsyslog.service has begun starting up.