Roadmap Reveal 🗺 What's next for Rocket.Chat, Sep 22

Setup With MongoDB 4.2


I am trying to upgrade my mongodb to version 4.2. I am currently running RocketChat version 3.18.

Server Setup Information

  • Version of Rocket.Chat Server: 3.18
  • Operating System: Docker
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.22.1 - x64
  • MongoDB Version: 4.0.27
  • Proxy: apache
  • Firewalls involved: None

Any additional Information

Any time I upgrade mongodb to 4.2

I get MongoDB shell version v4.2.16
connecting to: mongodb://rocketchat-mongo:27017/rocketchat?compressors=disabled&gssapiServiceName=mongodb
2021-09-15T15:13:44.340+0000 E QUERY [js] Error: couldn’t connect to server rocketchat-mongo:27017, connection attempt failed: HostNotFound: Could not find address for rocketchat-mongo:27017: SocketException: Host not found (authoritative) :

First, I don’t think 4.2 is officially supported yet. YMMV.

Second you need to work out the error here:

HostNotFound: Could not find address for rocketchat-mongo:27017

You probably need to fix your DNS.

According to the github release notes supported versions of mongodb include 4.2 since rocketchat version 3.15. This error happens based on the mongo-init-replica.

It seems that data cannot be imported directly from mongo 4.0 to 4.2 if the storageEngines are different it will cause the mongod service to not start this is the solution to the problem I am having.

Ahhh - I missed that one. Good spot!!

I’m getting to old for this :slight_smile:

Ahh - that won’t help.

A good reason to try and explain exactly what you have been doing first.


This may be of more assistance in your case.

I’d still make sure things are properly resolvable though… rocketchat-mongo should resolve.