I was trying to run consul in vagrant using the following comman
consul agent -dev -advertise 172.20.20.31
but it showing following error message
failed to get conn: dial tcp 127.0.0.1:0->172.20.20.31:8300: connect: invalid argument"
as a result when i connect form my local machine to this ip and run consul ui mode it showing
500 (The backend responded with an error)
my vagrant file is as follow:
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.define "centos-consul" do |cs|
cs.vm.hostname = "centos-consul"
cs.vm.network "private_network",ip:"172.20.20.31"
end
end
and connect file is as
{
"ui": true,
"retry_join": ["172.20.20.31"],
"advertise_addr": "172.20.20.01",
"data_dir": "/tmp/consul/self"
}
I am using consul 1.7.2 in mac os and Vagrant 2.2.7 centos7
I am at a lost what i did wrong. so any suggestion will be helpful.