问题:网络重启失败
如下:
[root@localhost ~]# systemctl restart network Job for network.service failed because the control process exited with error code. See “systemctl status network.service” and “journalctl -xe” for details.
根据提示,执行:
[root@localhost ~]# systemctl status network ● network.service – LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; generated) Active: failed (Result: exit-code) since Tue 2020-01-14 10:49:23 CST; 43min ago Docs: man:systemd-sysv-generator(8) Process: 5688 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE) CPU: 1.190s
1月 14 10:49:23 localhost.localdomain network[5688]: RTNETLINK answers: File exists 1月 14 10:49:23 localhost.localdomain network[5688]: RTNETLINK answers: File exists 1月 14 10:49:23 localhost.localdomain network[5688]: RTNETLINK answers: File exists 1月 14 10:49:23 localhost.localdomain network[5688]: RTNETLINK answers: File exists 1月 14 10:49:23 localhost.localdomain network[5688]: RTNETLINK answers: File exists 1月 14 10:49:23 localhost.localdomain network[5688]: RTNETLINK answers: File exists 1月 14 10:49:23 localhost.localdomain systemd[1]: network.service: Control process exited, code=exited, status=1/FAILURE 1月 14 10:49:23 localhost.localdomain systemd[1]: network.service: Failed with result ‘exit-code’. 1月 14 10:49:23 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking. 1月 14 10:49:23 localhost.localdomain systemd[1]: network.service: Consumed 1.190s CPU time.
思路整理:
网络服务异常可能原因:
1.网络配置出错;
2. /etc/sysconfig/network-scripts路径下统一网卡,出现多个配置文件,干扰网络
3. NM服务影响(network服务启动会优先通过NM管理,其次走ip a)
排查下来,本次发现我的 /etc/sysconfig/network-scripts路径下一个网卡有多个配置文件,删除后,重新建立配置文件
重新建立:
1). 可以命令配置文件:(以下是我的网卡)
[root@localhost network-scripts]# cat ifcfg-eth0 HWADDR=00:0E:C6:54:0A:BF TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none IPADDR=10.2.30.91 PREFIX=16 GATEWAY=10.2.0.2 DNS1=223.5.5.5 DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=eth0 UUID=3c0b2360-d585-4209-8aba-66ac59ff4645 ONBOOT=yes
2). 图形配置:
先删除图形存在的网络配置信息,重新建立(类似win,不多说)
3. 最后,重启网络,成功。
[root@localhost ~]# systemctl restart network [root@localhost ~]#
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/179530.html原文链接:https://javaforall.cn