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
- VirtualBox Failed to start LSB:Bring up/down Networking problem
- Linux virtual machine network “job for” network.service failed because the control process exited with error code”
- Job for network.service Failed because the control process exited with error code. See “SystemC
- Solution summary of VMware network card without IP and failure to start network card (continuous update)
- Failed to start Remote desktop service (VNC)
- Nginx start error: job for nginx.service failed because the control process exited with error code
- Solution to error 2002 (HY000) in MySQL login startup
- CentOS 8.1 solution to error in executing #systemctl restart network.service
- Error:Connection activation Failed: no suitable device found for this connection solution
- Keepalived add service self-start error analysis [How to Solve]
- Solution: the network can be recovered only when the Ubuntu broadband is disconnected
- Raspberry Pi 3 installation and software configuration issues collection
- Tencent Cloud server encountered “Active: failed (Result: start-limit)” error when starting lightdm
- CentOS7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument？
- Apache2 cannot be started and an error is reported for apache2.service failed because the control process exited with error code.
- 【Q&A】Failed to start LSB: Bring up/down networking
- Job for docker.service failed because the control process exited with error code. See systemctl sta
- MariaDB startup error: Failed to start MariaDB database server
- Solution to redis error in CentOS of idea connected virtual machine
- Failed to restart ssh.service: Unit not found.