Often, after changing the static IP under centOS 7, someone would find that the network service could not be restarted, so they searched the network, tried various methods and finally solved the problem.
is now a summary of various solutions, I hope to let you walk less crooked road.
First things first:
After executing the Service Network Restart command, the following error occurs:
Restarting network (via systemctl): Job for network. Service failed because the control process exited with error code.
See “systemctl status network. Service” and “journalctl-xe” for details.
systemctl status network. Service command, the following error message appears:
network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: failed (Result: exit-code) since 三 2018-09-05 13:01:47 CST; 1min 16s ago Docs: man:systemd-sysv-generator(8) Process: 4681 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE) CGroup: /system.slice/network.service └─1192 /sbin/dhclient -H mini1 -1 -q -lf /var/lib/dhclient/dhclient--ens33.lease -pf /v... 9月 05 13:01:47 mini1 network: RTNETLINK answers: File exists 9月 05 13:01:47 mini1 network: RTNETLINK answers: File exists 9月 05 13:01:47 mini1 network: RTNETLINK answers: File exists 9月 05 13:01:47 mini1 network: RTNETLINK answers: File exists 9月 05 13:01:47 mini1 network: RTNETLINK answers: File exists 9月 05 13:01:47 mini1 network: RTNETLINK answers: File exists 9月 05 13:01:47 mini1 systemd: network.service: control process exited, code=exited status=1 9月 05 13:01:47 mini1 systemd: Failed to start LSB: Bring up/down networking. 9月 05 13:01:47 mini1 systemd: Unit network.service entered failed state. 9月 05 13:01:47 mini1 systemd: network.service failed.
The network service cannot be started!! First of all, make sure that ifCFg-XXX (each machine is not the same) in /etc/sysconfig/network-scripts directory is free of errors (if you have made any changes), which refer to things like typing the wrong letters by hand during the change process.
The most common methods on the Internet are as follows:
1, and the NetworkManager service conflict, directly close the NetworkManager service, service NetworkManager stop, and forbid starting chkconfig NetworkManager off, finally restart it.
2. If it does not match the MAC address of the configuration file, use IP ADDR (or IFconfig) to check the MAC address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:b8:e7:21 brd ff:ff:ff:ff:ff:ff inet 192.168.65.141/24 brd 192.168.65.255 scope global dynamic ens33 valid_lft 1193sec preferred_lft 1193sec inet6 fe80::cca2:d835:f93:e637/64 scope link valid_lft forever preferred_lft forever
00:0 C :29:b8:e7:21 is the MAC address, change HWADDR in /etc/sysconfig/ net-scripts/ifCFg-XXX to this MAC address
3. Set up and start a service named
networkmanager-waiting-online . The command is:
systemctl enable networkmanager-waiting-online-service
/etc/sysconfig/network - scripts code>, will the rest of the network card position papers all deleted, avoid unnecessary influence, is only a file, starting with ifcfg leave that one should use IP addr command to check the IP the second identical at the beginning of (see above for my ens33, I posted the IP addr command execution results), so I only left a ifcfg - ens33. (That's how two of my machines worked, because I made a backup before changing it, so just delete it...)
5. Comment out the DEVICE line in IFCFG-XXX file.
6. Change the NAME in IFCFG-XXX to be the same as the file NAME.
7. Change the network mode to bridge in VMWare edit-Virtual Network Editor.
8. Check whether the network adapter at the bottom right corner of VMWare is connected or not. If it is not connected, it will be connected.
(note: click the network adapter - Settings, and try to change the NAT mode to bridge. After I changed the bridge mode, I could restart the network service, but I could not connect to the network. After restarting,
and then change the bridge mode to NAT mode, and I found that I could both surf the Internet and restart the network service.)
9. Check to see if VMware DHCP Service and VMware NAT Service are disabled on your computer. If so, turn them on.
10. If you change to static IP don't forget to change BOOTPROTO to static.
11,, if the above is not resolved, there is a final move - restart to see if there is a miracle!! (A lot of times you just restart it.)
I have tried almost all of the above methods, some of which are useful or not useful for my machine, but some people have solved them with these methods, and recorded them together for future use
- CentOS 8.1 solution to error in executing #systemctl restart network.service
- Solution summary of VMware network card without IP and failure to start network card (continuous update)
- Debian using networking to restart the network can not start the solution of network card
- Linux virtual machine network “job for” network.service failed because the control process exited with error code”
- nt service 1072 No need to restart, repeat the method of installing the service program or service driver
- php_ network_ Getaddresses: getaddressinfo failed: name or service not known solution
- Centos7 network is unreachable
- Job for network.service Failed because the control process exited with error code. See “SystemC
- Modify samba configuration, restart service failed
- Docker service start, restart, close command
- Failed to restart ssh.service: Unit not found.
- Connection authorization failure occurred. Reason: local security service non retryable error solution
- Solution to the problem of failure to elect leaders when offline service is reported in Nacos
- Solve the problem of ATA bus error after centos7 restart
- Centos7 executes the command service mysqld start and prompts Failed to start mysqld.service: Unit mysqld.service not loaded
- The most complete collection of solutions to Tortoise SVN Clean up failure
- centos nagios CHECK_NRPE: Error – Could not complete SSL handshake
- Wireless network solution of deepin Linux network card driver (manual) installation
- Centos7 solves the problem of unable to use tab to complete automatically
- Centos6 suddenly cannot access the network VM communication interface socket family: failed