Call net.setDefaultAutoSelectFamily if available

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
              Reporter:
              Anna Henningsen
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: