Jump to content

Second NIC Missing From Docker Containers After Reboot


Go to solution Solved by ecnal.magnus,

Recommended Posts

I have two network cards in my machine. One is set to 192.168.1.0/24 (eth0) and the other is set to 192.168.10.0/24 (eth1). I have myriad Docker containers split between the two NICs. After rebooting my server yesterday eth1 disappeared from my containers it was assigned to. Those containers wouldn't start. The error message I got was "container doesn't exist" or something along those lines. When I went into their configuration page the Network Type on each container that was previously assigned to eth1 was set to None and eth1 was no longer an available option.

As you can see from the attached screen shot, eth1 still exists in the Advanced View of the general Docker settings, but it did not exist when I did a "docker network ls" from the terminal. I re-added it using "docker network create --driver=macvlan --subnet=192.168.10.0/24 --gateway=192.168.10.1 eth1," which then made it available again for assignment in the Docker containers configuration page, but nothing assigned to that NIC will even ping, so it still doesn't work even though it now looks like it did prior to the reboot. Also, if I reboot the machine, the NIC will disappear from the Docker container configuration page and also from "docker network ls." I can then recreate it but, like I said, it doesn't actually work.

I have since moved the broken containers over to eth0 so they are up and running, but I would really like to put them back on eth1, as that is the subnet I have set aside for particular applications. Please let me know if there is any other information I can provide. It really was working prior to, and then not working after, a simple reboot of the machine.

Screenshot 2024-06-29 at 10.56.36 AM.png

Link to comment
  • Solution

I sort of figured this out. If I have ipv4+ipv6 enabled on eth1, then eth1 isn't available to Docker. I have it enabled on eth0 and that works just fine. But I put eth1 back to just ipv4 and it is now working again. Hopefully someone has an answer to this as I would love to have ipv6 working on eth1, as well.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...