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

Call net.setDefaultAutoSelectFamily if available

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 1.7.1
    • Affects Version/s: 1.7.0
    • Component/s: Connectivity
    • None
    • Environment:
      macOS homebrew
    • 3
    • Iteration Unicornfish
    • Not Needed

      The mongosh CLI should call net.setDefaultAutoSelectFamily(true) during setup (run.ts), if available, to accommodate for the fact that the homebrew team upgraded mongosh to Node.js 19+ without informing us, leading to connectivity issues when connecting to localhost on systems where that resolves to ::1 before 127.0.0.1.

      As a workaround, users can specify NODE_OPTIONS=--enable-network-family-autoselection in their environment variables for mongosh sessions.

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

              Created:
              Updated:
              Resolved: