Suddenly stopped working - Error 502 Bad Gateway


Since yesterday morning Rocket Chat is not working suddenly. Then check the status of the rocket-chat server its showing error as below, can someone help how to resolve this issue.

Server Setup Information

  • Version of Rocket.Chat Server: 1.3.2
  • Operating System: Ubuntu 18
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Don’t know how to see it.
  • NodeJS Version: Don’t know how to see it.
  • MongoDB Version: Don’t know how to see it.
  • Proxy: Not using
  • Firewalls involved: No firewalls

Any additional Information

snap.rocketchat-server.rocketchat-server.service - Service for snap application rocketchat-server.rocketchat-server
Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-server.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-10-31 20:00:37 IST; 49s ago
Main PID: 22457 (startRocketChat)
Tasks: 2 (limit: 4660)
CGroup: /system.slice/snap.rocketchat-server.rocketchat-server.service
├─22457 /bin/bash /snap/rocketchat-server/1416/bin/startRocketChat
└─22548 sleep 25

Oct 31 20:00:37 chat systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
Oct 31 20:00:38 chat rocketchat-server.rocketchat-server[22457]: Mongo is not available, can’t start. Waiting 10 seconds and trying again

check /var/log/daemon.log, do you see an error about not being upgraded to 3.4 before going to 3.6?

If so, I had the same problem and this is how I fixed it: