Running Multiple Instances Error: You are operating multiple instances... some features will not behave as

Description

Hello, i get an error when I connect multiple instances rocketchat server with nginx:

You are operating multiple instances… some features will not behave as

designed.

I have already read all the documentation for rocketchat and a lot of material in the documentation for mongodb))

Steps to play:

1. I’m Install MongoDB Community Edition 5.0.13 (also tried with version 4.4.17)
My config mongodb:

i tried using simple setup:

storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
  engine: wiredTiger
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log
net:
  port: 27017
  bindIp: 127.0.0.1,192.168.10.70
processManagement:
  timeZoneInfo: /usr/share/zoneinfo
replication:
  replSetName: rs01

also i tried using replica set with key file authentication
and using SCRAM to Authenticate Clients

additional configuration part:

security:
    authorization: enabled
    keyFile: /opt/mongokey/key.txt

I first created the main administrator with roles:
{ role: "root", db: "admin" }

and after two users for the rocketchat base and oplog with roles

> for oplog:

{ role: "read", db: "local"},
{ role: "clusterMonitor", db: "admin" }

> for rocketchat

{ role: "readWrite", db: "rchatdb" },
{ role: "clusterMonitor", db: "admin" }

After I started the mongodb server and executed Initiates a replica set

mongo --eval “printjson(rs.initiate())” --authenticationDatabase “admin” -u “mainadmin” -p

or tried a little different

rs.initiate( { _id : “rs01”, members: [ { _id: 0, host: “192.168.10.70:27017” } ] })

rs.conf() and rs.status() - the output shows that everything is ok

2. RocketChat Server

I tried to build rocketchat both manually and run through docker

Based on the rocketchat documentation, I connected mongodb through environment variables

  • simple connect:

Environment=MONGO_URL=mongodb://192.168.10.70:27017/rchatdb?replicaSet=rs01
Environment=MONGO_OPLOG_URL=mongodb://192.168.10.70:27017/local?replicaSet=rs01

  • connection with using authentication

Environment=MONGO_URL=mongodb://rocketchatuser:password@192.168.10.70:27017/rchatdb?authSource=admin&replicaSet=rs01
Environment=MONGO_OPLOG_URL=mongodb://oploguser:password@192.168.10.70:27017/local?authSource=admin&replicaSet=rs01

i tried also trying setting the INSTANCE_IP

docker (simple connect):

docker run -dt --name rocketchat-node1 -p 3001:3001
-e “PORT=3001”
-e “ROOT_URL=https://example.com
-e “MONGO_URL=mongodb://192.168.10.70:27017/rchatdb?replicaSet=rs01”
-e “MONGO_OPLOG_URL=mongodb://192.168.10.70:27017/local?replicaSet=rs01”
-e “INSTANCE_IP=192.168.10.8”
rocketchat/rocket.chat:5.2.0

In general, with one instance, it works without errors, as soon as I add 2 second instance and more connections, an error appears

As an alternative and experiment, I tried using Percona Server for MongoDB, but I come back to this error

3. NGINX
my config nginx is based on these articles:

::::::::
maybe I’m doing something wrong, please help find me the solution to this problem, thanks
::::::::

Server Setup Information

  • Version of Rocket.Chat Server: 5.2.0
  • Operating System: Ubuntu 20.04/Debian 11
  • Deployment Method: Manual Install and Docker
  • Number of Running Instances: 2-4
  • DB Replicaset Oplog: Yes
  • NodeJS Version: 14.19.3
  • MongoDB Version: 4.4.17/5.0.13
  • Proxy: NIGNX
  • Firewalls involved: no

Any additional Information

last logs:

±-----------------------------------------+
| SERVER RUNNING |
±-----------------------------------------+
| |
| Rocket.Chat Version: 5.2.0 |
| NodeJS Version: 14.19.3 - x64 |
| MongoDB Version: 4.4.17 |
| MongoDB Engine: wiredTiger |
| Platform: linux |
| Process Port: 3001 |
| Site URL: example_net |
| ReplicaSet OpLog: Enabled |
| Commit Hash: 08f03cc9d8 |
| Commit Branch: HEAD |
| |
±-----------------------------------------+
{“level”:40,“time”:“2022-10-27T15:53:24.715Z”,“pid”:1,“hostname”:“98cf544766d4”,“name”:“StreamBroadcast”,“msg”:“You are operating multiple instances… some features will not behave as designed.”}
{“level”:50,“time”:“2022-10-27T16:02:43.066Z”,“pid”:1,“hostname”:“98cf544766d4”,“name”:“System”,“msg”:“Exception while invoking method autoTranslate.getSupportedLanguages ‘Auto-Translate is disabled [error-autotranslate-disabled]’”}
{“level”:40,“time”:“2022-10-27T16:03:33.981Z”,“pid”:1,“hostname”:“98cf544766d4”,“name”:“StreamBroadcast”,“msg”:“You are operating multiple instances… some features will not behave as designed.”}
{“level”:50,“time”:“2022-10-27T16:05:34.027Z”,“pid”:1,“hostname”:“98cf544766d4”,“name”:“System”,“msg”:“Exception while invoking method autoTranslate.getSupportedLanguages ‘Auto-Translate is disabled [error-autotranslate-disabled]’”}
{“level”:50,“time”:“2022-10-27T16:50:19.641Z”,“pid”:1,“hostname”:“98cf544766d4”,“name”:“System”,“msg”:“Exception while invoking method autoTranslate.getSupportedLanguages ‘Auto-Translate is disabled [error-autotranslate-disabled]’”}