Problem: Error starting agent: Failed to get advertise address: Multiple private IPs found. Please configure one.
I'm new to Consul, so on my windows system, I was following the official guide: https://www.consul.io/intro/getting-started/agent.html
until this step:
$ consul agent -dev
and get this error:
Why got this error:
If we don’t specify a bind address, Consul will by default listen on the first private IP on the system, and this might not work.
An explanation of private IP address vs public IP address
Solution:
To solve the problem, we need to explicitly specify it.
Step1: Find the private IPV4 address of this system:
$ ipconfig
We can see from the screenshot, the IPv4 Address is 192.168.231.18.
Step2: Specify the bind address and start the agent:
$ consul agent -dev -bind 192.168.231.18
From the above screenshot, we can see now the agent is successfully up and running.