Skip to content

Docsp 29488 - Add Connection Troubleshooting Guide #690

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

Merged
merged 7 commits into from
May 20, 2023

Conversation

DBirtolo-mdb
Copy link
Contributor

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-29488
Staging - https://docs-mongodbcom-staging.corp.mongodb.com/node/docsworker-xlarge/DOCSP-29488/connection-troubleshooting/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?

@DBirtolo-mdb DBirtolo-mdb changed the title Docsp 29488 Docsp 29488 - Add Connection Troubleshooting Guide May 17, 2023
Copy link
Contributor

@ccho-mongodb ccho-mongodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of great info here.

I think making the solutions more actionable, linking out to server docs for administrator-type actions, and keeping the structure and terminology uniform will definitely help users find and solve their related issues.


In most operating systems, each connection is associated with a `file
descriptor
<https://www.computerhope.com/jargon/f/file-descriptor.htm>`_. There is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context:
The old FAQ was a copy and paste from the old GitHub Pages docs and skipped content review. Most of the initial Node.js driver docs (on MongoDB domain) content was also created prior to our team's decision to enforce rules in the style guide.

I think we want to keep in-line with style guide best practices to Use MongoDB-Domain Links When Possible.

Comment on lines 246 to 247
Verify User Is in Authentication Database
-----------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisiting the doc, I don't remember whether which error this specific one was tied to (there are two duplicate headers), but if this one is tied to "com.mongodb.MongoSocketWriteException: Exception sending message", I would guess that this has to do with the network and not with authentication nor authorization. I would double check with DBX engineers or get an external review to verify this potential cause.

Regarding authentication and authorization:

Unless I'm mistaken, if the user does not have any roles, they cannot perform any actions. When the driver attempts to run a command with that user for a command they do not have permissions in their role for, the server will return an error.

When you create a user in the authentication database, you must define their authorization roles to have permissions to do anything. E.g. https://www.mongodb.com/docs/manual/tutorial/create-users/#create-additional-users-for-your-deployment

In a local deployment, you don't need a user and automatically get admin access as that unnamed user.

Connection Error
~~~~~~~~~~~~~~~~

The following error message is a general message indicating that the driver
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
I think it would make sense then to omit "general" and add an explanation that the error has many potential causes to avoid confusion about what "general message" means.

Maybe the adjective "generic" might fit, but would avoid that for any potential negative connotation, unless describing the programming term "generics/generic types".

Copy link
Contributor

@ccho-mongodb ccho-mongodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a couple suggestions. Please make sure the indentation is fixed and there are no build warnings or errors before merging.

Comment on lines 87 to 89
the client and host support both. If MongoDB uses one mode (such as IPv4) and your
client uses a different mode (such as IPv6), this will result in the error message
above.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
The style guide advises against using parentheses other than for a select few reasons.

Suggested change
the client and host support both. If MongoDB uses one mode (such as IPv4) and your
client uses a different mode (such as IPv6), this will result in the error message
above.
the client and host support both. For example, if MongoDB uses IPv4 and your client uses a different mode, such as IPv6, the driver returns the prior error message.

Comment on lines 189 to 191
const password = '#MyP@assword?';
const encodedPassword = encodeURIComponent(password);
console.log(encodedPassword);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue:
The indentation looks off by one space.

Suggestion:

Fix the indentation. Applies to all instances.

The example also seems more verbose than necessary.

  const encodedPassword = encodeURIComponent('#MyP@assword?');
  // The value of encodedPassword is "%23MyP%40assword%3F"

If you want to keep the split between code and output, this could be the code:

  console.log(encodeURIComponent('#MyP@assword?'));

@DBirtolo-mdb DBirtolo-mdb merged commit 6d6d004 into mongodb:master May 20, 2023
@DBirtolo-mdb DBirtolo-mdb deleted the DOCSP-29488 branch May 20, 2023 02:45
DBirtolo-mdb added a commit that referenced this pull request May 20, 2023
* DOCSP-29488: Created initial connection troubleshooting guide

* Additional items pulled from FAQ

* Fixed indentation errors

* PR feedback.

* Further PR review

* Format fixing

* Fixing broken link.

(cherry picked from commit 6d6d004)
mongoKart pushed a commit to mongoKart/docs-node that referenced this pull request Nov 3, 2023
* DOCSP-29488: Created initial connection troubleshooting guide

* Additional items pulled from FAQ

* Fixed indentation errors

* PR feedback.

* Further PR review

* Format fixing

* Fixing broken link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants