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 33335 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 33335 times

User avatar
TrevorH
Site Admin
Posts: 33191
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
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
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 33320 times

User avatar
TrevorH
Site Admin
Posts: 33191
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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
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
Site Admin
Posts: 33191
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
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
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!

Windows
Posts: 59
Joined: 2021/06/16 13:20:01

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

Post by Windows » 2021/06/18 03:00:46

TrevorH wrote:
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.
how we can check if the network interface is OK before of restart ?

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

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

Post by jlehtone » 2021/06/18 06:39:34

Windows wrote:
2021/06/18 03:00:46
how we can check if the network interface is OK before of restart ?
There are two parts:
* Configuration used by services is stored in files. It must be in proper syntax that the service reads.
There were GUI/TUI tools, where you set/select options and the tool writes files in correct syntax.
* Logical network configuration. No tool can tell whether the logic is valid. However, ...

It is very common to define the logic of the entire subnet in one server and set all client machines to
load their configuration from that server at boot. That is DHCP.

Post Reply