我正在尝试使用db.messages.deleteMany({"mmsi":{$lt: 100000000}})
从我的MongoDB数据库中删除一些文档。
删除其中的一些错误后,它停止了运行,并且从那以后,当我运行相同的命令时,我遇到了相同的错误:
2019-01-10T16:55:20.084+0100 I NETWORK [thread1] DBClientCursor::init call() failed
2019-01-10T16:55:20.086+0100 E QUERY [thread1] TypeError: err.hasWriteErrors is not a function :
DBCollection.prototype.deleteMany@src/mongo/shell/crud_api.js:408:13
@(shell):1:1
2019-01-10T16:55:20.088+0100 I NETWORK [thread1] trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed
2019-01-10T16:55:20.090+0100 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2019-01-10T16:55:20.090+0100 I NETWORK [thread1] reconnect 127.0.0.1:27017 (127.0.0.1) failed failed
此错误发生后,mongod
进程也被杀死,我应该重新启动它。
我也尝试了remove
和deleteOne
命令,但结果是类似的错误。有什么解决办法和想法吗?