Friday, June 16, 2017

RHEL7 / CentOS7 network interface going down once per hour

There's really bizarre bug in RHEL7 / CentOS7. Once per hour NetworkManager will remove IP addresses from ethernet interface after hitting some bug and triggering "link loss" action. Interface may come back by itself or may not. It does come back when you login as root on console as login triggers some repair action part via systemd...



This bug has been there for quite a while since oldest report of exactly same problem is from May 2015 with Hyper-V. Luckily for me someone figured out bit more details of this problem in February 2017 running KVM. I'm using ESXi so it's obviously not virtualization platform related.

Edit /etc/default/grub GRUB_CMDLINE_LINUX to include "net.ifnames=0 biosdevname=0". This is required for ethernet adapter to have predicatable name (eth0) instead of randomized junk like ens224 it's by default.

Tell grub to use new kernel parameters on next reboot:
grub2-mkconfig -o "$(readlink -e /etc/grub2.cfg)"

Fix network configuration script ifcfg-ens224 in /etc/sysconfig/network-scripts/
1. Change NAME=ens224 to NAME=eth0
2. Change DEVICE=ens224 to DEVICE=eth0
3. Generate new unique id with "uuidgen" and replace your old uuid value on UUID= line with it.

Save changes and rename ifcfg-ens224 to ifcfg-eth0.

Reboot.

That's it. Now systemd/NetworkDamager won't shutdown your ethernet interface once per hour.

Of course there's likely bunch of other bugs and corner cases in NetworkManager that may still kill your network. Therefore it's always recommended to disable it unless you really need some of NetworkManager specific features.

systemctl mask NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager

And reboot. Because rebooting is so much fun.

8 comments:

  1. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have

    enjoyed reading. Nice blog. I will keep visiting this blog very often. Double Apple Shisha,
    Ijoy Tank

    ReplyDelete
  2. Good focuses you composed here..Great stuff… I think you've made some genuinely intriguing points.Keep up the great work.
    Cosmetics Online Shopping in India
    Makeup Products Online
    Buy Beauty Products Online
    Online Makeup Products
    Online Cosmetics

    ReplyDelete
  3. It is actually a nice and helpful piece of information. I’m satisfied that you shared this helpful info with us. Please stay us informed like this. Thank you for

    sharing.
    Weed Edibles,
    Marijuana Delivery,
    Marijuana Edibles,
    Weed Maps

    ReplyDelete
  4. I have as of late begun a website, the data you give on this webpage has helped me extraordinarily. Much obliged for the greater part of your time and work.
    Used Forklifts For Sale
    Forklift For Sale
    Forklift Price
    Buy Forklift
    Used Forklift For Sale

    ReplyDelete
  5. Fantastisk indlæg, du har påpeget nogle utrolige fokus, jeg synes på samme måde at dette er et usædvanligt strålende sted.
    Tøj Til Store Kvinder
    Zhenzi
    Zoey
    Plus Size Modetøj
    Tilbud Og Udsalg På Dametøj

    ReplyDelete
  6. Extraordinary Article it its truly useful and imaginative update us as often as possible with new overhauls. its was truly significant. much obliged.
    Vegetable Seeds Online
    Buy Fungicides
    Buy Flower Seeds
    Buy Insecticides
    Buy Water Soluble

    ReplyDelete
  7. After study just a few of the weblog posts in your website now, and I really like your way of blogging. I bookmarked it to my bookmark web site listing

    and might be checking back soon. Pls try my site as properly and let me know what you think.
    New Homes Near Me,
    Commercial Builder,
    Industrial General Contractor,
    Mama Mariastaco,

    ReplyDelete
  8. Thanks for taking the time to discuss this, I feel strongly about it and adore learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more details? It is extremely helpful for me. Rekrutteringsbureau,
    job i Vejle,

    ReplyDelete

Got something to say?!