[GODRIVER-1185] can not connect to server Created: 03/Jul/19  Updated: 08/Jul/19  Resolved: 08/Jul/19

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: 1.0.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: xiaoliang tian Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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



 Comments   
Comment by Esha Bhargava [ 08/Jul/19 ]

xiaoliang.tian Thanks for your report. Please note that this project is for reporting bugs or feature suggestions for the driver. For MongoDB-related support discussion please post on the [mongodb-user group|http://groups.google.com/group/mongodb-user] or [Stack Overflow with the mongodb tag|http://stackoverflow.com/questions/tagged/mongodb]. A question like this involving more discussion would be best posted on the mongodb-users group.

Generated at Thu Feb 08 08:35:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.