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

Warn user about failed connection with loadBalanced=true or unsupported apiVersion

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.1.7
    • Affects Version/s: None
    • Component/s: CLI Module
    • None
    • 2
    • Not Needed
    • Iteration Reno

      $ mongosh mongodb://nonexistenthost/?loadBalanced=true
      Current Mongosh Log ID:	619cf8b48bfec0f2d79fd5bd
      Connecting to:		mongodb://nonexistenthost/?loadBalanced=true
      Using MongoDB:		undefined
      Using Mongosh:		1.1.2
      
      For mongosh info see: https://docs.mongodb.com/mongodb-shell/
      
      test> 
      

      mongosh only starts failing once any actual integration with the database is attempted. We should probably try to run e.g. a ping command and print a startup warning if that fails. This also happens when --apiVersion n is specified for a service that doesn’t support API versioning (e.g. 4.x servers).

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: