Page 1 of 1
Failed to restart network.service: Unit not found.
Posted: 2019/05/23 23:33:55
by olivy
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 (2.24 KiB) Viewed 34273 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?
Re: Failed to restart network.service: Unit not found.
Posted: 2019/05/23 23:57:23
by TrevorH
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
Re: Failed to restart network.service: Unit not found.
Posted: 2019/05/24 04:12:26
by olivy
It is and install fails:
- yum-install-initscripts.PNG (52.29 KiB) Viewed 34258 times
Re: Failed to restart network.service: Unit not found.
Posted: 2019/05/24 06:37:56
by TrevorH
You need to set up your network interface to be able to connect to the internet to be able to use yum.
Re: Failed to restart network.service: Unit not found.
Posted: 2019/05/24 15:11:15
by olivy
How do I do that?
Alternatively can I install the software from the install ISO?
Re: Failed to restart network.service: Unit not found.
Posted: 2019/05/24 15:31:48
by TrevorH
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
Re: Failed to restart network.service: Unit not found.
Posted: 2019/05/25 00:07:04
by olivy
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!
Re: Failed to restart network.service: Unit not found.
Posted: 2021/06/18 03:00:46
by Windows
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 ?
Re: Failed to restart network.service: Unit not found.
Posted: 2021/06/18 06:39:34
by jlehtone
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.