Rocket.Chat's Community Open Call 🎤 Jan 19th, 2022 Join us!

Snap "MongoDB Failed to connect ... reason: Permission denied" after switching tracks from 3.x/stable to 4.x/stable

Description

I have a fresh Snap install of RC-server on Ubuntu Server 18.04 LTS. My problem is that when i switch to or directly install the 4.x/stable channel, i can’t connect to mongodb.
the RC Setup-Wizard just shows an empty page and trying to access the mongo shell with “rocketchat-server.mongo” fails with the error “Failed to connect to 127.0.0.1:27017, in(socket), reason: Permission denied”

Server Setup Information

  • Version of Rocket.Chat Server: 4.x/stable (so 4.2.2)
  • Operating System: Ubuntu Server 18.04 LTS
  • Deployment Method: snap
  • Number of Running Instances: 1

Any additional Information

If i do a normal install without specifying the channel everything works fine. However the project-requirements need it to run on version 4.
I tried switching to 4.x after installation, as well as trying to install directly from the channel. Also i deleted the snapshots before each installation attempt.