Skip to content
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

[4.5.0][CE] MongoError: index already exist after upgrade #24672

Closed
CAberry opened this issue Mar 2, 2022 · 3 comments
Closed

[4.5.0][CE] MongoError: index already exist after upgrade #24672

CAberry opened this issue Mar 2, 2022 · 3 comments
Labels
stat: no response Issue with no response after a given time stat: waiting response

Comments

@CAberry
Copy link

CAberry commented Mar 2, 2022

Dear rocket team,

os: Debian 11
node : 14.18.3
mongo: 5.0.6
npm: 6.14.15

I encountered the following error after upgrading from 4.3.3 to version 4.5.0.

Similar closed issue -> #24347
Also seen and applied this workaround fix from same issue ( Working great by the way )

Mar 02 12:51:03  systemd[1]: Starting The Rocket.Chat server...
Mar 02 12:51:23  systemd[1]: Started The Rocket.Chat server.
Mar 02 12:51:26  rocketchat[332099]: /opt/Rocket.Chat/programs/server/node_modules/fibers/future.js:313
Mar 02 12:51:26  rocketchat[332099]:                                                 throw(ex);
Mar 02 12:51:26  rocketchat[332099]:                                                 ^
Mar 02 12:51:26  rocketchat[332099]: MongoError: An equivalent index already exists with the same name but different options. Requested index: { v: 2, unique: true, key: { username: 1 }, name: "username_1", sparse: true }, existing index: { v: 2, unique: true, key: { username: 1 }, name: "username_1", ns: "rocketchat.users", sparse: 1 }
Mar 02 12:51:26  rocketchat[332099]:     at MessageStream.messageHandler (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:272:20)
Mar 02 12:51:26  rocketchat[332099]:     at MessageStream.emit (events.js:400:28)
Mar 02 12:51:26  rocketchat[332099]:     at processIncomingData (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
Mar 02 12:51:26  rocketchat[332099]:     at MessageStream._write (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
Mar 02 12:51:26  rocketchat[332099]:     at writeOrBuffer (internal/streams/writable.js:358:12)
Mar 02 12:51:26  rocketchat[332099]:     at MessageStream.Writable.write (internal/streams/writable.js:303:10)
Mar 02 12:51:26  rocketchat[332099]:     at Socket.ondata (internal/streams/readable.js:731:22)
Mar 02 12:51:26  rocketchat[332099]:     at Socket.emit (events.js:400:28)
Mar 02 12:51:26  rocketchat[332099]:     at addChunk (internal/streams/readable.js:293:12)
Mar 02 12:51:26  rocketchat[332099]:     at readableAddChunk (internal/streams/readable.js:267:9)
Mar 02 12:51:26  rocketchat[332099]:     at Socket.Readable.push (internal/streams/readable.js:206:10)
Mar 02 12:51:26  rocketchat[332099]:     at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
Mar 02 12:51:26  rocketchat[332099]:   ok: 0,
Mar 02 12:51:26  rocketchat[332099]:   code: 85,
Mar 02 12:51:26  rocketchat[332099]:   codeName: 'IndexOptionsConflict',
Mar 02 12:51:26  rocketchat[332099]:   '$clusterTime': {
Mar 02 12:51:26  rocketchat[332099]:     clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1646221885 },
Mar 02 12:51:26  rocketchat[332099]:     signature: {
Mar 02 12:51:26  rocketchat[332099]:       hash: Binary {
Mar 02 12:51:26  rocketchat[332099]:         _bsontype: 'Binary',
Mar 02 12:51:26  rocketchat[332099]:         sub_type: 0,
Mar 02 12:51:26  rocketchat[332099]:         position: 20,
Mar 02 12:51:26  rocketchat[332099]:         buffer: Buffer(20) [Uint8Array] [
Mar 02 12:51:26  rocketchat[332099]:           0, 0, 0, 0, 0, 0, 0,
Mar 02 12:51:26  rocketchat[332099]:           0, 0, 0, 0, 0, 0, 0,
Mar 02 12:51:26  rocketchat[332099]:           0, 0, 0, 0, 0, 0
Mar 02 12:51:26  rocketchat[332099]:         ]
Mar 02 12:51:26  rocketchat[332099]:       },
Mar 02 12:51:26  rocketchat[332099]:       keyId: 0
Mar 02 12:51:26  rocketchat[332099]:     }
Mar 02 12:51:26  rocketchat[332099]:   },
Mar 02 12:51:26  rocketchat[332099]:   operationTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1646221885 }
Mar 02 12:51:26  rocketchat[332099]: }
Mar 02 12:51:26  systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
Mar 02 12:51:26  systemd[1]: rocketchat.service: Failed with result 'exit-code'.

If you need any more informations, i'll do my best to share them with you.

Any fix would be greatly apreciated :)

Greetings,

@CAberry CAberry changed the title MongoError: index already exist after 4.5.0 upgrade [4.5.0][CE] MongoError: index already exist after upgrade Mar 2, 2022
@hugocostadev
Copy link
Contributor

Do you still have this problem? Let me know please...

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

This issue has been marked as stale because there has been no further activity in the last 10 days. If the issue remains stale for the next 4 days (a total of 14 days with no activity), then it will be assumed that the question has been resolved and the issue will be automatically closed.

@github-actions github-actions bot added the stat: no response Issue with no response after a given time label Jul 5, 2023
@github-actions
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: no response Issue with no response after a given time stat: waiting response
Projects
None yet
Development

No branches or pull requests

2 participants