Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1185

can not connect to server

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: