Skip to content

Commit dde42e7

Browse files
authored
DOCSP-45449: Fix sharedinclude content (#151)
1 parent b985b1f commit dde42e7

File tree

5 files changed

+198
-5
lines changed

5 files changed

+198
-5
lines changed

source/compatibility.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ The following compatibility table specifies the versions of the
1818

1919
The first column lists the driver version.
2020

21-
.. sharedinclude:: dbx/lifecycle-schedule-callout.rst
21+
.. include:: includes/temp/lifecycle-schedule-callout.rst
2222

23-
.. sharedinclude:: dbx/compatibility-table-legend.rst
23+
.. include:: includes/temp/compatibility-table-legend.rst
2424

25-
.. sharedinclude:: dbx/mongodb-compatibility-table-rust.rst
25+
.. include:: includes/mongodb-compatibility-table-rust.rst
2626

2727
Language Compatibility
2828
----------------------
2929

30-
.. sharedinclude:: dbx/language-compatibility-table-rust.rst
30+
.. include:: includes/language-compatibility-table-rust.rst
3131

3232
For more information on how to read the compatibility tables, see the guide on
3333
:ref:`MongoDB Compatibility Tables <about-driver-compatibility>`.

source/connection-troubleshooting.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Connection Troubleshooting
1717
.. meta::
1818
:keywords: code example, disconnected, deployment
1919

20-
.. sharedinclude:: dbx/connection-troubleshooting.rst
20+
.. include:: includes/temp/connection-troubleshooting.rst
2121

2222
.. replacement:: non-connection-issue-callout
2323

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Compatibility Table Legend
2+
++++++++++++++++++++++++++
3+
4+
.. list-table::
5+
:header-rows: 1
6+
:stub-columns: 1
7+
:class: compatibility
8+
9+
* - Icon
10+
- Explanation
11+
12+
* - ✓
13+
- All features are supported.
14+
* - ⊛
15+
- The Driver version will work with the MongoDB version, but not all
16+
new MongoDB features are supported.
17+
* - No mark
18+
- The Driver version is not tested with the MongoDB version.
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
This page offers potential solutions to issues that you might encounter
2+
when using the {+driver-long+} to connect to a MongoDB deployment.
3+
4+
|non-connection-issue-callout|
5+
6+
Server Connection Errors
7+
------------------------
8+
9+
When an issue occurs when you attempt to connect to a server, the {+driver-short+}
10+
returns an error message. If this error resembles the following message, it
11+
indicates that the driver cannot connect to a MongoDB deployment:
12+
13+
|server-selection-timeout-error|
14+
15+
The following sections describe methods that might help resolve the issue.
16+
17+
|check-connection-string-anchor|
18+
19+
Check the Connection String
20+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
21+
22+
Verify that the hostname and port number in the connection string are both
23+
accurate. In the sample error message, the hostname is ``127.0.0.1`` and the
24+
port is ``27017``. The default port value for an instance of MongoDB Server is
25+
``27017``, but you can configure MongoDB to listen on another port.
26+
27+
When connecting to a replica set, include all the replica set hosts in
28+
your connection string. Separate each of the hosts in the connection
29+
string with a comma. This enables the driver to establish a connection if
30+
one of the hosts is unreachable.
31+
32+
|multiple-hosts-connection-guide-link|
33+
34+
|configure-firewall-anchor|
35+
36+
Configure the Firewall
37+
~~~~~~~~~~~~~~~~~~~~~~
38+
39+
If your MongoDB deployment is hosted behind a firewall, ensure the port
40+
on which MongoDB listens is open in the firewall. If your deployment
41+
listens on the default network port, ensure that port ``27017`` is
42+
open in the firewall. If your deployment listens on a different port,
43+
ensure that port is open on the firewall.
44+
45+
.. warning::
46+
47+
Do not open a firewall port unless you are sure that it is the one
48+
that your MongoDB deployment listens on.
49+
50+
|check-the-number-of-connections-anchor|
51+
52+
Check the Number of Connections
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
55+
Each |mongo-client-class| instance supports a maximum number of concurrent open
56+
connections in its connection pool. The configuration parameter |max-pool-size-param|
57+
defines this value and is set to |max-pool-size-default| by default. If the
58+
number of open connections is equal to |max-pool-size-param|, the server waits until
59+
a connection becomes available. If this wait time exceeds the |max-idle-time-param|
60+
value, the driver responds with an error.
61+
62+
|connection-pools-learn-more|
63+
64+
|authentication-error-anchor|
65+
66+
Authentication Errors
67+
---------------------
68+
69+
The {+driver-short+} may be unable connect to a MongoDB deployment if
70+
the authorization is not configured correctly. In these cases, the driver
71+
raises an error message similar to the following message:
72+
73+
|scram-failure-error|
74+
75+
The following sections describe methods that may help resolve the issue.
76+
77+
|check-credentials-formatting-anchor|
78+
79+
Check the Credentials Formatting
80+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81+
82+
One of the most common causes of authentication issues is invalid
83+
credentials formatting in the MongoDB connection string.
84+
85+
|learn-more-connection-string-admonition|
86+
87+
If your connection string contains a username and password, ensure that
88+
they are correctly formatted.
89+
90+
.. note::
91+
92+
If your username or password includes any of the following characters, you
93+
must `percent-encode <https://tools.ietf.org/html/rfc3986#section-2.1>`__ it:
94+
95+
.. code-block:: none
96+
:copyable: false
97+
98+
: / ? # [ ] @
99+
100+
Use your percent-encoded username and password in your connection string.
101+
102+
|percent-encode-example|
103+
104+
|verify-authentication-mechanism-anchor|
105+
106+
Verify the Authentication Mechanism
107+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108+
109+
Ensure that your credentials and authentication mechanism are correct. You can
110+
specify your authentication credentials in the options of your connection string.
111+
112+
|credentials-provider-alternative-method-description|
113+
114+
|authentication-guide-reference|
115+
116+
|verify-authentication-database-anchor|
117+
118+
Verify User Is in Authentication Database
119+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120+
121+
When using a username and password-based authentication method,
122+
the username must be defined in the authentication database.
123+
124+
The default authentication database is the ``admin`` database.
125+
To use a different database for authentication, specify the
126+
``authSource`` option in the connection string.
127+
128+
The following example instructs MongoDB to use the ``users`` database
129+
as the authentication database:
130+
131+
|authsource-param-code-block|
132+
133+
|dns-resolution-anchor|
134+
135+
DNS Resolution Errors
136+
---------------------
137+
138+
The {+driver-short+} may be unable to resolve your DNS connection. When this
139+
happens, you might receive an error message similar to the following message:
140+
141+
|dns-error-message|
142+
143+
If the driver reports this error, try the methods in the following sections
144+
to resolve the issue.
145+
146+
Check Database Deployment Availability
147+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148+
149+
If you are connecting to MongoDB Atlas and your driver cannot find the DNS
150+
host of the Atlas database deployment, the database deployment might be paused
151+
or deleted.
152+
153+
Ensure that the database deployment exists in Atlas. If the cluster is paused,
154+
you can resume the cluster in the Atlas UI or the
155+
:atlas:`Atlas command line interface </cli/stable/>`.
156+
157+
To learn how to resume a cluster, see
158+
:atlas:`Resume One Cluster </pause-terminate-cluster/#resume-one-cluster/>`
159+
in the Atlas documentation.
160+
161+
Check the Network Addresses
162+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
163+
164+
Verify that the network addresses or hostnames in your connection string
165+
are accurate.
166+
167+
If your deployment is hosted on MongoDB Atlas, you can follow the
168+
:atlas:`Connect to Your Cluster </tutorial/connect-to-your-cluster/>`
169+
tutorial to find your Atlas connection string.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. important::
2+
3+
MongoDB ensures compatibility between the MongoDB Server and the drivers
4+
for three years after the server version's end of life (EOL) date. To learn
5+
more about the MongoDB release and EOL dates, see
6+
`MongoDB Software Lifecycle Schedules <https://www.mongodb.com/support-policy/lifecycles>`__.

0 commit comments

Comments
 (0)