CentOS 7 Mystery: Network does not start on boot, but will start manually
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CentOS 7 Mystery: Network does not start on boot, but will start manually
I've got a mystery.
I have a few CentOS 7 boxes that the network will not start on boot, but after boot, I can manually start it just fine.
First, these are lean boxes with no network manager.
They are also clones.
chkconfig network.service on
Here's the error:
Code:
● 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 Tue 2021-02-09 10:49:41 EST; 1h 21min ago
Docs: man:systemd-sysv-generator(8)
Process: 1613 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
Feb 09 10:49:40 hostname systemd[1]: Starting LSB: Bring up/down networking...
Feb 09 10:49:40 hostname network[1613]: Bringing up loopback interface: [ OK ]
Feb 09 10:49:41 hostname network[1613]: Bringing up interface em4: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device em4 does not seem to be present, delaying initialization.
Feb 09 10:49:41 hostname network[1613]: [FAILED]
Feb 09 10:49:41 hostname systemd[1]: network.service: control process exited, code=exited status=1
Feb 09 10:49:41 hostname systemd[1]: Failed to start LSB: Bring up/down networking.
Feb 09 10:49:41 hostname systemd[1]: Unit network.service entered failed state.
Feb 09 10:49:41 hostname systemd[1]: network.service failed.
But if I start it manually it works fine.
Code:
[root@hostname ~]# systemctl start network
[ 5203.845914 ] igb 000:06:00.1 em4: igb: em4 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[root@hostname ~]# chkconfig --list |grep network
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
I've got a mystery.
I have a few CentOS 7 boxes that the network will not start on boot, but after boot, I can manually start it just fine. First, these are lean boxes with no network manager. They are also clones.
chkconfig network.service on
Here's the error:
Code:
● 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 Tue 2021-02-09 10:49:41 EST; 1h 21min ago
Docs: man:systemd-sysv-generator(8)
Process: 1613 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
Feb 09 10:49:40 hostname systemd[1]: Starting LSB: Bring up/down networking...
Feb 09 10:49:40 hostname network[1613]: Bringing up loopback interface: [ OK ]
Feb 09 10:49:41 hostname network[1613]: Bringing up interface em4: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device em4 does not seem to be present, delaying initialization.
Feb 09 10:49:41 hostname network[1613]: [FAILED]
Feb 09 10:49:41 hostname systemd[1]: network.service: control process exited, code=exited status=1
Feb 09 10:49:41 hostname systemd[1]: Failed to start LSB: Bring up/down networking.
Feb 09 10:49:41 hostname systemd[1]: Unit network.service entered failed state.
Feb 09 10:49:41 hostname systemd[1]: network.service failed.
But if I start it manually it works fine.
Code:
[root@hostname ~]# systemctl start network
[ 5203.845914 ] igb 000:06:00.1 em4: igb: em4 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
I have checked /etc/udev/rules.d/70-persistent-net.rules, there is no such file.
I bolded a line above for emphasis only. You say they're clones...based on that, and the error message, have you changed the hardware address in the networking scripts? If the MAC address doesn't match, the hardware won't come up, but the device itself may initialize later in the boot process, and 'present', letting you bring it up. Just a guess.
I'd remove the preset network scripts, and bring the box up with no networking, and verify addresses/initialization of the hardware first, and proceed from there.
The hardware address is correct.
Full disclosure, these aren't exactly clones, they're OpenHPC/Warewulf nodes.
The network devices are created during the Warewulf bootstrap, and the HWADDR is added during that provisioning process.
Although that did get me thinking.
I did a
Code:
ip a
and all the network devices were named eno1, eno2, eno3, eno4, as opposed to the em1, em2, em3, em4 in the configuration.
I thought this might be an issue (although I don't pretend to know why), so I changed the ifcfg to match that and rebooted.
That did not solve the issue.
I did, however, reimage this machine using the warewulf tools, and in a stateless mode, the network works on boot, but when I switch to a stateful mode, it does not.
This might be warewulf specific. I'll post on a warewulf board and see if there are any solutions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.