[COMPASS-139] Add "test" connection Created: 11/Oct/16 Updated: 02/Apr/19 Resolved: 02/Apr/19 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Connectivity |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sam Weaver | Assignee: | Durran Jordan |
| Resolution: | Won't Fix | Votes: | 3 |
| Labels: | FY2019Q2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Epic Link: | COMPASS-2280 | ||||||||
| Description |
User Story"As a Compass user with commercial support, I want to easily copy and paste diagnostic info when a connection fails so that I can include it in the SFSC I open enabling faster resolution from MongoDB Support" Summary> Note @lucas: Updated with complete context per When customers are having problems connecting via Compass we can now provide a much better experience than instructing customers to enable debugging and open the devtools console (see CS-32525). Gathering Diagnostic Datamongodb-connection-model@5.0.0 added a new `status` event. These status events are propagated via mongodb-data-service. Status events are emitted while establishing a connection for each step in the process. Each step has an underlying with a human-readable message property and one property pending||error||complete||skipped. The implementation of these steps/checks can be found in mongodb-connection-model/lib/connect.js (line 170 at time of this writing). Steps ExplainedThe possible values for a status event message are:
Example Usage
List DatabasesThis is currently commented out in mongodb-connection-model and here is the primary reason: it's tricky to actually listDatabases(). The actual command requires the authenticated mongodb user to have escalated privileges. However, there is a workaround detailed in mongodb-data-service/lib/instance-detail-helper.js. This workaround leverages the server's connectionStatus and userInfo commands. It's complicated but very possible to list collections and databases without having underlying escalated privs. See the implementation in mongodb-data-service/lib/instance-detail-helper.js starting at roughly line 283. This underlying complexity would be mitigated by PM-544 (see comments there for more details). UXIn the Compass connect window, when a connection fails, add a link to show "Diagnostic Info" which toggles textarea containing status event messages. Under the textarea, include a "copy diagnostic info" button which writes the contents of the textarea to the clipboard using electron's clipboard API. — Prior ArtRoboMongo
See Robomongo RC8 blog post for more details. While in the area as this will be at least a minor release, please also refactor to split up the ssh-connection-options which appear to be unnecessarily coupled together as discovered on COMPASS-396:
|
| Comments |
| Comment by Massimiliano Marcon [ 02/Apr/19 ] | ||||||||||||||||||||
|
With | ||||||||||||||||||||
| Comment by Peter Schmidt [ 03/Mar/17 ] | ||||||||||||||||||||
|
ping may be useful to have: https://docs.mongodb.com/manual/reference/command/ping/ | ||||||||||||||||||||
| Comment by Dmitry Ryabtsev [ 17/Feb/17 ] | ||||||||||||||||||||
|
I think Compass should easily provide similar diagnostics for SSL connections as mongo shell does. This is to illustrate the current situation: Server's certificate validation fails:
Meaning: The signature chain of the certificate being presented by the server contained a self-signed certificate before any of the certificates in the chain turned up in the CA file. In effect, the server certificate could not be validated by any CA known to the client. Hostname validation fails:
Meaning: The CN, or SAN, in the server certificate do not match the hostname used on connection. Specify a valid hostname according to the certificate. Alternatively, use unvalidated SSL connection, if the server's SSL configuration permits. Private key's password is not correct
Meaning: The password specified for the client's private key is not correct. Unsupported certificate purpose
Meaning: The certificate presented by the server has V3 extensions enabled, the extendedKeyUsage field is present but does not contain the serverAuth flag. | ||||||||||||||||||||
| Comment by Lucas Hrabovsky (Inactive) [ 11/Nov/16 ] | ||||||||||||||||||||
|
From http://blog.robomongo.org/robomongo-rc8/#connectiondiagnostic | ||||||||||||||||||||
| Comment by Lucas Hrabovsky (Inactive) [ 11/Oct/16 ] | ||||||||||||||||||||
|
http://blog.robomongo.org/robomongo-rc8/#connectiondiagnostic |