[COMPASS-7117] Unable to connect MongoDB Compass Created: 15/Aug/23 Updated: 03/Oct/23 Resolved: 18/Aug/23 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | No version |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | shareef sayed | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Documentation Changes: | Not Needed | ||||||||
| Description |
Problem Statement/RationaleUnable to connect to prod db over client, Mongo Compass Please be sure to attach relevant logs with any sensitive data redacted. Steps to ReproduceHow could an engineer replicate the issue you’re reporting? Expected ResultsWhat do you expect to happen? Actual ResultsWhat do you observe is happening? Additional NotesAny additional information that may be useful to include. |
| Comments |
| Comment by Anna Henningsen [ 17/Aug/23 ] |
|
sayed.shareef@udtrucks.com The errors in that log file mean that either your connection string is incorrect (and we have no way of knowing what the right one is) or your network setup or the server’s network setup is incorrect (misconfigured VPN, network access restrictions, etc.). Since you are saying that the connection string has been working for 2 years, I’d assume that it’s the latter. Please ask your system administrator and/or the one of the server. Either way, this is not something that Compass specifically can do anything about. |
| Comment by shareef sayed [ 17/Aug/23 ] |
|
Hi Team,
Is there any update |
| Comment by shareef sayed [ 16/Aug/23 ] |
| Comment by Anna Henningsen [ 16/Aug/23 ] |
|
sayed.shareef@udtrucks.com The part of your log file that you shared does not contain any relevant information. You’ll need to share the entire log file. |
| Comment by shareef sayed [ 16/Aug/23 ] |
|
we are not able connect through vscode also .same error we are facing
|
| Comment by shareef sayed [ 16/Aug/23 ] |
|
Hi anna.henningsen@mongodb.com and basit.chonka@mongodb.com , connection string should correct we are using since last two years. today only we are facing. {"t":\{"$date":"2023-08-16T01:50:20.507Z"} ,"s":"I","c":"COMPASS-MAIN","id":1001000001,"ctx":"logging","msg":"Starting logging","attr":{"version":"1.39.1","nodeVersion":"18.12.1","electronVersion":"23.3.12","chromeVersion":"110.0.5481.208","platform":"win32","arch":"x64","osReleaseName":null,"osReleaseVersion":null,"pendingEarlyLogEventCount":2}} {"t":\{"$date":"2023-08-16T01:50:20.428Z"},"s":"I","c":"COMPASS-PREFERENCES","id":1001000153,"ctx":"preferences","msg":"Skipping global configuration file due to error","attr":{"filename":"C:\\Users\\U100418\\AppData\\Local\\MongoDBCompass ,"s":"I","c":"COMPASS-PREFERENCES","id":1001000158,"ctx":"preferences","msg":"Parsed command line flags","attr":{"options":["_"]}
found error ln log file . could you please check on it |
| Comment by Anna Henningsen [ 15/Aug/23 ] |
|
sayed.shareef@udtrucks.com Compass itself does not listen on any ports by default. It connects to the port specified in the connection string that you enter. As for the problem in the original log file you shared here, it seems that your connection string is either not correct, or the MongoDB service you are trying to connect to is set up using some kind of private DNS. |
| Comment by shareef sayed [ 15/Aug/23 ] |
|
Thanks for your confirmation.
could you please confirm that which port number mongodb compass running?
|
| Comment by Basit Chonka [ 15/Aug/23 ] |
|
sayed.shareef@udtrucks.com mongosh supports all versions of MongoDB. |
| Comment by shareef sayed [ 15/Aug/23 ] |
|
is mongosh support mongodb community version? |
| Comment by Basit Chonka [ 15/Aug/23 ] |
|
sayed.shareef@udtrucks.com you can follow this link for mongosh installation steps or use MongoDB for VSCode plugin. |
| Comment by shareef sayed [ 15/Aug/23 ] |
|
we are not using any mongosh and vscode
How do you install mongosh?
|
| Comment by Basit Chonka [ 15/Aug/23 ] |
|
sayed.shareef@udtrucks.com from the shell output it seems that you're connecting to the MDB server when connected (ssh) to the aws instance and hence shell outputs connecting to: mongodb://127.0.0.1:27017/? Can you try using mongosh/vscode from your OS to connect to the server (using same connection string as used in Compass)? |
| Comment by shareef sayed [ 15/Aug/23 ] |
|
I am able to connect through Mongo shell. only issue mongoDB compass yesterday we are able to connect and today we are facing issue.
MongoDB shell version v4.2.22 The monitoring data will be available on a MongoDB website with a unique URL accessible to you To enable free monitoring, run the following command: db.enableFreeMonitoring() rst-ud-test:SECONDARY>
Our mongb server running on AWS and mongodb compass is on local machine
|
| Comment by Basit Chonka [ 15/Aug/23 ] |
|
Hi sayed.shareef@udtrucks.com, from the logs its seems to a network error. Few things to look into:
Are you able to connect to the MDB server using other options? Like programatic access, mongosh, vscode? |
| Comment by shareef sayed [ 15/Aug/23 ] |
|
Hi ,
COMPASS-DATA-SERVICE","id":1001000023,"ctx":"Connection 0","msg":"Server heartbeat failed
Our MongoDB servers are running on ec2 servers . today we are not able to Mongo Compass
MongoDB server version:4.2 MongoDB Compass: 1.39
|
| Comment by shareef sayed [ 15/Aug/23 ] |
|
Hi Team,
this below log file
14,"ctx":"Connection 13","msg":"Connecting","attr":{"url":"mongodb://<credentials>@mongodb-b.ud.eu-west-1.test.cs.udtrucks.net:27017/?authMechanism=DEFAULT&authSource=admin&appName=MongoDB+Compass","csfle":null}} {"t":\{"$date":"2023-08-15T09:29:59.978Z"},"s":"I","c":"DEVTOOLS-CONNECT","id":1000000042,"ctx":"compass-connect","msg":"Initiating connection attempt","attr":{"uri":"mongodb://<credentials>@mongodb-b.ud.eu-west-1.test.cs.udtrucks.net:27017/?authMechanism=DEFAULT&authSource=admin&appName=MongoDB+Compass","driver": {"name":"nodejs","version":"5.6.0"},"devtoolsConnectVersion":"2.2.0","host":"mongodb-b.ud.eu-west-1.test.cs.udtrucks.net:27017"}} {"t":\{"$date":"2023-08-15T09:29:59.979Z"},"s":"I","c":"COMPASS-DATA-SERVICE","id":1001000021,"ctx":"Connection 13","msg":"Topology description changed","attr":{"isWritable":false,"isMongos":false,"previousType":"Unknown","newType":"Unknown"}} {"t":\{"$date":"2023-08-15T09:29:59.979Z"},"s":"I","c":"COMPASS-DATA-SERVICE","id":1001000019,"ctx":"Connection 13","msg":"Server opening","attr":{"address":"mongodb-b.ud.eu-west-1.test.cs.udtrucks.net:27017"}} {"t":\{"$date":"2023-08-15T09:30:11.078Z"},"s":"W","c":"COMPASS-DATA-SERVICE","id":1001000023,"ctx":"Connection 13","msg":"Server heartbeat failed","attr":{"connectionId":"mongodb-b.ud.eu-west-1.test.cs.udtrucks.net:27017","duration":11098,"failure":"getaddrinfo ENOTFOUND mongodb-b.ud.eu-west-1.test.cs.udtrucks.net"}} {"t":\{"$date":"2023-08-15T09:30:11.079Z"},"s":"W","c":"DEVTOOLS-CONNECT","id":1000000034,"ctx":"compass-connect","msg":"Server heartbeat failure","attr":{"connectionId":"mongodb-b.ud.eu-west-1.test.cs.udtrucks.net:27017","failure":"getaddrinfo ENOTFOUND mongodb-b.ud.eu-west-1.test.cs.udtrucks.net","isFailFast":true,"isKnownServer":true}} {"t":\{"$date":"2023-08-15T09:30:11.079Z"},"s":"W","c":"DEVTOOLS-CONNECT","id":1000000036,"ctx":"compass-connect","msg":"Aborting connection attempt as irrecoverable"} |
| Comment by PM Bot [ 15/Aug/23 ] |
|
Hello sayed.shareef@udtrucks.com, thank you for reaching out to us! The team will review your issue and get back to you soon as soon as possible. Please review your issue to ensure you've included your environment details and have attached relevant logs (with any sensitive data redacted), so that we're best able to provide you a timely and thorough response. Thanks again! |