can not connect to server

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.0.3
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Unassigned
            Reporter:
            xiaoliang tian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: