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

    XMLWordPrintable

    Details

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

      Description

      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' }
       
      
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: