Fixed: «Error starting agent: Failed to get advertise address: Multiple private IPs found. Please configure one»

I was getting the following error while starting Consul agent

1 2 3 ==> WARNING: Bootstrap mode enabled! Do not enable unless necessary ==> Starting Consul agent... ==> Error starting agent: Failed to get advertise address: Multiple private IPs found. Please configure one.

Fix : You need to supply advertise in the config file, as the consul was unable to determine it.

In the config.json file add the advertise_addr like following

1 “advertise_addr”: “192.168.2.21”

Sample configuration

1 2 3 4 5 6 7 8 9 10 { “bootstrap”: true, “server”: true, “datacenter”: “nyc2”, “data_dir”: “/var/consul”, “encrypt”: “ozj5RepL7E9NAKnc1085iQ==”, “log_level”: “INFO”, “enable_syslog”: true, “advertise_addr”: “192.168.2.21” }

 

 

 

Author: , 0000-00-00