service network start 或者/etc/init.d/network start 出现RTNETLINK answers: File exists
的原因是启动网络的两个服务有冲突:/etc/init.d/network 和 /etc/init.d/NetworkManager
经过测试这是不影响网络的。如果你要用无线网络的时候,如果关闭NetworkManager服务会使你感到不方便。只需把NetworkManager服务重启一下就好。
但是在我用无线时重启网络会再次出现问题,当然你若把NetworkManager 服务关闭的话就永远不会出现RTNETLINK answers: File exists。
1.切换到root账户,并用chkconfig命令查看network 和 NetworkManager两个服务的开机启动配置情况;
[niu@localhost root]$ su -
密码:
[root@localhost ~]# chkconfig --list network
network 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@localhost ~]# chkconfig --list NetworkManager
NetworkManager 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@localhost ~]#
如果你不需要NetworkManager服务可以停用它使开机时不让其启动:
[root@localhost ~]# chkconfig --level123456 NetworkManager off
因为我的有无线,当重启网络的时候会出现:
[root@localhost ~]# service network restart
正在关闭接口 eth0: 错误:断开设备 'eth0'(/org/freedesktop/NetworkManager/Devices/0)失败:This device is not active
[失败]
正在关闭接口 wlan0: 错误:断开设备 'wlan0'(/org/freedesktop/NetworkManager/Devices/1)失败:This device is not active
[失败]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0: RTNETLINK answers: File exists
[确定]
重启NetworkManager 服务。
[root@localhost ~]# service NetworkManager restart
停止 NetworkManager 守护进程: [确定]
设置网络参数... [确定]
正在启动 NetworkManager 守护进程: [确定]
[root@localhost ~]# service network restart
正在关闭接口 eth0: 设备状态:3 (断开连接)
[确定]
正在关闭接口 wlan0: 设备状态:3 (断开连接)
[确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0: [确定]
其实很见到重启NetworkManager 服务!
source 笔记