In Docker, “Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces”

My question is similar to docker swarm init could not choose an IP address error, but I found the accepted answer somewhat vague so I’ll ask again. Upon trying

docker swarm init

I’m geting an error message

  • Within docker container can we get the host ip and the random ports allotted
  • Docker Quickstart Terminal fails to start VirtualBox VM in Windows 10
  • How to send HTTP requests to my server running in a docker container?
  • GitLab CI Runner, how to use volumes or mounts in service containers
  • Can you run GUI apps in a docker container?
  • Upgrade docker container to latest image
  • Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces (192.168.130.117 on enp1s0 and 192.168.130.89 on wlp2s0) – specify one with –advertise-addr

    What could be the root cause of this? I’m currently running a VPN (OneClickVPN); is that a problem?

    Also, in order to specify one address with --advertise-addr, I’d like to find out more about the addresses given in the message. How could I do that?

  • Hadoop Config in Docker - Datanode won't connect
  • sources: where daemon call libcontainer in createContainer
  • Docker running nginx plus jar
  • Docker Golang onbuild custom action at docker run
  • docker-compose push image to aws ecr
  • Installing an application into a docker containers through SSH
  • One Solution collect form web for “In Docker, “Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces””

    It looks like you have two active network interfaces, one on enp1s0 and another on wlp2s0. I’d guess enp1s0 is an Ethernet connection and wlp2s0 is a WiFi connection.

    As mentioned in the question you linked to, if you have multiple addresses on different interfaces, you have to specify one with --advertise-addr. In your case, you’re essentially choosing between your Ethernet and WiFi interfaces.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.