I Can't start CentOS 7 "network" service after disabling and removing "NetworkManager" service. When I check the network service status, it comes up with the following error:

#systemctl status network.service
network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: failed (Result: exit-code) since Fri 2015-01-16 22:30:46 GMT; 38s ago
  Process: 4857 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Jan 16 22:30:46 localhost.localdomain network[4857]: RTNETLINK answers: File exists
Jan 16 22:30:46 localhost.localdomain network[4857]: RTNETLINK answers: File exists
Jan 16 22:30:46 localhost.localdomain network[4857]: RTNETLINK answers: File exists
Jan 16 22:30:46 localhost.localdomain network[4857]: RTNETLINK answers: File exists
Jan 16 22:30:46 localhost.localdomain network[4857]: RTNETLINK answers: File exists
Jan 16 22:30:46 localhost.localdomain network[4857]: RTNETLINK answers: File exists
Jan 16 22:30:46 localhost.localdomain network[4857]: RTNETLINK answers: File exists
Jan 16 22:30:46 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
Jan 16 22:30:46 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
Jan 16 22:30:46 localhost.localdomain systemd[1]: Unit network.service entered failed state.

In earlier CenOS it didn't seem to give any problems when switching from the "NetworkManager" service to the network service. Any ideas as to what causes the problem and how to fix it?

Note: I used yum erase to remove network manage service.

Here is additional info as asked.

/etc/sysconfig/network-script/ifcfg-enp8s0
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp8s0
UUID=453a07fe-1b07-4f29-bc32-f2168e50706a
ONBOOT=yes
HWADDR=XXXXXXXXXXX
MACADDR=XXXXXXXXXX
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

/etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

/etc/resolv.conf
; generated by /usr/sbin/dhclient-script
search customer.marples.midcity.lan
nameserver 10.241.128.1
Best Answer


In Centos7.0 disabling NetworkManager will leave a dhcp client running configured for NetworkManager. This causes the error message RTNETLINK answers: File exists when the network service is started.

The stale dhclient process has the additional "benefit" that when the lease expires your dhclient will choke, since it cannot reach NetWorkManager, thus removing your IP address.

If you grep for it, you will see that it points to a NetWorkManager configuration file.

[root@host ~]# ps -ef | grep dhc
root      1865   792  0 Apr28 ?        00:00:00 /sbin/dhclient -d -sf \
 /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-eno1.pid -lf\
 /var/lib/NetworkManager/dhclient-c96e56d3-a4c9-4a87-85ca-93dc0ca268f2-eno1.lease\
 -cf /var/lib/NetworkManager/dhclient-eno1.conf eno1

So what you can do is kill the dhclient and only then start your network service.