禁用并删除“ NetworkManager”服务后,我无法启动CentOS 7“网络”服务。当我检查网络服务状态时,出现以下错误:
#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.
在早期的CenOS中,从“ NetworkManager”服务切换到网络服务时似乎没有出现任何问题。关于什么原因导致问题以及如何解决的任何想法?
注意:我使用yum擦除删除了网络管理服务。
这是询问的其他信息:
/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
HWADDR=XXXXXXXXXXX
AND MACADDR=XXXXXXXXXX
。这似乎是错误的,因为它看起来应该是相同的。尝试执行我建议的操作之一(在配置中对此部分进行注释),重新启动并重试。这是CentOS 7 Box SELinux强制执行的吗?您是在硬件上还是在虚拟环境中运行此系统?hosts
并且resolv.conf
看起来还不错。
HWADDR
和/或MACADDR
,我认为取出MACADDR
就足够了。重新启动整个方框,然后查看网络是否正常启动。另外,如果您不使用IPv6
,请在那里丢掉垃圾。您也可以使用cat /sys/class/net/ens192/address
来检查HWADDR,以确保其设置正确。
/etc/sysconfig/network-script/ifcfg-eth0
<br/>/etc/hosts
<br/>/etc/resolv.conf
<br/> <br/>您可能要检查为特定NIC配置的路由。 (位于中/etc/sysconfig/network-scripts/route-<interface>
),因为这可能会导致类似的错误。<br/> <br/>您尝试了ifdown eth0
而ifup eth0
不是systemctl (re)start network
?您是否Network Manager
使用yum remove