今天用xshell连接虚拟机时死活连不上,检查来检查去都没问题,结果居然是....
1. 使用检查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.
service failed.
网上回答一大堆,终于找出了罪魁祸首:就是 : networkmanager
关闭它即可;
systemctl stop NetworkManager
systemctl disable NetworkManager
之后重启网络即可:
systemctl start network.service