-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when editing a message that hasn't been received by the server yet #2872
Comments
@engelgabriel this should be a bit more prioritized? |
This is an old issue that seems to have been fixed already. I'll be closing it for now, but if anybody runs into this problem again, you're free to open an issue again. |
I got this error after 2 years. Rocketchat Config: 7/11/2018 10:39:32 AMException while invoking method 'sendMessage' WriteError({"code":11000,"index":0,"errmsg":"E11000 duplicate key error collection: rocketchat.rocketchat_message index: id dup key: { : "xMa6cBQDNSjBtHEMu" }","op":{"_id":"xMa6cBQDNSjBtHEMu","rid":"e59AEf8ehvrP6sKGsw9zxAmA7u5ykZmcbK","msg":"heello, how are you","ts":"2018-07-11T08:39:32.496Z","u":{"_id":"e59AEf8ehvrP6sKGs","username":"john.john","name":"John John"},"mentions":[],"channels":[],"_updatedAt":"2018-07-11T08:39:32.498Z"}}) |
it come to my attention that this happens just when the container is unexpectedly restarted by rancher ,the clients get disconnected and the connect again as soon the rocket.chat runs again. It might just be that this caused the error |
So basically to reproduce this edge case:
rocketchat_1 | Exception while invoking method 'sendMessage' MongoError: E11000 duplicate key error collection: rocketchat.rocketchat_message index: id dup key: { : "8ciEoNY53oEJocvq6" }
rocketchat_1 | at Object.Future.wait (/app/bundle/programs/server/node_modules/fibers/future.js:398:15)
rocketchat_1 | at [object Object]. (packages/meteor/helpers.js:119:1)
rocketchat_1 | at [object Object].MongoConnection.(anonymous function) as insert
rocketchat_1 | at Object.CollectionHooks.defineAdvice.self (packages/matb33_collection-hooks/insert.js:48:1)
rocketchat_1 | at Object.collection.(anonymous function) as insert
rocketchat_1 | at [object Object].Mongo.Collection.(anonymous function) (packages/mongo/collection.js:590:1)
rocketchat_1 | at [object Object].Mongo.Collection.(anonymous function) as insert
rocketchat_1 | at _Class.RocketChat.models._Base._Class.insert (packages/rocketchat_lib/server/models/_Base.coffee:17:24)
rocketchat_1 | at Object.RocketChat.sendMessage (packages/rocketchat_lib/server/functions/sendMessage.coffee:24:44)
rocketchat_1 | at [object Object].Meteor.methods.sendMessage (packages/rocketchat_lib/server/methods/sendMessage.coffee:25:14)
rocketchat_1 | - - - - -
rocketchat_1 | at Object.toError (/app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/utils.js:114:11)
rocketchat_1 | at /app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/collection/core.js:116:29
rocketchat_1 | at /app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1197:7
rocketchat_1 | at /app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1905:9
rocketchat_1 | at Server.Base._callHandler (/app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
rocketchat_1 | at /app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
rocketchat_1 | at [object Object].MongoReply.parseBody (/app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
rocketchat_1 | at [object Object]. (/app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
rocketchat_1 | at [object Object].emit (events.js:95:17)
rocketchat_1 | at [object Object]. (/app/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
Version 0.26
The text was updated successfully, but these errors were encountered: