-
Type: Task
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.0.0-rc2
-
Component/s: Connections
-
Environment:Docker version 18.09.2, build 6247962
go.mongodb.org/mongo-driver v1.0.0/1c3b9b9
Multistage-Docker-build with: golang:1.12 & ubuntu:18.04
When I shipped my Go application with Docker, I couldn't connect to the mongoDB atlas cluster anymore. Running it locally was not a problem. I can also reach the atlas cluster with the Mongo shell from inside the container. Connecting to a local instance of mongoDB inside another container is also no problem.
URL:
mongodb+srv://<USER>:<PASSWORD>@<Cluster-Name>.gcp.mongodb.net/test?retryWrites=true
Error:
2019/03/25 18:05:34 Mongodb-Ping failed:server selection error: server selection timeout current topology: Type: ReplicaSetNoPrimary Servers: Addr: tarsi-test-shard-00-00-jr80d.gcp.mongodb.net:27017, Type: Unknown, State: Connected, Avergage RTT: 0, Last error: x509: certificate signed by unknown authority Addr: tarsi-test-shard-00-01-jr80d.gcp.mongodb.net:27017 ...