原本以为/etc/system/netword-scripts/ifcfg-en33配置文件有问题,查看一下没问题
刚刚装好的虚拟机突然不能上网了,报错很诡异,具体报错如下:
/etc/init.d/network restart
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命令查看结果如下:
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since 三 2016-08-17 11:34:36 CST; 54s ago
Docs: man:systemd-sysv-generator(8)
Process: 3847 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists
8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists
8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists
8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists
8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists
8月 17 11:34:36 python.cn network[3847]: RTNETLINK answers: File exists
8月 17 11:34:36 python.cn systemd[1]: network.service: control process exited, code=exited status=1
8月 17 11:34:36 python.cn systemd[1]: Failed to start LSB: Bring up/down networking.
8月 17 11:34:36 python.cn systemd[1]: Unit network.service entered failed state.
8月 17 11:34:36 python.cn systemd[1]: network.service failed.
百度答案:
mac地址不对,修改mac地址。
也许有人确实是mac问题,但是莫名其妙怎么可能mac地址更改了,除非你添加新网卡或者克隆的虚拟机。
我特么真笑了,天下百度文章一大抄啊。。。。。。。。
没办法了,Google一下吧,偶然看到一个文章,大意是跟系统自带的NetworkManager这个管理套件有关系,关掉就可以解决。
试一下:
systemctl stop NetworkManager
systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
重新启动网络:
systemctl start network.service
解决