root@leopard # systemctl start network.service Failed to start network.service: Unit network.service not found. The problem is that Fedora would not create a new unit file to support the network service. That's not how systemd unit files are supposed to work. It should be in /etc/systemd/system and symlinked into the.wants directory. And better yet would be to use the tools such as systemctl enable. – Patrick May 21 '18 at 12:33.
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',
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 was trying to configure a static IP address on my Linux machine (Fedora 19 ). However when I was trying to restart my network.services using systemctl restart network.service, I was unable to do so.
[root@xyz network-scripts]# systemctl restart network.service Job failed. See system journal and 'systemctl status' for details.
I tried to reboot my system and re execute the command, but still I am getting the same error. Also I am enable to access internet on my system.
Can anyone help me out with this.
coolDude
coolDude
11311 gold badge33 silver badges1212 bronze badges
1 Answer
To restart network services, you can use this command
You can also use
then
Ashish SinghalAshish Singhal
Not the answer you're looking for? Browse other questions tagged linuxnetworkingfedora or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |