Database switch issue

Description

Hello! I decided to try to deploy rocketchat via docker-compose, with the following configuration:
3 containers - monogodb (replicaset)
1 container - rocketchat application.
Based on the output of commands rs.status() and rs.conf() we can conclude that replicaset is configured correctly, the data on secondary mongodb is pulled from primary.
There is a problem of the following nature:
If i stop the container with primary mongodb, the application will not switch to secondary. Can you advise what can be the problem?

Variables to connect to the base:

MONGO_URL: mongodb://root:password@mongo-1:27017,mongo-2:27017/rocketchat?authSource=admin&replicaSet=replicaset
MONGO_OPLOG_URL: mongodb://root:password@mongo-1:27017,mongo-2:27017/local?authSource=admin&replicaSet=replicaset

Server Setup Information

  • Version of Rocket.Chat Server: 5.4.0
  • Operating System: Ubuntu
  • Deployment Method: docker
  • Number of Running Instances: 4 containers (3 - mongodb, 1 - app rocketchat)
  • DB Replicaset Oplog: yes
  • NodeJS Version: 14.19.3
  • MongoDB Version: bitnami/mongodb:5.0
  • Proxy: no