一切正常,但突然出现mongo错误

时间:2021-04-06 08:20:40

标签: node.js mongodb mongoose

这是错误:

MongoError: user account has been updated after reload. Please reauthenticate the user
  File "/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js", line 268, in MessageStream.messageHandler
    callback(new MongoError(document));
  File "node:events", line 369, in MessageStream.emit
  File "node:domain", line 470, in MessageStream.emit
  File "/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js", line 144, in processIncomingData
    stream.emit(
  File "/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js", line 42, in MessageStream._write
    processIncomingData(this, callback);

非常感谢您对发生的事情的任何帮助。

1 个答案:

答案 0 :(得分:1)

刚才遇到了同样的问题。我可以通过重新启动服务器并重新连接到 Mongo 来解决这个问题,但仍在寻找发生这种情况的原因。