Docker Could Not Generate Persistent Mac Address For No Such File Or Directory

Docker Could Not Generate Persistent Mac Address For No Such File Or Directory Rating: 4,2/5 5029 votes

This is reproducible by running a bunch of containers in sequence on current CoreOS beta or alpha. Eventually one will fail. When the master is not set, the container can't ping its own gateway interface, so this will do it: for ((i=0; i. Sorry, I updated the cause on the pull request, but not this issue. Here's what can reproduce the issue: This error is triggered by a race condition on systems using systemd-networkd with a network file that matches the veths. When a network file matches an interface, networkd brings up the interface, even if that network file has no configuration settings in it. The network files don't appear to support marking links unmanaged, so every networkd configuration file shipped by distros would need to be written to not match Docker's veths, and end-users will also need to be aware of this for any custom configuration files they add (unless an Unmanaged option is added to networkd to match the veths first).

Bridge networking seems to work fine in two scenarios: systemd-networkd is not running or doesn't hijack the veths, or if Docker waits for the veth interfaces to be fully brought up before adding to the bridge. Thanks for the analysis. I have not been able to reproduce the issue on ubuntu machine, but it is congruent with your explanation, because in my case systemd-networkd service is not running. It seems it is possible to control with configuration files whether networkd should manage a link based on the link type. I would rather document your finding in the docker documentation, instead of modifying the docker code to be resilent to networkd interfeerence.

That way users can decide if it is worth to configure their networkd or to shut it down, depending on their setup. I'm using Docker 1.12.3 on Ubuntu 16.04 LTS and I've noticed this error. Reading the thread, I see that you proposed a PR to systemd project to solve this problem. I'll need to update my systemd service through package manager to solve this problem in my current system? Is there any workarround that I can make to avoid this issue? If yes, what is? Which file I need to edit and what content needs to be replaced?

In my case, I have installed docker 1.12.3 from scratch (a few minutes ago) in 4 nodes, and executed the following commands. Yes, I have sent two different methods of addressing the issue to upstream systemd:. Both have been merged, but they are not in a release yet, so you would have to manually build a patched package if you want to use them. See for example configuration files using the first method.

And with today’s answers, you can choose the method that works best for you when clearing out the cache and cookies. Sound off in the comments. Have something to add to the explanation? Clear cache cookies chrome mac.

Cat Dockerfile FROM registry.fedoraproject.org/fedora:26 ENV container docker. Could not generate persistent MAC address for vethd284ce9: No such file. Failed to canonicalize path [/var/lib/docker/overlay]: No such file or directory.

If your problem is caused by the same issue (networkd matching Docker veths), then the workaround is to rewrite your.network files' [Match] sections to be more restrictive so they don't match Driver=veth bridge etc. I am not familiar with Ubuntu, so I don't know of anything more specific for you. Could this cause an AWS instance not to be accessible by SSH anymore? These are the last few lines I see in the log and I can't SSH to the instance anymore: [ 29.832213] br-9bacab3c71dd: port 6(veth05e21c1) entered blocking state [ 29.839355] br-9bacab3c71dd: port 6(veth05e21c1) entered disabled state [ 29.875175] device veth05e21c1 entered promiscuous mode [ 29.904463] IPv6: ADDRCONF(NETDEV_UP): veth05e21c1: link is not ready [ 30.778724] IPv6: ADDRCONF(NETDEV_CHANGE): veth05e21c1: link becomes ready [ 30.786407] br-9bacab3c71dd: port 6(veth05e21c1) entered blocking state [ 30.793603] br-9bacab3c71dd: port 6(veth05e21c1) entered forwarding state.

I setup a k8s with calico cni cluster, occasionally run into failed to setup container network problem.