Closed LolYangccool closed 1 year ago
@LolYangccool follow this step Reinstall the snap package by running the command "sudo snap remove rocketchat-server" followed by "sudo snap install rocketchat-server". This will reinstall the package and may resolve any issues with its configuration.
Hello, Thanks for your message. When I reinstall the snap, I got an error with Mongo.
paul@rocket:~$ sudo snap remove rocketchat-server [sudo] password for paul: 2023-04-21T01:08:59Z INFO Waiting for "snap.rocketchat-server.rocketchat-mongo.service" to stop. 2023-04-21T01:09:05Z INFO Waiting for "snap.rocketchat-server.rocketchat-server.service" to stop. rocketchat-server removed paul@rocket:~$ sudo snap install rocketchat-server error: cannot perform the following tasks:
/snap/rocketchat-server/1545/helpers/mongo.sh: line 17: 24197 Illegal instruction (core dumped) mongod --config=$SNAP_DATA/mongod.conf --fork --syslog [ERROR] mongo server start failed -----)
@LolYangccool: Here are some infos about that problem: https://github.com/RocketChat/rocketchat-server-snap/issues/54#issuecomment-1517150038
Thank you. I have a Sandy Bridge CPU : https://www.intel.fr/content/www/fr/fr/products/sku/64617/intel-xeon-processor-e52420-15m-cache-1-90-ghz-7-20-gts-intel-qpi/specifications.html Or the VPS can be launched on a E5-2450 depending of the usage of my servers by other services. It's a Sandy Bridge to. https://www.intel.fr/content/www/fr/fr/products/sku/64611/intel-xeon-processor-e52450-20m-cache-2-10-ghz-8-00-gts-intel-qpi/specifications.html
What can I do if my CPU is supporting avx/avx2 ?
What type of VPS are you using? I added some info about qemu virtual machines to my comment:
If it is running on a virtual machine using QEMU, you need QEMU 7.2 or newer to have support of avx/avx2 instructions. If QEMU is an older version, you could try to use the cpu of the host system
I'm using a self-hosted VPS, with XCP-ng as hypervisor on the hosts servers.
News about my problem ? Thank you. :)
Same issue
I got apparmor="DENIED" operation="open" profile="snap.rocketchat-server.rocketchat-mongo"
Help me please! Thanks!
Hello, I don't know if it helps at all, but the syntax of the executed command does not follow the snap pattern, the correct syntax would be: sudo snap refresh rocketchat-server --channel=6.x/stable
but I did this update, and version 6 imposes a series of restrictions that version 5 does not impose, such as having to pay to have more than 5 puglins installed, or paying to see who has already viewed the message, which for me made it unfeasible version 6, and to help I still don't know how to downgrade from version 6 to version 5 using snap
@shibiriba sudo snap refresh rocketchat-server --channel=6.x/stable
upgrades to 6.x, but I don't know how to force older Mongo.
version 6 imposes a series of restrictions that version 5 does not impose, such as having to pay to have more than 5 puglins installed, or paying to see who has already viewed the message
Thanks for the information! I will stay on 5.x.
This command don't work for me... Can't upgrade to 6.X due to Mongo.
Try to update to latest version on 5.x, after try the command, restart the snap, and them try to run the command again.
As described here https://forums.rocket.chat/t/rocket-chat-not-starting-after-snap-version-refresh-5-4-5-6-0-0/16579/12, I can't update from 5.x to 6.x due to multiple indexes in mongodb.
Next, I tried to backup rocketchat according to the documentation, remove 5.x via snap, install 6.x via snap and then import my backup and that gave me this error:
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | ERROR! SERVER STOPPED |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: +----------------------------------------------------------------------+
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Your database migration failed: |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | index not found with name [snippeted_1] |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Please make sure you are running the latest version and try again. |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | If the problem persists, please contact support. |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | This Rocket.Chat version: 6.1.5 |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Database locked at version: 286 |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Database target version: 292 |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Commit: 44da8e3e4665301f36c5c7abab368d57c3a8e056 |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Date: Mon Apr 24 17:06:38 2023 -0300 |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Branch: HEAD |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | Tag: 6.1.5 |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: | |
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: +----------------------------------------------------------------------+
Apr 30 10:04:07 chat rocketchat-server.rocketchat-server[1794]: {"level":50,"time":"2023-04-30T08:04:07.855Z","pid":1794,"hostname":"chat","name":"Migrations","err":{"type":"MongoServerError","message":"index not found with name [snippeted_1]","stack":"MongoServerError: index not found with name [snippeted_1]\n at Connection.onMessage (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:230:30)\n at MessageStream.<anonymous> (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:61:60)\n at MessageStream.emit (events.js:400:28)\n at MessageStream.emit (domain.js:475:12)\n at processIncomingData (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:125:16)\n at MessageStream._write (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:33:9)\n at writeOrBuffer (internal/streams/writable.js:358:12)\n at MessageStream.Writable.write (internal/streams/writable.js:303:10)\n at Socket.ondata (internal/streams/readable.js:731:22)\n at Socket.emit (events.js:400:28)\n at Socket.emit (domain.js:475:12)\n at addChunk (internal/streams/readable.js:293:12)\n at readableAddChunk (internal/streams/readable.js:267:9)\n at Socket.Readable.push (internal/streams/readable.js:206:10)\n at TCP.onStreamRead (internal/stream_base_commons.js:188:23)\n at TCP.callbackTrampoline (internal/async_hooks.js:130:17)\n => awaited here:\n at Function.Promise.await (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)\n at server/startup/migrations/v287.ts:58:3\n at /snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40\n => awaited here:\n at Function.Promise.await (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)\n at migrate (server/lib/migrations.ts:158:10)\n at migrateDatabase (server/lib/migrations.ts:262:5)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at migrateDatabase (server/lib/migrations.ts:198:11)\n at module (server/startup/migrations/xrun.js:8:1)\n at fileEvaluate (packages/modules-runtime.js:336:7)\n at Module.require (packages/modules-runtime.js:238:14)\n at Module.moduleLink [as link] (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)\n at module (/snap/rocketchat-server/1547/programs/server/app/app.js:1420021:8)\n at fileEvaluate (packages/modules-runtime.js:336:7)\n at Module.require (packages/modules-runtime.js:238:14)\n at Module.moduleLink [as link] (/snap/rocketchat-server/1547/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)\n at module (/snap/rocketchat-server/1547/programs/server/app/app.js:1426059:8)\n at fileEvaluate (packages/modules-runtime.js:336:7)\n at Module.require (packages/modules-runtime.js:238:14)","ok":0,"code":27,"codeName":"IndexNotFound","$clusterTime":{"clusterTime":{"$timestamp":"7227750697205235713"},"signature":{"hash":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","keyId":0}},"operationTime":{"$timestamp":"7227750697205235713"}},"msg":"index not found with name [snippeted_1]"}```
I still don't have a working upgrade path.
Still the same problem.
@LolYangccool - Thank you for reporting this. We're investigating and trying to reproduce, I'll have additional information for you shortly. @geekgonecrazy tagging for visibility on this item
Seems related to migration 287.
Looks like the index is getting deleted maybe due to prior run failing. But then this time running and the mongo driver is tossing an error because the index doesn’t exist.
Likely need to solve this in a patch. Either wrap in try catch or validate exists before trying to delete
closed by #29215
the fix will be shipped on 6.0.x , 6.1.x and 6.2.0 by this week
paul@rocket:~$ sudo snap refresh channel=6.x/stable rocketchat-server
[sudo] password for paul:
error: cannot refresh "channel=6.x/stable", "rocketchat-server": snap "channel=6.x/stable" is not
installed
paul@rocket:~$
Sorry, with the right command it works for now with the update release some minutes ago. ;)
paul@rocket:~$ sudo snap refresh --channel=6.x/stable rocketchat-server [sudo] password for paul: rocketchat-server (6.x/stable) 6.1.6 from Rocket.Chat (rocketchat✓) refreshed paul@rocket:~$
Why the version updated is 6.1.6 ? The 6.1.7 has been released...
@debdutdeb I think takes a bit to get through on the snaps right?
@debdutdeb I think takes a bit to get through on the snaps right?
yes but in this case the workflow wasn't in 6.1 branch so had to be manual. And the release happened yesterday (Saturday). Ran it now, if tests pass, should take max an hour.
ref https://github.com/RocketChat/Release.Distributions/actions/runs/4973678455/jobs/8899672517
We're having the same problem with upgrading snap-managed rocket.chat from version 5.x to 6.x.
The service snap.rocketchat-server.rocketchat-server
does not start, the relevant error message seems to be this:
An error occurred when creating an index for collection "users: 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: "parties.users", sparse: 1 }
Apart from this, there are two more problems in the upgrade process.
The first one is probably an oversight in the 5.x upgrade process: If you upgrade a snap-managed 4.x rocket.chat instance to version 5.x, the upgrade doesn't bump the MongoDB feature compatibility version. You can do this manually, but if you forget it, the upgrade to rocket.chat 6.x will fail completely. MongoDB fails to start, because MongoDB 5.0 doesn't support 4.2 compatibility. So, with rocket.chat 5.x running (i.e. MongoDB 4.4) you have to do:
# /snap/rocketchat-server/current/bin/mongo
db.adminCommand({ setFeatureCompatibilityVersion: "4.4" })
quit()
before trying to upgrade to 6.x.
The second problem is that with 6.x, the caddy service is started even if it is disabled in snap configuration:
# snap get rocketchat-server caddy
disable
# ps -ef | grep caddy
root 3542 1 0 12:45 ? 00:00:00 /bin/bash /snap/rocketchat-server/1554/bin/start_caddy.sh
root 3603 3542 0 12:45 ? 00:00:03 caddy2 reverse-proxy --change-host-header --from=https://<our.domain> --to=http://127.0.0.1:3000
This used to work in 4.x and 5.x
I will have to look into the index issue, not aware of that.
So, with rocket.chat 5.x running (i.e. MongoDB 4.4) you have to do: /snap/rocketchat-server/current/bin/mongo db.adminCommand({ setFeatureCompatibilityVersion: "4.4" }) quit() before trying to upgrade to 6.x.
You don't have to do any of that, the newest revision takes care of that - https://github.com/RocketChat/server-snap/blob/develop/migrations/pre_refresh/feature_compatibity/00-adopt_version.sh
Could you share which version of 5.x you're trying to upgrade from?
The second problem is that with 6.x, the caddy service is started even if it is disabled in snap configuration:
Yes the proces changed in the recent versions (well over a year). To disable caddy, you'll have to mask the snap.rocketchat-server.rocketchat-caddy
service :)
Although, the inconsistency between snap's service status and the actual service status is a bit annoying. It should not show disable, or actually disable the service if it says disabled.
So, with rocket.chat 5.x running (i.e. MongoDB 4.4) you have to do: /snap/rocketchat-server/current/bin/mongo db.adminCommand({ setFeatureCompatibilityVersion: "4.4" }) quit() before trying to upgrade to 6.x.
You don't have to do any of that, the newest revision takes care of that - https://github.com/RocketChat/server-snap/blob/develop/migrations/pre_refresh/feature_compatibity/00-adopt_version.sh
Could you share which version of 5.x you're trying to upgrade from?
I tried to upgrade from latest 5.x/stable snap today, i.e. Rocket.Chat 5.4.10.
The second problem is that with 6.x, the caddy service is started even if it is disabled in snap configuration:
Yes the proces changed in the recent versions (well over a year). To disable caddy, you'll have to mask the
snap.rocketchat-server.rocketchat-caddy
service :)Although, the inconsistency between snap's service status and the actual service status is a bit annoying. It should not show disable, or actually disable the service if it says disabled.
Ah. I just checked whether caddy is running in 4.x and 5.x, and indeed it is. Then why was the respective snap option not removed? In addition it does seem impossible to mask the service:
# systemctl mask snap.rocketchat-server.rocketchat-caddy.service
Failed to mask unit: File /etc/systemd/system/snap.rocketchat-server.rocketchat-caddy.service already exists.
Same happens if I stop and disable the service before.
So, with rocket.chat 5.x running (i.e. MongoDB 4.4) you have to do: /snap/rocketchat-server/current/bin/mongo db.adminCommand({ setFeatureCompatibilityVersion: "4.4" }) quit() before trying to upgrade to 6.x.
You don't have to do any of that, the newest revision takes care of that - https://github.com/RocketChat/server-snap/blob/develop/migrations/pre_refresh/feature_compatibity/00-adopt_version.sh Could you share which version of 5.x you're trying to upgrade from?
I tried to upgrade from latest 5.x/stable snap today, i.e. Rocket.Chat 5.4.10.
The second problem is that with 6.x, the caddy service is started even if it is disabled in snap configuration:
Yes the proces changed in the recent versions (well over a year). To disable caddy, you'll have to mask the
snap.rocketchat-server.rocketchat-caddy
service :) Although, the inconsistency between snap's service status and the actual service status is a bit annoying. It should not show disable, or actually disable the service if it says disabled.Ah. I just checked whether caddy is running in 4.x and 5.x, and indeed it is. Then why was the respective snap option not removed? In addition it does seem impossible to mask the service:
# systemctl mask snap.rocketchat-server.rocketchat-caddy.service Failed to mask unit: File /etc/systemd/system/snap.rocketchat-server.rocketchat-caddy.service already exists.
Same happens if I stop and disable the service before.
Experiencing the same..
node $SNAP/main.js
/snap/rocketchat-server/1557/programs/server/node_modules/fibers/future.js:313
#011#011#011#011#011#011throw(ex);
errorClass [Error]: [An error occurred when creating an index for collection "users: 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: "parties.users", sparse: 1 }]
at Collection.createIndex (packages/mongo/collection.js:801:15)
at setupUsersCollection (packages/accounts-base/accounts_server.js:1777:9)
at new AccountsServer (packages/accounts-base/accounts_server.js:75:5)
at packages/accounts-base/server_main.js:7:12
at module (packages/accounts-base/server_main.js:19:31)
at fileEvaluate (packages/modules-runtime.js:336:7)
at Module.require (packages/modules-runtime.js:238:14)
at require (packages/modules-runtime.js:258:21)
at /snap/rocketchat-server/1557/programs/server/packages/accounts-base.js:2193:15
at /snap/rocketchat-server/1557/programs/server/packages/accounts-base.js:2200:3
at /snap/rocketchat-server/1557/programs/server/boot.js:369:38
at Array.forEach (<anonymous>)
at /snap/rocketchat-server/1557/programs/server/boot.js:210:21
at /snap/rocketchat-server/1557/programs/server/boot.js:423:7
at Function.run (/snap/rocketchat-server/1557/programs/server/profile.js:256:14)
at /snap/rocketchat-server/1557/programs/server/boot.js:422:13 {
isClientSafe: true,
error: 'An error occurred when creating an index for collection "users: 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: "parties.users", sparse: 1 }',
reason: undefined,
details: undefined,
errorType: 'Meteor.Error'
}
Seems this bug is still in the the latest 6.x snap version when upgrading from 5.x
node $SNAP/main.js /snap/rocketchat-server/1557/programs/server/node_modules/fibers/future.js:313 #011#011#011#011#011#011throw(ex); errorClass [Error]: [An error occurred when creating an index for collection "users: 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: "parties.users", sparse: 1 }] at Collection.createIndex (packages/mongo/collection.js:801:15) at setupUsersCollection (packages/accounts-base/accounts_server.js:1777:9) at new AccountsServer (packages/accounts-base/accounts_server.js:75:5) at packages/accounts-base/server_main.js:7:12 at module (packages/accounts-base/server_main.js:19:31) at fileEvaluate (packages/modules-runtime.js:336:7) at Module.require (packages/modules-runtime.js:238:14) at require (packages/modules-runtime.js:258:21) at /snap/rocketchat-server/1557/programs/server/packages/accounts-base.js:2193:15 at /snap/rocketchat-server/1557/programs/server/packages/accounts-base.js:2200:3 at /snap/rocketchat-server/1557/programs/server/boot.js:369:38 at Array.forEach (<anonymous>) at /snap/rocketchat-server/1557/programs/server/boot.js:210:21 at /snap/rocketchat-server/1557/programs/server/boot.js:423:7 at Function.run (/snap/rocketchat-server/1557/programs/server/profile.js:256:14) at /snap/rocketchat-server/1557/programs/server/boot.js:422:13 { isClientSafe: true, error: 'An error occurred when creating an index for collection "users: 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: "parties.users", sparse: 1 }', reason: undefined, details: undefined, errorType: 'Meteor.Error' }
Seems this bug is still in the the latest 6.x snap version when upgrading from 5.x
Can confirm, I am getting this message as well.
closed by #29215
the fix will be shipped on 6.0.x , 6.1.x and 6.2.0 by this week
Hey @sampaiodiego, could you maybe acknowledge that the above mentioned bug still exists in 6.2.3 and/or open up this issue again? Or should I rather create a new issue for this bug?
Unfortunately the bug still exists in 6.2.3 (note the '1558'):
node $SNAP/main.js
/snap/rocketchat-server/1558/programs/server/node_modules/fibers/future.js:313
throw(ex);
^
errorClass [Error]: [An error occurred when creating an index for collection "users: An equivalent index already exists with the>
at Collection.createIndex (packages/mongo/collection.js:801:15)
at setupUsersCollection (packages/accounts-base/accounts_server.js:1777:9)
at new AccountsServer (packages/accounts-base/accounts_server.js:75:5)
at packages/accounts-base/server_main.js:7:12
at module (packages/accounts-base/server_main.js:19:31)
at fileEvaluate (packages/modules-runtime.js:336:7)
at Module.require (packages/modules-runtime.js:238:14)
at require (packages/modules-runtime.js:258:21)
at /snap/rocketchat-server/1558/programs/server/packages/accounts-base.js:2193:15
at /snap/rocketchat-server/1558/programs/server/packages/accounts-base.js:2200:3
at /snap/rocketchat-server/1558/programs/server/boot.js:369:38
at Array.forEach (<anonymous>)
at /snap/rocketchat-server/1558/programs/server/boot.js:210:21
at /snap/rocketchat-server/1558/programs/server/boot.js:423:7
at Function.run (/snap/rocketchat-server/1558/programs/server/profile.js:256:14)
at /snap/rocketchat-server/1558/programs/server/boot.js:422:13 {
isClientSafe: true,
error: 'An error occurred when creating an index for collection "users: An equivalent index already exists with the same name >
reason: undefined,
details: undefined,
errorType: 'Meteor.Error'
}
@tmoehle this is definitely a different one.. this is not even "our index", this index come from the framework we use..
@debdutdeb do we have any other reports about the username
index?
I guess the only way to fix it is manually removing the index, and letting Rocket.Chat create it again during startup
@sampaiodiego Whether or not its the same index, I don't think matters much for those of us who want to upgrade to 6.x, but are stuck in 5.x because indexes are crashing things when trying to upgrade - because we started in 3.x or before.
I am in particular, not familiar with Mongo enough to try and track down all of the indexing issues and try to solve it myself.
This is an unhandled error. If there is an offending index when attempting to upgrade, the upgrading script needs to handle it - otherwise you don't have a solution, especially if it turns out to be multiple indexes. Even if it turns out that the upgrade needs to do eliminate and rebuild a lot of indexes, that would be better than being stuck unable to move forward with out of date software and looking at other alternatives.
I guess I'll have to open up a new issue for this problem...
Since this problem seems to be ignored by the developers, I tried to fix the upgrade problem by iterating through the procedure "drop index(es) complained about, restart service" several times until it finally succeeded. It was necessary to drop a total of 40 indexes from 7 different collections. I could provide the list if it is of any help.
Since this problem seems to be ignored by the developers, I tried to fix the upgrade problem by iterating through the procedure "drop index(es) complained about, restart service" several times until it finally succeeded. It was necessary to drop a total of 40 indexes from 7 different collections. I could provide the list if it is of any help.
Yes, please! I am happy to get things fixed even manually, I just have zero idea how to start. I don't normally mess with Mongo, which is why I am using snap for this install.
I had the same issue with the users index when I tried upgrading from the latest 5.x version to at the time the latest 6.x version about a month ago. Today, I took the plunge with low expectations following the instructions here https://docs.rocket.chat/deploy/updating-rocket.chat#updating-rocket.chat-snap to do the upgrade again. This time it worked with no issue, the server started, no high cpu usage, and everything seems to be working fine 🤔 . Currently on v6.2.9.
I had to delete the following indexes from Rocket.Chat's MongoDB. I used Robo 3T, forwarded via SSH (the Rocket.Chat MongoDB only listens on localhost for good reason):
Collection users
username_1 emails.address_1 services.resume.loginTokens.hashedToken_1 services.resume.loginTokens.token_1 services.resume.haveLoginTokensToDelete_1 services.resume.loginTokens.when_1 services.password.reset.when_1 services.facebook.id_1 services.github.id_1 services.google.id_1 services.meteor-developer.id_1 services.email.verificationTokens.token_1 services.password.reset.token_1 services.twitter.id_1 services.linkedin.id_1 services.dolphin.id_1 services.drupal.id_1 services.github_enterprise.id_1 services.gitlab.id_1 services.tokenpass.id_1 services.wordpress.id_1
Collection rocketchat_credential_tokens
expireAt_1
Collection rocketchat_livechat_priority
name_1
Collection rocketchat_message
editedAt_1 editedBy._id_1 file._id_1 mentions.username_1 pinned_1 pinnedBy._id_1 starred._id_1
Collection rocketchat_room
open_1 name_1 departmentId_1
Collection rocketchat_subscription
desktopNotifications_1 mobilePushNotifications_1 emailNotifications_1 autoTranslate_1 autoTranslateLanguage_1 userHighlights.0_1
Collection rocketchat_uploads
rid_1
I had to delete the following indexes from Rocket.Chat's MongoDB. I used Robo 3T, forwarded via SSH (the Rocket.Chat MongoDB only listens on localhost for good reason):
Collection users
username_1 emails.address_1 services.resume.loginTokens.hashedToken_1 services.resume.loginTokens.token_1 services.resume.haveLoginTokensToDelete_1 services.resume.loginTokens.when_1 services.password.reset.when_1 services.facebook.id_1 services.github.id_1 services.google.id_1 services.meteor-developer.id_1 services.email.verificationTokens.token_1 services.password.reset.token_1 services.twitter.id_1 services.linkedin.id_1 services.dolphin.id_1 services.drupal.id_1 services.github_enterprise.id_1 services.gitlab.id_1 services.tokenpass.id_1 services.wordpress.id_1
Collection rocketchat_credential_tokens
expireAt_1
Collection rocketchat_livechat_priority
name_1
Collection rocketchat_message
editedAt_1 editedBy._id_1 file._id_1 mentions.username_1 pinned_1 pinnedBy._id_1 starred._id_1
Collection rocketchat_room
open_1 name_1 departmentId_1
Collection rocketchat_subscription
desktopNotifications_1 mobilePushNotifications_1 emailNotifications_1 autoTranslate_1 autoTranslateLanguage_1 userHighlights.0_1
Collection rocketchat_uploads
rid_1
Awesome, @jens-arnold thank you so much for this list!!
I had to delete indexes ending with _1 and it worked. I got the list of duplicate indexes with journalctl.
Hi I'm looking to upgrade my rocket chat from 4.4.x to 6 the problem is the new database schema is different from previous one how can I restore my old data , Please respond if seen and I really appreciate your time in advance
I upgraded to the most recent stable snap over the weekend with no schema issues.
Previously I had issues with it failing to upgrade due to issues.
If you're having issues make sure you're pulling the latest stable snap.
On a VPS runing Ubuntu Server 22.04, Rocket.chat installed via snap package can't be updated to 6.x.
sudo snap refresh --channel=5.x rocketchat-server
sudo snap refresh --channel=6.x rocketchat-server
saw me the error below :error: cannot perform the following tasks:
Server Setup Information:
Client Setup Information