-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-50185: Connection troubleshooting #272
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
Changes from 6 commits
9df45a1
5f7d096
590dc58
19ded8b
c71b622
2f076f5
7582ea1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,206 @@ | ||||||||||
| .. _php-connection-troubleshooting: | ||||||||||
|
|
||||||||||
| ========================== | ||||||||||
| Connection Troubleshooting | ||||||||||
| ========================== | ||||||||||
|
|
||||||||||
| .. contents:: On this page | ||||||||||
| :local: | ||||||||||
| :backlinks: none | ||||||||||
| :depth: 2 | ||||||||||
| :class: singlecol | ||||||||||
|
|
||||||||||
| .. facet:: | ||||||||||
| :name: genre | ||||||||||
| :values: reference | ||||||||||
|
|
||||||||||
| .. meta:: | ||||||||||
| :keywords: code example, disconnected, deployment | ||||||||||
|
|
||||||||||
| This page offers potential solutions to issues that you might encounter | ||||||||||
| when using the {+library-short+} to connect to a MongoDB deployment. | ||||||||||
|
|
||||||||||
| .. note:: | ||||||||||
|
|
||||||||||
| This page addresses only connection issues. If you encounter other | ||||||||||
| issues when using MongoDB or the {+library-short+}, visit the following resources: | ||||||||||
|
|
||||||||||
| - The :ref:`Issues & Help <php-issues-and-help>` page for | ||||||||||
| information about reporting bugs, contributing to the library, and | ||||||||||
| finding more resources | ||||||||||
| - The :community-forum:`MongoDB Community Forums </tag/php>` for | ||||||||||
| questions, discussions, or general technical support | ||||||||||
|
|
||||||||||
| Server Connection Errors | ||||||||||
| ------------------------ | ||||||||||
|
|
||||||||||
| When an issue occurs when you attempt to connect to a server, the {+driver-short+} | ||||||||||
| returns an error message. If this error resembles the following message, it | ||||||||||
| indicates that the library cannot connect to a MongoDB deployment: | ||||||||||
|
|
||||||||||
| .. code-block:: none | ||||||||||
| :copyable: false | ||||||||||
|
|
||||||||||
| No suitable servers found (`serverSelectionTryOnce` set): | ||||||||||
| [connection refused calling hello on 'localhost:27017'] | ||||||||||
|
|
||||||||||
| The following sections describe methods that might help resolve the issue. | ||||||||||
|
|
||||||||||
| Check the Connection String | ||||||||||
|
||||||||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||||||
|
|
||||||||||
| Verify that the hostname and port number in the connection string are both | ||||||||||
| accurate. In the sample error message, the hostname is ``127.0.0.1`` and the | ||||||||||
| port is ``27017``. The default port value for an instance of MongoDB Server is | ||||||||||
| ``27017``, but you can configure MongoDB to listen on another port. | ||||||||||
|
||||||||||
| port is ``27017``. The default port value for an instance of MongoDB Server is | |
| ``27017``, but you can configure MongoDB to listen on another port. | |
| port is ``27017``. The default port value for a {+mdb-server+} deployment is | |
| ``27017``, but you can configure MongoDB to listen on another port. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The {+driver-short+} may be unable connect to a MongoDB deployment if | |
| the authorization is not configured correctly. In these cases, the library | |
| The {+driver-short+} may fail to connect to a MongoDB deployment if | |
| the authorization is not configured correctly. In these cases, the library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep as "unable" for style guide reasons
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| If your username or password includes any of the following characters, you | |
| must `percent-encode <https://tools.ietf.org/html/rfc3986#section-2.1>`__ it: | |
| You | |
| must `percent-encode <https://tools.ietf.org/html/rfc3986#section-2.1>`__ the following characters if they appear in your username or password: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should this be changed? The previous slug matched the title better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a duplicate label - there's another php-connection-uri for this section of the Create a Client page, and it seemed like more of a general overview of URIs