-
Notifications
You must be signed in to change notification settings - Fork 10.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
[BUG] errmsg: 'E11000 duplicate key error index: rocketchat.rocketchat_message_read_receipt.$roomId_1_userId_1_messageId_1 dup key #17045
Comments
Temporary disabled Detailed Read Receipts. |
Now true cause of that error is unknown. I did try to edit message after it was read by a few users and that error did not appear. |
Hi, check time synchro on all you servers. I had simillar issue when servers didn't synchronize time with NTP. |
I have same issue on |
@dusatvoj yes. are you able to reproduce it every time you want or it just happen some times? I still don't know what actions cause the error to happen |
@sampaiodiego I'm sorry, I don't know how to reproduce it :/ but as it's already written here I think it could be caused with message edit and detailed read receipt. I'm not a programmer but how it's handled by clients when message is edited? |
Any update on this? |
Hi, our team successfully found fix for this bug! Thanks ;) |
that's good news @galshiff .. you just need to fork the repo and submit a pull request, no need to approval account.. see https://guides.github.com/activities/forking/ |
Hi @galshiff |
Closed by #18560 |
We also just get this error here. What did we do so far... upgraded server from v-3.3.0 to v-3.10.4 And after the upgrade process this happened during the first start up of the rocketchat server . logging:
I appears that all migrations has been applied:
|
@sampaiodiego hey, Diego! |
It's very odd to bump this but i still got it quite often on version 6.6.3 in March 2024. Which also just kills my server for a while o people can't chat anymore. |
we have the same error as well |
Here's a solution that fixes this bug: Before running the commands provided there you should launch MongoDB shell with the command mongosh and then switch to rocketchat database by running use rocketchat |
Description:
From time to time rocket chat instances show that error:
errmsg: 'E11000 duplicate key error index: rocketchat.rocketchat_message_read_receipt.$roomId_1_userId_1_messageId_1 dup key: { : "6mkv7tvrJAmi4AJrR", : "pE4ztmmZFNJ5TZXFv", : "raufRbopbb9NDcGsQ" }',
But @frdmn advised me that it is an old bug, that was already fixed in #10061 by @sampaiodiego
But our server version is 3.0.3 and we have that bug on a regular basis.
How to fix it? Delete duplicate from mongodb? How to do it correctly?
Expected behavior:
Not have error E11000 duplicate key error index
Actual behavior:
Error and maybe rocket chat instance crash and server resource consume.
Server Setup Information:
Client Setup Information
Additional context
Show Read Receipts and Detailed Read Receipts are enabled
![image](https://user-images.githubusercontent.com/4023037/77748434-6812ea80-7031-11ea-880d-533d9e2e836d.png)
![image](https://user-images.githubusercontent.com/4023037/77748484-7fea6e80-7031-11ea-88ba-8469a4ea4120.png)
Allow Message Editing and Allow Message Deleting are enabled for 10 minutes
Relevant logs:
Logs from Kibana:
The text was updated successfully, but these errors were encountered: