Environment variable BYPASS_MONGO_VALIDATION=true is not bypassing the MongoDB version check
Steps to reproduce:
- Install via snap sudo snap install rocketchat-server or switch branches to “4.x/stable”
- Get system message: “MongoDB version 3.6.23 is deprecated, please upgrade your installation.”
- Add export BYPASS_MONGO_VALIDATION=true to /etc/profile
MongoDB version check should be bypassed and Admins DO NOT receive a Rocket.Cat alert
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)
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.