# Suddenly stopped working - Error 502 Bad Gateway

**URL:** <https://forums.rocket.chat/t/suddenly-stopped-working-error-502-bad-gateway/4934>\
**Category:** Community Support\
**Created:** [October 31, 2019, 2:55pm UTC](https://forums.rocket.chat/t/suddenly-stopped-working-error-502-bad-gateway/4934 "2019-10-31T14:55:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amith.servercake](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@amith.servercake](https://forums.rocket.chat/u/amith.servercake)\
**Post date:** [October 31, 2019, 2:55pm UTC](https://forums.rocket.chat/t/suddenly-stopped-working-error-502-bad-gateway/4934/1 "2019-10-31T14:55:43Z")

</div>

### Description

Hi,  
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

---

<div class="post-metadata">

**Author:** ![dw-dlh](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@dw-dlh](https://forums.rocket.chat/u/dw-dlh)\
**Post date:** [November 6, 2019, 2:44pm UTC](https://forums.rocket.chat/t/suddenly-stopped-working-error-502-bad-gateway/4934/2 "2019-11-06T14:44:07Z")

</div>

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:

> [@Suddenly, mongod is not starting](https://forums.rocket.chat/t/suddenly-mongod-is-not-starting/4983/2):
>
> I had the same problem, and fixed mine. Apparently the snap tried to ‘jump’ too many mongodb versions? NOTE: this ‘repair’ might get broken by the devs when they fix this. I’m running snaps, your mileage might vary. I fixed mine I got a copy of mongodb 3.4 from [https://fastdl.mongodb.org/linux/mongodb-linux-x86\_64-3.4.23.tgz](https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.23.tgz) (the “linux legacy” release) and unpacked it into root’s home folder I cd’d into the unpacked directory/bin and ran ./mongod --repair --dbpath /var/snap/rocketch…
