Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-33941

3.7 master MongoDB Shell cannot connect to Atlas Free Tier

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.4
    • Affects Version/s: 3.7.2
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Platforms 2018-04-09

      When I try to connect to Atlas Free Tier, it retries endlessly:

      > ./mongo "mongodb+srv://<XXXXXX>.mongodb.net/test" --username <USER>
      MongoDB shell version v3.7.2-424-gf60edb06e7
      Enter password:
      connecting to: mongodb+srv://<XXXXXX>.mongodb.net/test
      2018-03-16T15:26:00.956-0400 I NETWORK  [js] Starting new replica set monitor for Cluster0-shard-0/<XXXXXXXX>.mongodb.net.:27017,<XXXXXXXX>.mongodb.net.:27017,<XXXXXXXX>.mongodb.net.:27017
      2018-03-16T15:26:01.156-0400 W NETWORK  [js] Unable to reach primary for set Cluster0-shard-0
      2018-03-16T15:26:01.156-0400 I NETWORK  [js] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
      2018-03-16T15:26:01.761-0400 W NETWORK  [js] Unable to reach primary for set Cluster0-shard-0
      2018-03-16T15:26:01.761-0400 I NETWORK  [js] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
      2018-03-16T15:26:02.363-0400 W NETWORK  [js] Unable to reach primary for set Cluster0-shard-0
      2018-03-16T15:26:02.363-0400 I NETWORK  [js] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.
      ^C
      2018-03-16T15:26:02.918-0400 E -        [main] Error saving history file: FileOpenFailed: Unable to open() file : No such file or directory
      2018-03-16T15:26:02.918-0400 I CONTROL  [main] shutting down with code:0
      

      By comparing against a working implementation, it is clear that the `server_name` extension is not sent in `ClientHello`:

      Example of correct extension:

                  Extension: server_name (len=43)
                      Type: server_name (0)
                      Length: 43
                      Server Name Indication extension
                          Server Name list length: 41
                          Server Name Type: host_name (0)
                          Server Name length: 38
                          Server Name: xxxxxxxxxxxxxxxxxxxxxxxxxx.mongodb.net
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: