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.
本文介绍了在Windows系统上使用Consul遇到的启动错误,并详细解释了错误原因:系统存在多个私有IP地址导致Consul无法确定监听地址。通过指定具体的私有IPv4地址解决了该问题。


1550

被折叠的 条评论
为什么被折叠?



