Unable to join cluster when using non-default ports

494 views
Skip to first unread message

Craig Wickesser

unread,
Nov 19, 2015, 10:03:23 AM11/19/15
to Consul
I've started up 3 servers using the following config and this command: consul agent -config-file /path/to/consul.json

{
  "server": true,
  "client_addr": "<ip addr of the host>",
  "data_dir": "/tmp",
  "bootstrap_expect": 3,
  "ports": {
    "dns": 33005,
    "server": 33000,
    "serf_lan": 33001,
    "serf_wan": 33002,
    "rpc": 33003,
    "http": 33004
   }
}



Now that they're up I go to server 1 and try to issue a join:

consul join -rpc-addr <local server ip>:33003 <other server ip>:33003

I get "Error joining the cluster: EOF"

Any ideas?

Craig Wickesser

unread,
Nov 19, 2015, 10:06:04 AM11/19/15
to Consul
I just noticed in the logs for the "other server" (the one I'm trying to join), i see this when issuing the join:

[ERR] agent.rpc: failed to decode request header: codec.decoder: Only encoded map or array can be decoded into a struct. (valueType: 2)

I am running v0.5.2, protocol 2. (according to consul --version)

Craig Wickesser

unread,
Nov 19, 2015, 10:31:50 AM11/19/15
to Consul
Got it!

consul join -rpc-addr <local server ip>:33003 <other server ip>:33001

I needed to use the serf lan port when talking to the other server, which I figured out by looking at the code
Reply all
Reply to author
Forward
0 new messages