Product SiteDocumentation Site

5.2. Verify Connection to Remote Node

Before moving forward, it’s worth verifying that the cluster nodes can contact the remote node on port 3121. Here’s a trick you can use. Connect using ssh from each of the cluster nodes. The connection will get destroyed, but how it is destroyed tells you whether it worked or not.
First, add the remote node’s hostname (we’re using remote1 in this tutorial) to the cluster nodes' /etc/hosts files if you haven’t already. This is required unless you have DNS set up in a way where remote1’s address can be discovered.
Execute the following on each cluster node, replacing the IP address with the actual IP address of the remote node.
# cat << END >> /etc/hosts
192.168.122.10    remote1
END
If running the ssh command on one of the cluster nodes results in this output before disconnecting, the connection works:
# ssh -p 3121 remote1
ssh_exchange_identification: read: Connection reset by peer
If you see one of these, the connection is not working:
# ssh -p 3121 remote1
ssh: connect to host remote1 port 3121: No route to host
# ssh -p 3121 remote1
ssh: connect to host remote1 port 3121: Connection refused
Once you can successfully connect to the remote node from the both cluster nodes, move on to setting up Pacemaker on the cluster nodes.