[GODRIVER-879] Not able to connect to MongoDB Atlas without starting local Mongo server Created: 15/Mar/19 Updated: 03/Apr/19 Resolved: 02/Apr/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Connections |
| Affects Version/s: | 1.0.0-rc1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Yong Wei Lun | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 18.04.2 LTS, |
||
| Issue Links: |
|
||||||||
| Description |
|
I connect to MongoDB Atlas with the following code segment
I was not able to connect to the cluster, hitting this error
However, when I start my local Mongod service, it can connect, everything works fiine |
| Comments |
| Comment by Yong Wei Lun [ 03/Apr/19 ] | ||||||||||||||||||||
|
Hi Kris, But I wasn't running on containers or VMs, it should not have DNS errors | ||||||||||||||||||||
| Comment by Kristofer Brandow (Inactive) [ 02/Apr/19 ] | ||||||||||||||||||||
|
Hi weilun_95@hotmail.com, this is actually a duplicate of --Kris | ||||||||||||||||||||
| Comment by Yong Wei Lun [ 02/Apr/19 ] | ||||||||||||||||||||
|
Hi Kris, the full working example as below
When I run on Ubuntu environment, it stops at 'client connected', and timeout after half minute, depending on the context. When I start local Mongod service, it will successfully ping the database, but it will make a connection to local MongoDB instead of Atlas.
The same code snippet I run it on Mac environment, it works as expected, able to connect to Atlas. | ||||||||||||||||||||
| Comment by Kristofer Brandow (Inactive) [ 01/Apr/19 ] | ||||||||||||||||||||
|
Hi weilun_95@hotmail.com, can you please provide an fully working code example that replicates the issue? | ||||||||||||||||||||
| Comment by Yong Wei Lun [ 16/Mar/19 ] | ||||||||||||||||||||
|
I was able to connect to MongoDB Atlas without starting local Mongod service from macOS 10.14.2, Go 1.12.1 darwin/amd64, Driver 1.0.0 without issues. I have tried to reinstall Go on my Ubuntu 18.04.2 LTS, the problem still exist. I guess the problem is with the Linux build? | ||||||||||||||||||||
| Comment by Yong Wei Lun [ 15/Mar/19 ] | ||||||||||||||||||||
|
I updated the driver to v1.0.0 and I am using Go 1.12, the problem still persist. I found out that it actually connect to my local MongoDB instead of Atlas when I start my local mongod service | ||||||||||||||||||||
| Comment by Kristofer Brandow (Inactive) [ 15/Mar/19 ] | ||||||||||||||||||||
|
I'm using Go 1.12 and v1.0.0 of the driver. | ||||||||||||||||||||
| Comment by Yong Wei Lun [ 15/Mar/19 ] | ||||||||||||||||||||
|
Which Go version and Driver you were using? | ||||||||||||||||||||
| Comment by Kristofer Brandow (Inactive) [ 15/Mar/19 ] | ||||||||||||||||||||
|
I've tried connecting with the provided example and I was able to ping the server without a problem. Can you provide a fully working example? --Kris |