MongoDB: UnhandledPromiseRejectionWarning: MongoError: Cannot use a session that has ended

(node:11104) UnhandledPromiseRejectionWarning: MongoError: Cannot use a session that has ended
    at applySession (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\sessions.js:707:12)
    at _command (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\wireprotocol\command.js:58:17)
    at command (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\wireprotocol\command.js:28:5)
    at writeCommand (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\wireprotocol\write_command.js:47:3)
    at Object.insert (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\wireprotocol\index.js:6:5)
    at Connection.insert (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\cmap\connection.js:178:8)
    at E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\sdam\server.js:454:13
    at Object.callback (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\cmap\connection_pool.js:351:7)
    at E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\cmap\connection_pool.js:505:23
    at E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\cmap\connection_pool.js:431:7
    at callback (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\connection\connect.js:97:5)
    at E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\connection\connect.js:169:5
    at E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\core\connection\connect.js:334:7
    at MessageStream.messageHandler (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\cmap\connection.js:270:5)
    at MessageStream.emit (events.js:311:20)
    at processIncomingData (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\cmap\message_stream.js:144:12)
    at MessageStream._write (E:\work_space\enforce\mc\cloudenforce\opcsec\contrail-web-core\node_modules\mongodb\lib\cmap\message_stream.js:42:5)
    at doWrite (_stream_writable.js:441:12)
    at writeOrBuffer (_stream_writable.js:425:5)
    at MessageStream.Writable.write (_stream_writable.js:316:11)
    at Socket.ondata (_stream_readable.js:714:22)
    at Socket.emit (events.js:311:20)
(node:11104) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

千码君2016

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值