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

Mongosh fails to connect to node in state STARTUP2

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 0.7.7
    • Affects Version/s: None
    • Component/s: Connectivity
    • Labels:
    • 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

      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.

       

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

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

              Created:
              Updated:
              Resolved: