RocketChat / RocketChat/Rocket.Chat

Failed Upgrade From 4.7.2 to 4.8.1

Open
#26,046 15 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

I run RocketChat on CentOS 7 and currently running version 4.7.2. When upgrading to 4.8.1 following the upgrade steps, my RocketChat instance fails to start up throwing the following error:

Jun 28 14:51:50 core rocketchat: Error creating indexes for integration_history MongoError: Index with name: _updatedAt_1 already exists with different options
Jun 28 14:51:50 core rocketchat: at MessageStream.messageHandler (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:272:20)
Jun 28 14:51:50 core rocketchat: at MessageStream.emit (events.js:400:28)
Jun 28 14:51:50 core rocketchat: at MessageStream.emit (domain.js:475:12)
Jun 28 14:51:50 core rocketchat: at processIncomingData (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
Jun 28 14:51:50 core rocketchat: at MessageStream._write (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
Jun 28 14:51:50 core rocketchat: at writeOrBuffer (internal/streams/writable.js:358:12)
Jun 28 14:51:50 core rocketchat: at MessageStream.Writable.write (internal/streams/writable.js:303:10)
Jun 28 14:51:50 core rocketchat: at Socket.ondata (internal/streams/readable.js:731:22)
Jun 28 14:51:50 core rocketchat: at Socket.emit (events.js:400:28)
Jun 28 14:51:50 core rocketchat: at Socket.emit (domain.js:475:12)
Jun 28 14:51:50 core rocketchat: at addChunk (internal/streams/readable.js:293:12)
Jun 28 14:51:50 core rocketchat: at readableAddChunk (internal/streams/readable.js:267:9)
Jun 28 14:51:50 core rocketchat: at Socket.Readable.push (internal/streams/readable.js:206:10)
Jun 28 14:51:50 core rocketchat: at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
Jun 28 14:51:50 core rocketchat: at TCP.callbackTrampoline (internal/async_hooks.js:130:17) {
Jun 28 14:51:50 core rocketchat: operationTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1656420702 },
Jun 28 14:51:50 core rocketchat: ok: 0,
Jun 28 14:51:50 core rocketchat: code: 85,
Jun 28 14:51:50 core rocketchat: codeName: 'IndexOptionsConflict',
Jun 28 14:51:50 core rocketchat: '$clusterTime': {
Jun 28 14:51:50 core rocketchat: clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1656420702 },
Jun 28 14:51:50 core rocketchat: signature: { hash: [Binary], keyId: 0 }
Jun 28 14:51:50 core rocketchat: }
Jun 28 14:51:50 core rocketchat: }
  • Version of Rocket.Chat Server: 4.7.2
  • Operating System: CentOS 7
  • NodeJS Version: v14.18.3
  • MongoDB Version: 4.2.21 / wiredTiger (oplog Enabled)
  • NPM: 6.14.15

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the upgrade from Rocket.Chat 4.7.2 to 4.8.1 with MongoDB 4.2.21 on CentOS 7, then inspect how the integration_history indexes are created. Done means the instance starts successfully without the MongoDB IndexOptionsConflict error.

Written by the indexing model from the issue text.

Assessment

Tech stack
centos, mongodb, node.js
Domain
backend, databases, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.