3

I have tried to launch two multipass VM. After installing docker in the multipass, I am trying to initialize docker swarm in one of the multipass vm. The command is:

multipass exec node1 -- /bin/bash -c 'docker swarm init --advertise-addr 10.173.198.201:2377 --listen-addr 10.173.198.201:2377'

But then the error comes up. It says:

Error response from daemon: advertise address must be a non-zero IP address or network interface (with optional port number)

Now how can I solve the issue? Can I launch multipass without 0 in IP?

Shamir Imtiaz
  • 138
  • 1
  • 6
  • Is that IP address assigned to your machine? If not, have you tried to use that? Your machine should be assigned with an IP which looks something like `192.168.xxx.xxx` if you use a home router. – msrumon Oct 14 '21 at 17:29
  • When I have launched new multipass VM, my machine automatically assigned this IP `10.173.198.201` to the multipass VM. – Shamir Imtiaz Oct 15 '21 at 05:17
  • 1
    What about world-famous `127.0.0.1`? – msrumon Oct 15 '21 at 05:55
  • Thanks for suggestion. Finally `127.0.0.1` saves my day. So the command should be: `multipass exec node1 -- /bin/bash -c 'docker swarm init --advertise-addr 127.0.0.1'` – Shamir Imtiaz Oct 15 '21 at 14:15
  • Will I add it to the answer? So that it may work as a reference for others? – msrumon Oct 15 '21 at 14:33
  • Sure rumon vai. I will be pleased if you upvote my question ;). – Shamir Imtiaz Oct 15 '21 at 15:45

1 Answers1

1

127.0.0.1 would save your day!

msrumon
  • 1,250
  • 1
  • 10
  • 27