From 0c5409bd2bee071d09bcabd3406944042fb4df47 Mon Sep 17 00:00:00 2001 From: Bob Grabar Date: Wed, 3 Oct 2012 16:39:47 -0400 Subject: [PATCH 1/2] DOCS-538 new step to verify connectivity before deploy rs --- source/administration/replica-sets.txt | 43 ++++++++++++++++++++++++++ source/tutorial/deploy-replica-set.txt | 12 +++++-- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/source/administration/replica-sets.txt b/source/administration/replica-sets.txt index 908e9227672..72238a5c534 100644 --- a/source/administration/replica-sets.txt +++ b/source/administration/replica-sets.txt @@ -656,6 +656,49 @@ Possible causes of replication lag include: - The :ref:`replica-set-procedure-change-oplog-size` topic this document. - The :doc:`/tutorial/change-oplog-size` tutorial. +.. _replica-set-troubleshooting-check-connection: + +Test the Connection Between Each Member +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There must be connectivity from every :term:`replica set` member to +every other member in order for replication to work. Problems with +network or firewall rules can prevent this connectivity and prevent +replication from working. To test the connection from every member to +every other member, in both directions, consider the following example: + +.. example:: Given a replica set with three members running on three separate + hosts: + + - ``m1.example.net`` + - ``m2.example.net`` + - ``m3.example.net`` + + 1. Test the connection from ``m1.example.net`` to the other hosts by running + the following operations from ``m1.example.net``: + + .. code-block:: sh + + mongo --host m2.example.net --port 27017" + + mongo --host m3.example.net --port 27017" + + #. Test the connection from ``m2.example.net`` to the other two + hosts by running similar appropriate operations from ``m2.example.net``. + + This means you have now tested the connection between + ``m2.example.net`` and ``m1.example.net`` twice, but each time + from a different direction. This is important to verifying + connectivity. Network topologies and firewalls might allow a + connection in one direction but not the other. Therefore you must + make sure to verify that the connection works in both directions. + + #. Test the connection from ``m3.example.net`` to the other two + hosts by running the operations from ``m3.example.net``. + + If a connection in any direction fails, there's a networking or + firewall issue that needs to be diagnosed separately. + .. index:: pair: replica set; failover .. _replica-set-failover-administration: .. _failover: diff --git a/source/tutorial/deploy-replica-set.txt b/source/tutorial/deploy-replica-set.txt index b4a8bba958b..57463ec0a48 100644 --- a/source/tutorial/deploy-replica-set.txt +++ b/source/tutorial/deploy-replica-set.txt @@ -49,7 +49,11 @@ Deploy a Development or Testing Replica Set The examples in this procedure create a new replica set named ``rs0``. -1. Start three instances of :program:`mongod` as members of a replica +1. Before creating your replica set, verify there is full connectivity + between all the hosts to be in the replica set, as described in + :ref:`replica-set-troubleshooting-check-connection`. + +#. Start three instances of :program:`mongod` as members of a replica set named ``rs0``, as described in this step. For ephemeral tests and the purposes of this guide, you may run the :program:`mongod` instances in separate windows of GNU Screen. OS X and most Linux @@ -186,7 +190,11 @@ deployment described above, with the following differences: To deploy a production replica set: -1. On each system start the :program:`mongod` process by issuing a +1. Before creating your replica set, verify there is full connectivity + between all the hosts to be in the replica set, as described in + :ref:`replica-set-troubleshooting-check-connection`. + +#. On each system start the :program:`mongod` process by issuing a command similar to following: .. code-block:: sh From 5f954e14329125f945e3e3ad286110cea4e7eea9 Mon Sep 17 00:00:00 2001 From: Bob Grabar Date: Thu, 4 Oct 2012 17:37:51 -0400 Subject: [PATCH 2/2] DOCS-538 verify connectivity: minor edits --- source/administration/replica-sets.txt | 17 +++++++++-------- source/tutorial/deploy-replica-set.txt | 12 ++++++++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/source/administration/replica-sets.txt b/source/administration/replica-sets.txt index 72238a5c534..ee452c31d4d 100644 --- a/source/administration/replica-sets.txt +++ b/source/administration/replica-sets.txt @@ -664,7 +664,11 @@ Test the Connection Between Each Member There must be connectivity from every :term:`replica set` member to every other member in order for replication to work. Problems with network or firewall rules can prevent this connectivity and prevent -replication from working. To test the connection from every member to +replication from working. Network topologies and firewalls might allow a +connection in one direction but not the other. Therefore you must make +sure to verify that the connection works in both directions. + +To test the connection from every member to every other member, in both directions, consider the following example: .. example:: Given a replica set with three members running on three separate @@ -679,19 +683,16 @@ every other member, in both directions, consider the following example: .. code-block:: sh - mongo --host m2.example.net --port 27017" + mongo --host m2.example.net --port 27017 - mongo --host m3.example.net --port 27017" + mongo --host m3.example.net --port 27017 #. Test the connection from ``m2.example.net`` to the other two hosts by running similar appropriate operations from ``m2.example.net``. - This means you have now tested the connection between + You have now tested the connection between ``m2.example.net`` and ``m1.example.net`` twice, but each time - from a different direction. This is important to verifying - connectivity. Network topologies and firewalls might allow a - connection in one direction but not the other. Therefore you must - make sure to verify that the connection works in both directions. + from a different direction. #. Test the connection from ``m3.example.net`` to the other two hosts by running the operations from ``m3.example.net``. diff --git a/source/tutorial/deploy-replica-set.txt b/source/tutorial/deploy-replica-set.txt index 57463ec0a48..32f196e2ed7 100644 --- a/source/tutorial/deploy-replica-set.txt +++ b/source/tutorial/deploy-replica-set.txt @@ -49,8 +49,10 @@ Deploy a Development or Testing Replica Set The examples in this procedure create a new replica set named ``rs0``. -1. Before creating your replica set, verify there is full connectivity - between all the hosts to be in the replica set, as described in +1. Before creating your replica set, verify that every member can + successfully connect to every other member. The connection between + any two members must work in both directions. To test the connection + from each member to every other member, see :ref:`replica-set-troubleshooting-check-connection`. #. Start three instances of :program:`mongod` as members of a replica @@ -190,8 +192,10 @@ deployment described above, with the following differences: To deploy a production replica set: -1. Before creating your replica set, verify there is full connectivity - between all the hosts to be in the replica set, as described in +1. Before creating your replica set, verify that every member can + successfully connect to every other member. The connection between + any two members must work in both directions. To test the connection + from each member to every other member, see :ref:`replica-set-troubleshooting-check-connection`. #. On each system start the :program:`mongod` process by issuing a