Network start on boot fail; restart no problem...

Issues related to configuring your network
Post Reply
kognitix
Posts: 4
Joined: 2015/06/29 22:47:57

Network start on boot fail; restart no problem...

Post by kognitix » 2015/06/29 23:04:33

I'm hoping someone has some insight into this.. My skill level is intermediate (in my mind!)...

Fresh install of CentOS 7, same problem every time, before and after update. Even though I get the error on a status check, everything actually works. Internal network is fine and I connect to the internet fine. I'm just confused about the error pre-manual restart.

[]# systemctl status network
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since Mon 2015-06-29 16:58:43 MDT; 17s ago
Process: 926 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Jun 29 16:58:42 kog-sppkvm-200.localhost network[926]: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Jun 29 16:58:42 kog-sppkvm-200.localhost network[926]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Jun 29 16:58:42 kog-sppkvm-200.localhost network[926]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Jun 29 16:58:43 kog-sppkvm-200.localhost network[926]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Jun 29 16:58:43 kog-sppkvm-200.localhost network[926]: [ OK ]
Jun 29 16:58:43 kog-sppkvm-200.localhost network[926]: Bringing up interface enp3s0: Error: Connection activation failed: Connection 'enp3s0' is not available on the device enp3s0 at this time.
Jun 29 16:58:43 kog-sppkvm-200.localhost network[926]: [FAILED]
Jun 29 16:58:43 kog-sppkvm-200.localhost systemd[1]: network.service: control process exited, code=exited status=1
Jun 29 16:58:43 kog-sppkvm-200.localhost systemd[1]: Failed to start LSB: Bring up/down networking.
Jun 29 16:58:43 kog-sppkvm-200.localhost systemd[1]: Unit network.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

[]# systemctl restart network

[]# systemctl status network
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: active (exited) since Mon 2015-06-29 16:59:09 MDT; 3s ago
Process: 2717 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost network[2717]: RTNETLINK answers: File exists
Jun 29 16:59:09 kog-sppkvm-200.localhost systemd[1]: Started LSB: Bring up/down networking.

aks
Posts: 2910
Joined: 2014/09/20 11:22:14

Re: Network start on boot fail; restart no problem...

Post by aks » 2015/06/30 16:26:54

Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
- missing file? SElinux?
Bringing up interface enp3s0: Error: Connection activation failed: Connection 'enp3s0' is not available on the device enp3s0 at this time.
- is the hardware up at this point?
RTNETLINK answers: File exists
Trying to add a route that already exists?

kognitix
Posts: 4
Joined: 2015/06/29 22:47:57

Re: Network start on boot fail; restart no problem...

Post by kognitix » 2015/06/30 19:25:18

I temporarily disabled SELinux to troubleshoot this. :(

Yes, hardware is up at boot, I can ping and access the internal network and the external world from the machine. Everything seems to work just fine, it just gives that error on the initial 'systemctl status network' and then it goes away if I reload the network and request status again.

That said, I do notice very random speed changes in my internet connection via speedtest-cli though.. It's part of the reason I'm trying to figure this out, seems like it may be related.

PS - the file is there ifcfg-lo:

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

kognitix
Posts: 4
Joined: 2015/06/29 22:47:57

Re: Network start on boot fail; restart no problem...

Post by kognitix » 2015/07/01 04:18:55

Ok, I got the ifcfg-lo working from a post in the CentOS bug forum:

"1. Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
This is generated by command 'nmcli con load /etc/sysconfig/network-scripts/ifcfg-lo' executed by 'ifup'

The cause is that NetWorkManager ifcfg-rh plugin does not support loopback interface at all. It expects that ifcfg-* files would all have TYPE variable set, which a default ifcfg-lo does not have.

I've managed to work-around this by adding "TYPE=Loopback" there. This would make NetworkManager ifcfg-rh plugin to ignore a file because of unknown type:
May 25 15:14:43 batyskaftest.batory.org.pl NetworkManager[751]: <info> parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
May 25 15:14:43 batyskaftest.batory.org.pl NetworkManager[751]: <info> read connection 'loopback'
May 25 15:14:43 batyskaftest.batory.org.pl NetworkManager[751]: <warn> Ignoring connection 'loopback' of unrecognized type.

Loopback would be started anyway - I think by kernel automatically."

Still can't find a solution for the actual NIC interface though...

aks
Posts: 2910
Joined: 2014/09/20 11:22:14

Re: Network start on boot fail; restart no problem...

Post by aks » 2015/07/01 16:31:30

Perhaps the interface is not up when systemd tries to start the interface but it has come up by the time you start the interface?
Also check the MAC address in the /etc/sysconfig/ifcfg-<name_of_nic> matches the real MAC address on the interface.
Do you have a DHCP server on the network and are you assigning a static address that's from within the DHCP pool?

Post Reply

Return to “CentOS 7 - Networking Support”