The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 27

Mongorestore - 502 Bad gateway

Description

Moving live rocket chat to new url and server. The version has to stay the same due to system change management. The mongorestore looks normal without any errors. But when I start up the docker image for the chat server I get a bad gateway 502.

#mongorestore --db=rocketchat /var/dump/parties --drop

I started the server up with docker-compose up and I see this error message:
error: “Can’t find migration version 226”

Server Setup Information

  • Version of Rocket.Chat Server: 3.14.4
  • Operating System: ubuntu
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: ?
  • NodeJS Version:
  • MongoDB Version: 3.6.14
  • Proxy: nginx
  • Firewalls involved: no

Any additional Information

error: “Can’t find migration version 226”

/var/dump/parties

Are you restoring from a snap?

I was given a dump. I don’t have any visibility into the source environment. I know my containers are running the same versions.

Hi bluegamma, Good Morning :wave:

I don’t think so. Migration version 226 is for RC version 3.16.x not 3.14.x
Can you please double check with the source environment administrator?

I was sent a message he was on 3.14. I will double check with him again. Could I just up grade to 3.16 to make it work?

Yes (latest is 3.16.4).

But do keep the backup around, just in case.

1 Like

Uh, since he’s using snap, rc was automatically updated from 3.14.x throughout and he probably didn’t notice.

How can I see what migration version matches to what RC version?

The migrations live here: Rocket.Chat/server/startup/migrations at master · RocketChat/Rocket.Chat · GitHub

you can change the tag for the corresponding version and see if it exists. Or, you can go to the latest tag (master or latest version), click on the file numbered migration and inspect the pull request to find at what version it was introduce

There are probably some other ways, but this will get the info you want :slight_smile:

2 Likes

That’s exactly the method I used today :wink:

I believe it’d be better to have it documented someplace publicly in the coming future.