【发布时间】:2020-05-07 03:07:34
【问题描述】:
我试图使用以下命令在 vagrant 中运行 consul
consul agent -dev -advertise 172.20.20.31
但它显示以下错误消息
failed to get conn: dial tcp 127.0.0.1:0->172.20.20.31:8300: connect: invalid argument"
因此,当我将本地计算机连接到此 ip 并运行 consul ui 模式时,它会显示
500 (The backend responded with an error)
我的流浪文件如下:
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
和连接文件是一样的
{
"ui": true,
"retry_join": ["172.20.20.31"],
"advertise_addr": "172.20.20.01",
"data_dir": "/tmp/consul/self"
}
我在 mac os 和 Vagrant 2.2.7 centos7 中使用 consul 1.7.2
我不知道我做错了什么。 所以任何建议都会有所帮助。
【问题讨论】:
标签: vagrant consul hashicorp-vault