Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-465

Mongosh fails to connect to node in state STARTUP2

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Fixed
    • None
    • 0.7.7
    • Connectivity
    • Needed
    • Hide
      This changes the _default_ behavior of how mongosh connects to MongoDB nodes. The new behavior now is in line with the old shell (with 1 exception outlined below).

      The default behavior now is to add the directConnection=true query parameter to the connection string automatically except if at least one of the following is true:

      - the replicaSet query parameter is present in the connection string
      - the connection string uses the mongodb+srv:// scheme
      - the connection string contains a seed list with multiple hosts

      Only the last case (multiple hosts) is a breaking change compared to the old shell behavior. The old shell would connect directly to the first host if no replicaSet / SRV were given. mongosh will treat the seed lists now as the nodes of a replica set and try to connect to the primary.
      Show
      This changes the _default_ behavior of how mongosh connects to MongoDB nodes. The new behavior now is in line with the old shell (with 1 exception outlined below). The default behavior now is to add the directConnection=true query parameter to the connection string automatically except if at least one of the following is true: - the replicaSet query parameter is present in the connection string - the connection string uses the mongodb+srv:// scheme - the connection string contains a seed list with multiple hosts Only the last case (multiple hosts) is a breaking change compared to the old shell behavior. The old shell would connect directly to the first host if no replicaSet / SRV were given. mongosh will treat the seed lists now as the nodes of a replica set and try to connect to the primary.
    • Iteration Rambutan

    Description

      See https://jira.mongodb.org/browse/NODE-2908 it seems there is a drivers limitation however the shell should be able to connect for diagnostic reasons.

       

      Attachments

        1. image-2020-12-02-17-39-38-518.png
          108 kB
          Michael Rose
        2. image-2020-12-03-09-48-55-124.png
          82 kB
          Alex Bevilacqua
        3. screenshot-1.png
          43 kB
          Alex Bevilacqua

        Issue Links

          Activity

            People

              michael.rose@mongodb.com Michael Rose (Inactive)
              anna.herlihy@mongodb.com Anna Herlihy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: