Reputation: 1098
I would like to create cluster with two machines - at home and on VPS (dedicate with OpenVZ).
I've installed RethinkDB on VPS, configured to autostart and run. Everything is OK. I can access via website (nginx proxy pass).
I want to create cluster with my home machine. So I've installed RethinkDB and run it. Everything is good (locally).
When run this command:
rethinkdb --join DEDICATE_IP_SERVER:29015 --bind all
I've got error:
error: Received inconsistent routing information (wrong address) from DEDICATE_IP_SERVER:29015 (expected_address = peer_address [DEDICATE_IP_SERVER:29015], other_peer_addr = peer_address [127.0.0.1:29015, 127.0.0.2:29015, NAT_IP:29015, ::1:29015]), closing connection. Consider using the '--canonical-address' launch option.
When run this command:
rethinkdb --canonical-address DEDICATE_IP_SERVER:29015 --bind all
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080
Listening on addresses: 127.0.0.1, 127.0.1.1, 192.168.0.22, ::1, fe80::1e6f:65ff:feca:abd6%2
Server ready, "ubuntu_dom" a1ea003f-6497-482b-b826-ac815400818d
How can I connect to external server ?
On dedicate server I added iptables rule:
iptables -t nat -A PREROUTING -p tcp --dport 29015 -j DNAT --to-destination NAT_IP:29015
also tested with:
iptables -t nat -A PREROUTING -i vmbr0 -p tcp -d DEDICATE_IP_SERVER --dport 29015 -j DNAT --to-destination NAT_IP:29015
but it doesn't work.
Port is ok, because I've tested with nmap.
nmap DEDICATE_SERVER_HOST -p 29015
Nmap scan report for DEDICATE_SERVER_HOST (DEDICATE_IP_SERVER)
Host is up (0.047s latency).
PORT STATE SERVICE
29015/tcp open unknown
Upvotes: 1
Views: 652
Reputation: 1098
Ok, I found problem.
On external sever I have to run RethinkDB with param: --canonical-address DEDICATE_IP_SERVER:29015
After that I can connect from home with join param.
Upvotes: 4