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

XMLWordPrintableJSON

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

      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:
              Christian Amor Kvalheim
              Reporter:
              Cyril Auburtin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: