Damaged MongoDB base

Hello everyone, I apologize for not finding any thread related to my problem. My experience with Linux and snapd is very limited.

VM machine:
snapd 2.60.4
series 16
ubuntu 22.04
kernel 5.15.0-86-generic
Wersja 6.0.0
Wersja silnika aplikacji 1.37.0-alpha.164
Wersja node’a v14.21.2
Migracja bazy danych 292 (17 października 2023 05:33)
MongoDB 5.0.15 / wiredTiger (oplog Włączone)

I set up a server several years ago during the installation of the system, which was version 4 or 3 at that time. One day, when updating the system, I changed the update channel to version 6. Since then, every time I update, the entire server crashes. After changing to version 5 (snap switch rocketchat-server --channel=5.x/stable), everything returns to normal. What can I do in this case? I tried to go through each version sequentially, but when I try to switch to version 6, I still have a problem. Recently, I received information that “Rocket.Chat workspace is now running an unsupported version of Rocket.Chat.”

Error - when update server

user@chat01:~$ sudo snap refresh
error: cannot perform the following tasks:
- Start snap "rocketchat-server" (1556) services (systemctl command [start snap.rocketchat-server.rocketchat-mongo.service] failed with exit status 1: Job for snap.rocketchat-server.rocketchat-mongo.service failed because the control process exited with error code.
See "systemctl status snap.rocketchat-server.rocketchat-mongo.service" and "journalctl -xeu snap.rocketchat-server.rocketchat-mongo.service" for details.
)
systemctl status snap.rocketchat-server.rocketchat-mongo.service
● snap.rocketchat-server.rocketchat-mongo.service - Service for snap application rocketchat-server.rocketchat-mongo
     Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-mongo.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-10-17 12:22:43 UTC; 6min ago
   Main PID: 17324 (mongod)
      Tasks: 82 (limit: 4557)
     Memory: 768.5M
        CPU: 11.360s
     CGroup: /system.slice/snap.rocketchat-server.rocketchat-mongo.service
             └─17324 mongod --config=/var/snap/rocketchat-server/1545/mongod.conf --fork --syslog
journalctl -xeu snap.rocketchat-server.rocketchat-mongo.service

chat01 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Failed with result 'exit-code'.
chat01 systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-mongo.

I would be very grateful for any guidance and help.

Hello There,

Snaps are not the recommended way and they will always cause issues.

If everything returns to normal with version 5, then this is a good sign. I would suggest to create a new VM with Ubuntu 20.04 and install MongoDB 5.0 in it.
Then take a database backup from your current server and restore it on the new server.
Download Rocket Chat 5.4.10, build it and install it on your new server. It should be running without any issues. Once that is done, download Rocket Chat 6.x, build it and replace it with version 5.4.10.

If you need any help in upgrading, reach out to us at:

info@shellstack.io

We can do the upgrade for you at a very reasonable cost. We also provide fully managed Rocket Chat cloud hosting.

Regards,

Bilal