Skip to content

Commit 0c5409b

Browse files
author
Bob Grabar
committed
DOCS-538 new step to verify connectivity before deploy rs
1 parent 146d948 commit 0c5409b

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

source/administration/replica-sets.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,49 @@ Possible causes of replication lag include:
656656
- The :ref:`replica-set-procedure-change-oplog-size` topic this document.
657657
- The :doc:`/tutorial/change-oplog-size` tutorial.
658658

659+
.. _replica-set-troubleshooting-check-connection:
660+
661+
Test the Connection Between Each Member
662+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
663+
664+
There must be connectivity from every :term:`replica set` member to
665+
every other member in order for replication to work. Problems with
666+
network or firewall rules can prevent this connectivity and prevent
667+
replication from working. To test the connection from every member to
668+
every other member, in both directions, consider the following example:
669+
670+
.. example:: Given a replica set with three members running on three separate
671+
hosts:
672+
673+
- ``m1.example.net``
674+
- ``m2.example.net``
675+
- ``m3.example.net``
676+
677+
1. Test the connection from ``m1.example.net`` to the other hosts by running
678+
the following operations from ``m1.example.net``:
679+
680+
.. code-block:: sh
681+
682+
mongo --host m2.example.net --port 27017"
683+
684+
mongo --host m3.example.net --port 27017"
685+
686+
#. Test the connection from ``m2.example.net`` to the other two
687+
hosts by running similar appropriate operations from ``m2.example.net``.
688+
689+
This means you have now tested the connection between
690+
``m2.example.net`` and ``m1.example.net`` twice, but each time
691+
from a different direction. This is important to verifying
692+
connectivity. Network topologies and firewalls might allow a
693+
connection in one direction but not the other. Therefore you must
694+
make sure to verify that the connection works in both directions.
695+
696+
#. Test the connection from ``m3.example.net`` to the other two
697+
hosts by running the operations from ``m3.example.net``.
698+
699+
If a connection in any direction fails, there's a networking or
700+
firewall issue that needs to be diagnosed separately.
701+
659702
.. index:: pair: replica set; failover
660703
.. _replica-set-failover-administration:
661704
.. _failover:

source/tutorial/deploy-replica-set.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ Deploy a Development or Testing Replica Set
4949

5050
The examples in this procedure create a new replica set named ``rs0``.
5151

52-
1. Start three instances of :program:`mongod` as members of a replica
52+
1. Before creating your replica set, verify there is full connectivity
53+
between all the hosts to be in the replica set, as described in
54+
:ref:`replica-set-troubleshooting-check-connection`.
55+
56+
#. Start three instances of :program:`mongod` as members of a replica
5357
set named ``rs0``, as described in this step. For ephemeral tests and
5458
the purposes of this guide, you may run the :program:`mongod`
5559
instances in separate windows of GNU Screen. OS X and most Linux
@@ -186,7 +190,11 @@ deployment described above, with the following differences:
186190

187191
To deploy a production replica set:
188192

189-
1. On each system start the :program:`mongod` process by issuing a
193+
1. Before creating your replica set, verify there is full connectivity
194+
between all the hosts to be in the replica set, as described in
195+
:ref:`replica-set-troubleshooting-check-connection`.
196+
197+
#. On each system start the :program:`mongod` process by issuing a
190198
command similar to following:
191199

192200
.. code-block:: sh

0 commit comments

Comments
 (0)