[Consul]Error starting agent: Failed to get advertise address: Multiple private IPs found. Please configure one.

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:

1

 

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

3

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

4

From the above screenshot, we can see now the agent is successfully up and running.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s