Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
1.0.3
-
None
-
None
Description
when I use mongo cmd to connect to server, it works
my command is
mongo --host ip --port 8635 -u rwuser -p --authenticationDatabase admin --ssl --sslCAFile ca.crt --sslAllowInvalidHostnames
but if you use go driver to connect to db it fails , the uri is
mongodb://rwuser:Tian_2020@ip:8635/test?authSource=admin&replicaSet=replica
{"level":"ERROR","timestamp":"2019-07-03 18:54:41.196 +08:00","file":"v1/common.go:97","msg":"[put] [\u003cnil\u003e] err:server selection error: server selection timeout\ncurrent topology: Type: ReplicaSetNoPrimary\nServers:\nAddr: :8635, Type: Unknown, State: Connected, Average RTT: 0, Last error: dial tcp :8635: connect: connection refused\n"}
Plz help