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

Node's driver can't connect to a local DB, with no internet connection

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: MongoDB 3.2
    • Labels:

      I can connect to a local MongoDB 'test' database with Robomongo, but using Nodejs driver, I get this: (

      > require('mongodb').connect('mongodb://localhost:27017/test').then(console.log, console.log)
      Promise { <pending> }
      > { MongoError: failed to connect to server [localhost:27017] on first connect
          at Pool.<anonymous> (D:\Dev\Gravit\magenta-backend\node_modules\mongodb-core\lib\topologies\server.js:326:35)
          at emitOne (events.js:96:13)
          at Pool.emit (events.js:188:7)
          at Connection.<anonymous> (D:\Dev\Gravit\magenta-backend\node_modules\mongodb-core\lib\connection\pool.js:272:12)
          at Connection.g (events.js:291:16)
          at emitTwo (events.js:106:13)
          at Connection.emit (events.js:191:7)
          at Socket.<anonymous> (D:\Dev\Gravit\magenta-backend\node_modules\mongodb-core\lib\connection\connection.js:175:49)
          at Socket.g (events.js:291:16)
          at emitOne (events.js:96:13)
        name: 'MongoError',
        message: 'failed to connect to server [localhost:27017] on first connect' }
      
      
      

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            caub Cyril Auburtin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: