我使用Kickstart安装了几个全新的CentOS 7系统。
当我重新启动networking时,我注意到奇怪的错误,说“ Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
“。 这个错误没有任何意义,因为ifcfg-lo文件存在,而且对我来说看起来很正常。 系统似乎正常工作,为什么networking服务抱怨?
[root@host3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-lo DEVICE=lo IPADDR=127.0.0.1 NETMASK=255.0.0.0 NETWORK=127.0.0.0 # If you're having problems with gated making 127.0.0.0/8 a martian, # you can change this to something else (255.255.255.255, for example) BROADCAST=127.255.255.255 ONBOOT=yes NAME=loopback [root@host3 ~]# [root@host3 ~]# systemctl restart network [root@host3 ~]# journalctl -xe -u network.service ... -- Subject: Unit network.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit network.service has begun starting up. Sep 30 15:02:56 host3.example.org network[36432]: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Sep 30 15:02:56 host3.example.org network[36432]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Sep 30 15:02:56 host3.example.org network[36432]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Sep 30 15:02:56 host3.example.org network[36432]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Sep 30 15:02:56 host3.example.org network[36432]: [ OK ] Sep 30 15:02:56 host3.example.org network[36432]: Bringing up interface eth0: Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3) Sep 30 15:02:56 host3.example.org network[36432]: [ OK ] Sep 30 15:02:56 host3.example.org systemd[1]: Started LSB: Bring up/down networking. -- Subject: Unit network.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit network.service has finished starting up. -- -- The start-up result is done. [root@host3 ~]#
更新回复@ SmallLoanOf1M的问题。 实际的设备似乎在启动后正常运行。 就我所知,“UNKNOWN”字段似乎是正常的。
[root@host3 ~]# ip addr show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever [root@host3 ~]#
目前正在被Red Hat追踪为一个bug,请参阅这篇知识文章 。
修复:将NM_CONTROLLED=no
添加到/etc/sysconfig/network-scripts/ifcfg-lo
。
根本原因:NetworkManager中的ifcfg-rh插件不支持回送接口types,并在系统日志中logging关于它的消息。