Virtual machine error: Job for network.service failed because the control process exited with error code

1. Error:
today, I turned on the virtual machine to start a big data cluster. Because I didn’t turn on the machine for some time, I found that I couldn’t connect to the Internet after turning on the machine. After ifconfig, I didn’t even have an IP address:

2. Solution:
there are many opinions on the Internet. Most of them are to reconfigure the static IP of VI/etc/sysconfig/network scripts/ifcfg-ens33. In fact, the network card does not work. Finally, only one method works:

3 directives:

3. Reason:
on CentOS system, there are two network management tools, NetworkManager and network. Both configurations can cause conflicts. Generally, we use network to configure static IP. It may be that the shutdown (for some reason) causes the automatic configuration of NetworkManager, resulting in a conflict, so it’s good to disable it.

Temporary shutdown
systemctl stop NetworkManager
permanent shutdown
systemctl disable NetworkManager
systemctl restart network

Similar Posts: