search

Home  >  Q&A  >  body text

mongodb - 用mongoose时,出现 connect ETIMEDOUT

.../node_modules/mongoose/node_modules/mongodb/lib/server.js:235
        process.nextTick(function() { throw err; })
                                            ^
Error: connect ETIMEDOUT
    at exports._errnoException (util.js:746:11)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
高洛峰高洛峰2796 days ago628

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-04-28 09:07:57

    To put it simply, it means that it cannot be connected, and there are generally two situations.

    1. The connected MongoDB is local
      Then you need to check whether your connection string is written correctly and whether the default port number has been changed.

    2. The connected MongoDB is on another server
      First check whether the two servers can communicate normally, and then refer to the first point

    I think at least we need to make sure the above is correct.

    reply
    0
  • Cancelreply