0
votes

consul server config file

{
  "datacenter": "dc1",
  "data_dir": "/home/consul-server",
  "log_level": "INFO",
  "node_name": "server1",
  "server": true,
  "bootstrap" : true,
  "ports" : {   
    ¦ "dns" : -1, 
    ¦ "http" : 8500,                                                                                                                                                                  
    ¦ "rpc" : 8400,
    ¦ "serf_lan" : 9301,
    ¦ "serf_wan" : 9302,
    ¦ "server" : 8300
  }   
}

and how can I register a service on a remote machine? I use /v1/catalog/register api but consul gives me [ERR] memberlist: Received invalid msgType (80) from=192.168.14.100:58062 Do I have to start a agent on that remote machine?

1

1 Answers

0
votes

Are you running consul from inside docker?

I had this problem, solved it by using a different image which, unlike the official one, is made to work from inside docker

Image is called progrium/consul

You can run it with the following command

docker run -p 8400:8400 -p 8500:8500 -p 8600:53/udp \
-h node1 progrium/consul -server -bootstrap