Skip to content

DOCS-426 socket exception when primary steps down #1209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/core/replica-set-elections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ If you have a three-member replica set, where every member has one
vote, the set can elect a primary as long as two members can connect
to each other. If two members are unavailable, the remaining
member remains a :term:`secondary` because it cannot connect to a
majority of the set's members.

While there is no primary, clients cannot write to the replica set.
majority of the set's members. If the remaining member is a
:term:`primary` and two members become unavailable, the primary steps
down and becomes and secondary.

Network Partitions
~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion source/faq/diagnostics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ following commands:
sudo grep mongod /var/log/messages
sudo grep score /var/log/messages

.. _faq-troubleshooting:
.. _faq-keepalive:

Does TCP ``keepalive`` time affect sharded clusters and replica sets?
---------------------------------------------------------------------
Expand Down
24 changes: 24 additions & 0 deletions source/tutorial/troubleshoot-replica-sets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,30 @@ Consider the following example of a bidirectional test of networking:
and firewall configuration and reconfigure your environment to
allow these connections.

Socket Exceptions when Rebooting Secondaries Simultaneously
-----------------------------------------------------------

When you reboot members of a replica set, make sure the set keeps a
majority of its votes available. When a set's active members can no
longer form a majority, the set's :term:`primary` steps down and becomes
a :term:`secondary`. The former primary closes all open connections to
client applications. Clients attempting to write to the former primary
receive socket exceptions and "Connection reset" errors.

For example, if you have a three-member replica set where every member
has one vote, the set can elect a primary only as long as two members
can connect to each other. If two members become unavailable and the
remaining member is a primary, the primary steps down and becomes a
secondary.

When a majority of votes is available, the set elects a primary
and the errors cease.

To avoid errors, reboot replica set member's one at a time.

For more information on votes, see :doc:`/core/replica-set-elections`. For
related information on connection errors, see :ref:`faq-keepalive`.

.. _replica-set-troubleshooting-check-oplog-size:

Check the Size of the Oplog
Expand Down