network-programmingdiscoverycrate

Crate.io - failed to send join request to master


I am trying to connect two Crate.io nodes which are in different data centers. Node 1 is the master and is already running. When I try to get Node 2 to join the cluster I get the following error:-

[2016-06-23 09:29:30,475][INFO ][discovery.zen] [Node 2] failed to 
send join request to master [[Node 1][flPMSe_vQw-2GEb5dkwqaw][ns1.example.com]
[inet[/11.22.33.44:4300]]{http_address=http://11.22.33.44:4200, master=true}], 
reason [RemoteTransportException[[Node 1][inet[/11.22.33.44:4300]][internal:discovery
/zen/join]]; nested: ConnectTransportException[[Node 2][inet[/10.19.0.5:4300]] 
connect_timeout[30s]]; nested: ConnectTimeoutException
[connection timed out: /10.19.0.5:4300]; ]

Any ideas?


Solution

  • yes, it seems like you have NAT between those data centers, which is why you need to set the publish host parameter to your public IP (where you have to have port mapping to this/these machine/s).

    To fix this, set the publish_host setting in crate.yml and maybe (if required - depends on your port mapping settings) publish_port.

    See here: https://crate.io/docs/reference/configuration.html#hosts