Failed to restart network.service: Unit not found.

Issues related to configuring your network
Post Reply
olivy
Posts: 7
Joined: 2019/04/01 16:27:17

Failed to restart network.service: Unit not found.

Post by olivy » 2019/05/23 23:33:55

This CentOS 7.5.1804 server has a loopback and ethernet network cards. Upon rebooting the server for maintenance of an unrelated application (OpManager), the network service will not initialize. When attempting to restart network service I get the error:
Failed to restart network.service: Unit not found.
The attachment network-service-failure.PNG is no longer available
Here is the current ifconfig output:
network-service-failure.PNG
network-service-failure.PNG (2.24 KiB) Viewed 748 times
I did not change any network scripts configuration. The ethernet network interface is "ens33"

There is no GUI this server is CLI only.

At one point I was able to manually start the interface making it show up under ifconfig command output, but it is not showing up now. Rebooting does not resolve this issue. Why the network service is crashing after a simple reboot is beyond me... Any ideas?
Attachments
ifconfig-output-1.PNG
ifconfig-output-1.PNG (7.76 KiB) Viewed 748 times

User avatar
TrevorH
Forum Moderator
Posts: 26291
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Failed to restart network.service: Unit not found.

Post by TrevorH » 2019/05/23 23:57:23

Code: Select all

# rpm -qf /etc/init.d/network 
initscripts-9.49.46-1.el7.x86_64
If that file is missing then yum reinstall initscripts
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

olivy
Posts: 7
Joined: 2019/04/01 16:27:17

Re: Failed to restart network.service: Unit not found.

Post by olivy » 2019/05/24 04:12:26

It is and install fails:
yum-install-initscripts.PNG
yum-install-initscripts.PNG (52.29 KiB) Viewed 733 times

User avatar
TrevorH
Forum Moderator
Posts: 26291
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Failed to restart network.service: Unit not found.

Post by TrevorH » 2019/05/24 06:37:56

You need to set up your network interface to be able to connect to the internet to be able to use yum.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

olivy
Posts: 7
Joined: 2019/04/01 16:27:17

Re: Failed to restart network.service: Unit not found.

Post by olivy » 2019/05/24 15:11:15

How do I do that?
Alternatively can I install the software from the install ISO?

User avatar
TrevorH
Forum Moderator
Posts: 26291
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Failed to restart network.service: Unit not found.

Post by TrevorH » 2019/05/24 15:31:48

You can use the iso image if you loopback mount it (or write it to a DVD and have a DVD drive) on one of the mountpoints listed in /etc/yum.repos.d/CentOS-Media.repo (or add your own directory to the list in that file). Then use yum --disablerepo=\* --enablerepo=c7-media reinstall initscripts
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

olivy
Posts: 7
Joined: 2019/04/01 16:27:17

Re: Failed to restart network.service: Unit not found.

Post by olivy » 2019/05/25 00:07:04

Followed these steps:
https://www.itzgeek.com/how-tos/linux/c ... g-dvd.html
By mounting the local repo this way the system would allow me to install initscripts. Reinstall command failed.
Now the ethernet interface came up and I can ping the server.
Thank you for all the help!

Post Reply