Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2385

client 3.4 gives "Server selection timed out", but 3.3.5 does not

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.0
    • Component/s: Core
    • Labels:
    • Not Needed

      After updating our mongodb package to 3.4.0 our production/staging servers cannot connect to their database any more.

      Here's the connection string for staging with project-specific information removed:

      mongodb://xxx:xxx@xxxx.servers.mongodirector.com:27017/staging?ssl=true&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-1

      This is how we construct the connection:

      const client = new MongoClient(mongoUrl, {
      {{ connectTimeoutMS,}}
      {{ socketTimeoutMS,}}
      {{ useNewUrlParser: true,}}
      {{ useUnifiedTopology: true,}}
      });

      This is the error output we get with 3.4.0 of the library:

      MongoTimeoutError: Server selection timed out after 30000 ms
      {{ at Timeout._onTimeout (/home/ubuntu/app/node_modules/mongodb/lib/core/sdam/server_selection.js:309:9)}}
      {{ at listOnTimeout (internal/timers.js:531:17)}}
      {{ at processTimers (internal/timers.js:475:7)}}

      It works correctly with 3.3.5

      All systems affected are running some version of linux.

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            dobesv@gmail.com Dobes Vandermeer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: