Update issue from 5.4.10 to 6.2.2

Description

Hi, i have Debian 11 and Rocketchat via snap.
i make upgrade from 3x to 4x, then to 5x and all was OK

From 5 to 6 i have this error :

root@webserver:~# sudo snap refresh rocketchat-server
2023-05-25T12:14:15+02:00 INFO Waiting for “snap.rocketchat-server.rocketchat-mongo.service” to stop.
error: cannot perform the following tasks:

  • Start snap “rocketchat-server” (1557) 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 -xe” for details.
    )

Server Setup Information

root@webserver:~# snap info rocketchat-server
name: rocketchat-server
summary: Rocket.Chat server
publisher: Rocket.Chat (rocketchat✓)
license: unset
description: |
Have your own Slack like online chat, built with Meteor. https://rocket.chat/
commands:

  • rocketchat-server.backupdb
  • rocketchat-server.mongo
  • rocketchat-server.restoredb
    services:
    rocketchat-server.rocketchat-caddy: simple, enabled, inactive
    rocketchat-server.rocketchat-mongo: forking, enabled, active
    rocketchat-server: simple, enabled, active
    snap-id: wdBUbiEuMNHmAHLBCXQXOcXaOCvbWS1e
    tracking: 6.x/stable
    refresh-date: today at 10:04 CEST
    channels:
    6.x/stable: 6.2.2 2023-05-19 (1557) 317MB -
    6.x/candidate: ↑
    6.x/beta: ↑
    6.x/edge: 6.2.2 2023-05-19 (1557) 317MB -
    latest/stable: 6.1.5 2023-04-26 (1547) 326MB -
    latest/candidate: ↑
    latest/beta: ↑
    latest/edge: ↑
    5.x/stable: 5.4.10 2023-05-19 (1556) 301MB -
    5.x/candidate: 5.4.4 2023-03-09 (1540) 300MB -
    5.x/beta: 5.4.4 2023-03-09 (1540) 300MB -
    5.x/edge: 5.4.10 2023-05-19 (1556) 301MB -
    4.x/stable: 4.8.7 2022-12-04 (1533) 281MB -
    4.x/candidate: ↑
    4.x/beta: ↑
    4.x/edge: ↑
    installed: 5.4.10 (1555) 301MB -

info from journalctl -xe

May 25 12:51:47 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/netstat” pid=16961 comm=“ftdc” requested_mask>
May 25 12:51:47 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/snmp” pid=16961 comm=“ftdc” requested_mask=“r>
May 25 12:51:47 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=”/proc/16961/mountinfo" pid=16961 comm=“ftdc” requested_mask=“>
May 25 12:51:47 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=”/proc/vmstat" pid=16961 comm=“ftdc” requested_mask=“r” denied>
May 25 12:51:48 webserver kernel: audit: type=1400 audit(1685011907.999:41505): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/netstat” >
May 25 12:51:48 webserver kernel: audit: type=1400 audit(1685011907.999:41506): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/snmp” pid>
May 25 12:51:48 webserver kernel: audit: type=1400 audit(1685011907.999:41507): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/mountinfo” pi>
May 25 12:51:48 webserver kernel: audit: type=1400 audit(1685011907.999:41508): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/vmstat” pid=16961 c>
May 25 12:51:48 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/netstat” pid=16961 comm=“ftdc” requested_mask>
May 25 12:51:48 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/snmp” pid=16961 comm=“ftdc” requested_mask=“r>
May 25 12:51:48 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=”/proc/16961/mountinfo" pid=16961 comm=“ftdc” requested_mask=“>
May 25 12:51:48 webserver audit[16961]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=”/proc/vmstat" pid=16961 comm=“ftdc” requested_mask=“r” denied>
May 25 12:51:49 webserver kernel: audit: type=1400 audit(1685011908.999:41509): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/netstat” >
May 25 12:51:49 webserver kernel: audit: type=1400 audit(1685011908.999:41510): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/16961/net/snmp” pid>

Any ideas ?

I’m also getting this same error… have you made any progress? I read somewhere that they were highly recommending we switch to Docker, but, I haven’t found a straightforward process to migrate. It would be so much easier to fix this issue… I’m going to work on it some today and see where I get. help from Devs would be greatly appreciated

