BYPASS_MONGO_VALIDATION=true is not bypassing the MongoDB version check

Description:

Environment variable BYPASS_MONGO_VALIDATION=true is not bypassing the MongoDB version check

Steps to reproduce:

  1. Install via snap sudo snap install rocketchat-server or switch branches to “4.x/stable”
  2. Get system message: “MongoDB version 3.6.23 is deprecated, please upgrade your installation.”
  3. Add export BYPASS_MONGO_VALIDATION=true to /etc/profile

Expected behavior:

MongoDB version check should be bypassed and Admins DO NOT receive a Rocket.Cat alert

Actual behavior:

MongoDB version check runs and Admins DO receive a Rocket.Cat alert

Server Setup Information:

  • Version of Rocket.Chat Server: 4.1.2
  • Operating System: Ubuntu 18.04.5 LTS on Raspberry Pi 4
  • Deployment Method: snap
  • Number of Running Instances: 1
  • NodeJS Version: v12.22.7
  • MongoDB Version: 3.6.23 / wiredTiger (oplog Enabled)

Additional context:

I have exactly this issue where i’ve upgraded Rocket Chat to 4.1.2 via a Snap and i’m getting the message “MongoDB version 3.6.23 is deprecated, please upgrade your installation.”.

The thread goes on to state “The mongo update will happen shortly. You can ignore the deprecation message in the meantime.”, but that was 9 months ago.

I’ve no issue waiting, however, every Admin is getting frequently spammed with Rocket.Cat alerts in the meantime for which there is no corrective action available to us.

This post states:

It’s possible to bypass the MongoDB version check by using the environment variable BYPASS_MONGO_VALIDATION=true. Bare in mind that this work around should be used only when extrictly necessary and may prevent some functionalities to work properly or even prevent the server to start.

This would seem the best course of action but it doesn’t work. I’ve added the variable to /etc/profile and confirmed it is available before Rocket Chat server starts.

Was struggling with these notifications and finally found another flag SKIP_MONGODEPRECATION_CHECK=true to skip banner \ admin notifications. BYPASS_MONGO_VALIDATION just allows you to run rocket on older versions of MongoDB.

Fount it here Rocket.Chat/apps/meteor/server/startup/serverRunning.js at 0ab304de5fd9e34133ae95e546bacb67270ae814 · RocketChat/Rocket.Chat · GitHub

That really isn’t a good idea.

The real answer is upgrade your Mongo. Yup - Mongo 5+ needs AVX extensions so you may have to upgrade hardware too. This has been known for a long time.

As a sysadmin running unsupported versions of any software is not a great idea.

All versions prior to Mongo 7 are now out of support - that isn’t the fault of Rocket.Chat

It also means no security patches, and Rocket may well use functions that are ONLY supported on newer versions of Mongo.

A Rocket upgrade could totally bork your install.

Make sure you have backups……. NB if you have issues then any github issues you open will get closed……