After upgrade from 6.10.2 to 7.2.0 server rocket.chat not working (502 Bad Gateway)

Description

Taking into account the update algorithm and recommendations for updating versions, as well as installation requirements and installation instructions.
There were problems
issue-1 - with creating indexes of uploads files when I uploaded them before the first launch of the rocketchat service. This was solved
issue 2 - with deno work, this module was not updated automatically, and the new version of rocketchat requires the corresponding version, you need to install it when the updated version is already needed. This was solved
issue 3 - nginx ā€œconnect() failed (111: Unknown error) when connecting to upstreamā€ after this error I stopped updating further and rolled back to a snapshot VM

Server Setup Information

  • Version of Rocket.Chat Server: update from 6.10.2 to 7.2.0
  • Operating System: ubuntu 22.04.
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: upgrade from 14 to 20
  • MongoDB Version: 5
  • Proxy: nginx
  • Firewalls involved: ufw

Any additional Information

Also after updating to 7.2.0 everything started, I was happy, but after entering the integration settings, the APP CRASHED window appeared and from that moment error #3, indicated above, began to occur, which I was never able to overcome

Is this you?

Duplicating issues does not get things fixed faster. You just get ignored.

Answered on the issue. Follow up there.

Issue closed. Therefore ask here again.
What if I go the new installation route? Iā€™ll install the latest version of rocketchat on a new VM, using mongodb 7. Iā€™ll dump the database from the old rocketchat instance, and load it into the new rocketchat instance. Is it possible to do this? If not, please explain why?

Why donā€™t you just read the mongo docs on how to upgrade Mongo?

Upgrading a DB is not a Rocket issue as you are using tar and your own Mongo.

You must read the correct docs.

It is pretty simple.

Make sure you set the version compatibility key correctly.

Feature Compatibility Version

I dont upgrade mongodb, I just try upgrade rocketchat, stay mongodb 5. And got 502 error

OK,

if you take the time to read around thoroughly you will find answers to most of your issues.

These are posted a LOT in multiple places. read them all the way through and all the links, a couple of times.

Next, you are using a tar. That is NOT a recommended deployment method and you need to fix your other dependencies - we have already told you that.

As per above. You need to do this manually as you are using a tar. If you used docker or snaps this woudl be done automatically. You chose not to so your are largely on your own.

Read ALL the docs. They are inconsistent and information is scattered.

https://docs.rocket.chat/docs/deploy-with-ubuntu

Additonal deno notes here:

https://docs.rocket.chat/docs/deploy-with-centos

I would suggest latest deno < 2 so currently 1.43.6 I think.

But start with updating your DB which is EOL shortly.

You need to check your nginx reverse proxy. You have provided zero information so we can provide zero help.

This is likely related to your nginx issue. Fix that.

Also note - use a browser to test, not a Electron client. Make sure caches are cleaned as this can cause crashes.

So,

Go back. Fix deno. Upgrade your DB. Fix your proxy. Clear caches. Check your Rocket logs on startup.

1 Like

Update tryā€¦ The listing all used commands. Logs service rocketchat after start. Not work after upgrade to 7.0.0 - ā€œ503 Service Unavailable No server is available to handle this request.ā€
Iā€™m so sad nowā€¦

The connection to my rocketchat server goes like this:
ā†’ the client accesses an external address - chat.my.lab.
ā†’ gets to the router on which haproxy is installed, which redirects the connection to a host on the local network
ā†’ nginx is installed on this host, which redirects the connection to the rocket chat service.

Of course, I can throw off all the service configurations, but I have one question. Why do all versions from branch 6 work correctly with these configs? And any version from branch 7 does not start, but gives the client a 503 error. Where should I look for the error?

Why these?

sudo systemctl start rocketchat
sudo service rocketchat stop

Youā€™re on ubuntu.with systemd. You donā€™t use ā€œserviceā€

opt/Rocket.Chat-6.13.1/
sudo n install 20.17.0

That tells me you didnā€™t read the release notes/requirements properly.

In your notes you donā€™t appear to ā€œstopā€ before upgrading. Is this right or just badly documented?

6.13.1

Engine versions
Node: 14.21.3
MongoDB: 4.4, 5.0, 6.0

I think deno was also a requirement from around 6.10

Likelihood is you are doing a lot of guessing and not enough reading.

You do not need to go through every point release.

Just main latest version eg 6.10.10 ā†’ 6.11.3 ā†’ 6.12.3

I would start by upgrading mongo to 6 before anything. Make sure it is working. Get it out of the way.

Then start upagrading Rocket. Read the releases notes and requirement for each version you install.

However your logs seem to indicate your server is up and running 7.0.0 with Mongo 7.

Just delete the uploads index

1 Like

No idea. Logs/firewall will tell you.

At a wild guess it is because from v7 your Rocket has to connect to the Rocket cloud and it is probably blocked.

Thanks for you answer, reetp!

So, itā€™s done! Congratulations!
I removed all app from marketplace RC what became visible on version 6.13.1 (On 6.10.2 was invisible). And remove all integrations.
My way successful upgrade RC!
But, I think just upgrade from 6.10.2 to 7.2.1. Of course migrate mongo 5-6-7 after it.
All done, thanks all! Close this thread.

I hate systemd but you should not use service on a systemd system. Just good practice and eventually it will be removed.

Yes, I wrote that originally, several years ago :wink:

The FAQ tells you this:

ā†’ 073.x - 1.0.x ā†’ 1.1.x ā†’ 1.2.x ā†’ 1.3.x ā†’ 2.0.x ā†’ 2.1.x

I just updated like this:

Just main latest version eg 6.10.10 ā†’ 6.11.3 ā†’ 6.12.3

As above re deno - it was required with/after 6.10.x - that is related to apps.

Iā€™m not sure how ā€˜invisibleā€™ apps became ā€˜visibleā€™!

Either way it was clearly a problem there and pleased you have it resolved.

In future do incremental steps rather than big leaps. Read all the release notes, and plan and test your upgrades first.