I also, switch tracks to 6.x then:
sudo snap refresh rocketchat-server

then:

Handling re-refresh of “rocketchat-server” as needed
error: cannot perform the following tasks:

  • Start snap “rocketchat-server” (1557) 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 -xe” for details.

name: rocketchat-server
summary: Rocket.Chat server
publisher: Rocket.Chat (rocketchat✓)
store-url: Install Rocket.Chat Server on Linux | Snap Store
contact: Rocket.Chat
license: unset
description: |
Have your own Slack like online chat, built with Meteor. https://rocket.chat/
commands:

  • rocketchat-server.backupdb
  • rocketchat-server.mongo
  • rocketchat-server.restoredb
    services:
    rocketchat-server.rocketchat-caddy: simple, disabled, inactive
    rocketchat-server.rocketchat-mongo: forking, enabled, active
    rocketchat-server: simple, enabled, active
    snap-id: wdBUbiEuMNHmAHLBCXQXOcXaOCvbWS1e
    tracking: 6.x/stable
    refresh-date: today at 09:54 EDT
    channels:
    6.x/stable: 6.2.2 2023-05-19 (1557) 317MB -
    6.x/candidate: ↑
    6.x/beta: ↑
    6.x/edge: 6.2.2 2023-05-19 (1557) 317MB -
    latest/stable: 6.1.5 2023-04-26 (1547) 326MB -
    latest/candidate: ↑
    latest/beta: ↑
    latest/edge: ↑
    5.x/stable: 5.4.10 2023-05-19 (1556) 301MB -
    5.x/candidate: 5.4.4 2023-03-09 (1540) 300MB -
    5.x/beta: 5.4.4 2023-03-09 (1540) 300MB -
    5.x/edge: 5.4.10 2023-05-19 (1556) 301MB -
    4.x/stable: 4.8.7 2022-12-04 (1533) 281MB -
    4.x/candidate: ↑
    4.x/beta: ↑
    4.x/edge: ↑
    installed: 5.4.5 (1544) 300MB -

May 25 09:57:52 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/snmp” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:52 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/mountinfo” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:52 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/vmstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:53 rocketchat kernel: audit: type=1400 audit(1685023072.997:12431129): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/netstat” pid=295127 comm=“ftdc” requested_ma>
May 25 09:57:53 rocketchat kernel: audit: type=1400 audit(1685023072.997:12431130): apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/snmp” pid=295127 comm=“ftdc” requested_mask=>
May 25 09:57:53 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/netstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:53 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/snmp” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:53 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/mountinfo” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:53 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/vmstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:54 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/netstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:54 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/snmp” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:54 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/mountinfo” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:54 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/vmstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:55 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/netstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:55 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/snmp” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:55 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/mountinfo” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:55 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/vmstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:56 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/netstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:56 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/net/snmp” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:56 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/295127/mountinfo” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
May 25 09:57:56 rocketchat audit[295127]: AVC apparmor=“DENIED” operation=“open” profile=“snap.rocketchat-server.rocketchat-mongo” name=“/proc/vmstat” pid=295127 comm=“ftdc” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0

setech@rocketchat:~$ 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 Thu 2023-05-25 09:54:40 EDT; 6min ago
Main PID: 295127 (mongod)
Tasks: 78 (limit: 9166)
Memory: 302.7M
CGroup: /system.slice/snap.rocketchat-server.rocketchat-mongo.service
└─295127 mongod --config=/var/snap/rocketchat-server/1544/mongod.conf --fork --syslog

