So I ran into something tonight while going over the new networking tools in RHEL 7. I’m so familiar with tools like ifconfig, netstat, etc. that I need to brush up on these tools’ RHEL 7 counterparts.
One of the things I did tonight was check the status of networking on the certification test server. That’s when I discovered I had some errors I wasn’t previously aware of.
# systemctl status network ● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2016-11-04 22:31:35 EDT; 2 weeks 5 days ago Docs: man:systemd-sysv-generator(8) Nov 04 22:31:35 rhelcert network[1263]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Nov 04 22:31:35 rhelcert network[1263]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Nov 04 22:31:35 rhelcert network[1263]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo' Nov 04 22:31:35 rhelcert network[1263]: [ OK ] Nov 04 22:31:35 rhelcert network[1263]: Bringing up interface enp3s0: Error: Connection activation failed: No suitable device found for this connection. Nov 04 22:31:35 rhelcert network[1263]: [FAILED] Nov 04 22:31:35 rhelcert systemd[1]: network.service: control process exited, code=exited status=1 Nov 04 22:31:35 rhelcert systemd[1]: Failed to start LSB: Bring up/down networking. Nov 04 22:31:35 rhelcert systemd[1]: Unit network.service entered failed state. Nov 04 22:31:35 rhelcert systemd[1]: network.service failed.
Now here’s where it gets interesting. This is a known bug in RHEL 7 and it was supposedly resolved in 7.3. Well, let’s see about that.
# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.3 (Maipo)
So I’m on the version it’s resolved in yet I still have the same issue. So how do you resolve it? Well, it’s a pretty simple fix, really. All you need to do is add ‘NM_CONTROLLED=no’ to your /etc/sysconfig/network-scripts/ifcfg-lo file. Once that’s done, restart networking and check the status again.
# systemctl restart network # systemctl status network ● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: active (exited) since Wed 2016-11-23 23:22:32 EST; 1s ago Docs: man:systemd-sysv-generator(8) Process: 15380 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS) Process: 15685 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS) Nov 23 23:22:31 rhelcert systemd[1]: Starting LSB: Bring up/down networking... Nov 23 23:22:31 rhelcert network[15685]: Bringing up loopback interface: [ OK ] Nov 23 23:22:32 rhelcert network[15685]: Bringing up interface enp3s0: Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/19) Nov 23 23:22:32 rhelcert network[15685]: [ OK ] Nov 23 23:22:32 rhelcert systemd[1]: Started LSB: Bring up/down networking.
Notice that the errors have gone away.
So what’s the root cause? Well, the Network Manager isn’t enabled with most installation options. In fact, it’s only enabled by default if you choose to set you machine up as a desktop or developer workstation. Personally, I think that’s a little silly for a server OS but who am I to argue? The command we added to the config file turns the network manager off for the loopback device and allows the standard network service to control it.