May 25 09:55:39 rocketchat mongod[295127]: {“t”:{“$date”:“2023-05-25T09:55:39.760-04:00”},“s”:“I”, “c”:“STORAGE”, “id”:22430, “ctx”:“WTCheckpointThread”,“msg”:“WiredTiger message”,“attr”:{“message”:“[1685022939:760693][295127:0x7f6a>
May 25 09:55:41 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:55:41.774-04:00”},“s”:“I”, “c”:“COMMAND”, “id”:51803, “ctx”:“conn24”,“msg”:“Slow query”,“attr”:{“type”:“command”,“ns”:“parties.rocketchat_livechat_agent_activit>
May 25 09:56:40 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:56:40.909-04:00”},“s”:“I”, “c”:“COMMAND”, “id”:51803, “ctx”:“conn27”,“msg”:“Slow query”,“attr”:{“type”:“command”,“ns”:“parties.rocketchat_livechat_trigger”,“com>
May 25 09:56:41 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:56:41.085-04:00”},“s”:“I”, “c”:“COMMAND”, “id”:51803, “ctx”:“conn27”,“msg”:“Slow query”,“attr”:{“type”:“command”,“ns”:“parties.rocketchat_livechat_department”,“>
May 25 09:56:42 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:56:42.670-04:00”},“s”:“I”, “c”:“COMMAND”, “id”:51803, “ctx”:“conn27”,“msg”:“Slow query”,“attr”:{“type”:“command”,“ns”:“parties.rocketchat_message”,“command”:{“i>
May 25 09:56:44 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:56:44.994-04:00”},“s”:“I”, “c”:“STORAGE”, “id”:22430, “ctx”:“WTCheckpointThread”,“msg”:“WiredTiger message”,“attr”:{“message”:“[1685023004:994982][295127:0x7f6a>
May 25 09:57:48 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:57:48.745-04:00”},“s”:“I”, “c”:“STORAGE”, “id”:22430, “ctx”:“WTCheckpointThread”,“msg”:“WiredTiger message”,“attr”:{“message”:“[1685023068:745050][295127:0x7f6a>
May 25 09:58:49 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:58:49.924-04:00”},“s”:“I”, “c”:“STORAGE”, “id”:22430, “ctx”:“WTCheckpointThread”,“msg”:“WiredTiger message”,“attr”:{“message”:“[1685023129:924157][295127:0x7f6a>
May 25 09:59:51 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T09:59:51.776-04:00”},“s”:“I”, “c”:“STORAGE”, “id”:22430, “ctx”:“WTCheckpointThread”,“msg”:“WiredTiger message”,“attr”:{“message”:“[1685023191:776898][295127:0x7f6a>
May 25 10:00:52 rocketchat mongod[295127]: {“t”:{”$date":“2023-05-25T10:00:52.271-04:00”},“s”:“I”, “c”:“STORAGE”, “id”:22430, “ctx”:“WTCheckpointThread”,“msg”:“WiredTiger message”,“attr”:{“message”:"[1685023252:271507][295127:0x7f6a>

==============

Based on the output you provided, the journalctl -xe command showed AppArmor denials related to the rocketchat-mongo service. However, the grep DENIED command you executed on the /var/log/syslog file did not provide any additional denials.

The denials logged in the /var/log/syslog file indicate that the rocketchat-mongo service is being denied access to certain files under the /proc directory. These denials could potentially affect the functionality and performance of Rocket.Chat.

To address these denials, you can try the following steps:

  1. Restart the rocketchat-mongo service:

Copy code

sudo systemctl restart snap.rocketchat-server.rocketchat-mongo.service
  1. Monitor the syslog for new denials:

bashCopy code

sudo tail -f /var/log/syslog | grep DENIED

This command will continuously display new lines containing “DENIED” in the syslog file. It allows you to monitor any new denials that occur while Rocket.Chat is running.

If you continue to see AppArmor denials related to the rocketchat-mongo service, it’s recommended to reach out to the Rocket.Chat support team for further assistance. They can provide more specific guidance and help troubleshoot the issue.
=============RESOLVED===============

OK, just figured this out…

most likely OUR cpu doesn’t support avx or avx2.

I just confirmed this by doing a fresh install on Ubuntu22.04 and came up with this after trying to install RC 6.2.2

error: cannot perform the following tasks:

  • Run install hook of “rocketchat-server” snap if present (run hook “install”: [ERROR] Your cpu does not support avx or avx2 instructions, which is required to run mongo 5.x, shipped with the next version of this snap.)

This agrees with the post on github. This is a requirement of Mongo 5, so you’re stuck on this version 4.X until you upgrade your processor\server.

Fun…

But my CPU support AVX anf AVX2

root@webserver:~# grep -o ‘avx[^ ]*’ /proc/cpuinfo
avx
avx2
avx
avx2
avx
avx2
avx
avx2

I think your VM did not support AVX, AVX2 so MongoDB5 cannot run.

I think you can setup a fresh Rocketchat server then restore DB from old server to new.
I tested and everything ok.