Upgrade Failure from 2.4.9 to 3.0.3

Server Setup Information

  • Version of Rocket.Chat Server: 2.4.9
  • Operating System: Ubuntu 18.04
  • Deployment Method: 1-click droplet install on DigitalOcean
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 8.17.0
  • MongoDB Version: 4.0.3
  • Proxy: Traefik 1.7.20

Note as a new user I can only post 2 URL’s so I had to add some spaces below, just to post.

Here’s what I did so far…

I created a web account on DigitalOcean,

Then I created a Project “mycompany-StaffChat”, then logged in and went to the “Discovery” section on the left menu, then the Digital Ocean “Marketplace” and searched for Rocket, then went through the 1-Click Install for RocketChat as per: marketplace.digitalocean dot com/ apps/rocket-chat. This created the droplet mycompany-staffchat

A “droplet” on D.O. is basically a server. You can then set the amount of CPU, RAM, etc. The above completed successfully. I then added a domain

I also set a domain A record in the DNS to point to the IP address on DigitalOcean.

Then I was able to SSH into the Digital Ocean server using Putty (any SSH client will work)

Then on the command line I followed one of the steps on the above marketplace page for adding SSL and tweaking it for mycompany

Success!

Then, I was able to use a browser to go to https://staffchat.mycompany.com and whalla, I was running V2.4.9 of RocketChat, and I was able to create an admin login.

I then went back to the D.O. dashboard and powered down, then ran a snapshot as a backup of the working site.

But then as per the marketplace page, I went back to SSH and ran:
sudo rocketchatctl update

Here’s the output:

Current update available for RocketChat server: from 2.4.9 to 3.0.3
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 223 100 223 0 0 3054 0 --:–:-- --:–:-- --:–:-- 3054
100 146M 100 146M 0 0 112M 0 0:00:01 0:00:01 --:–:-- 136M
npm WARN deprecated request@2.88.2: request has been deprecated, see github dot com/ request/request/issues/3142

fibers@4.0.3 install /tmp/bundle/programs/server/node_modules/fibers
node build.js || nodejs build.js

make: Entering directory ‘/tmp/bundle/programs/server/node_modules/fibers/build’
CXX(target) Release/obj.target/fibers/src/fibers.o
CXX(target) Release/obj.target/fibers/src/coroutine.o
CC(target) Release/obj.target/fibers/src/libcoro/coro.o
SOLINK_MODULE(target) Release/obj.target/fibers.node
COPY Release/fibers.node
make: Leaving directory ‘/tmp/bundle/programs/server/node_modules/fibers/build’
Installed in /tmp/bundle/programs/server/node_modules/fibers/bin/linux-x64-57-glibc/fibers.node
npm WARN lifecycle meteor-dev-bundle@~install: cannot run in wd meteor-dev-bundle@ node npm-rebuild.js (wd=/tmp/bundle/programs/server)
added 147 packages from 122 contributors and audited 305 packages in 13.776s

1 package is looking for funding
run npm fund for details

found 1 moderate severity vulnerability
run npm audit fix to fix them, or npm audit for details
Waiting up to 60 seconds for RocketChat server to be active … 2
RocketChat server not running. Cancelling

Then I ran:

npm audit fix

Here’s the output:

npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-03-16T04_03_45_731Z-debug.log

Then I ran:

npm fund

Here’s the output

/root

Then I tried this again:

npm audit fix

same output as the above npm audit fix.

I then ran:

sudo systemctl status rocketchat.service

Output is:

● rocketchat.service - The Rocket.Chat server
Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-03-16 04:00:47 UTC; 11min ago
Process: 1541 ExecStart=/usr/bin/node /opt/Rocket.Chat/main.js (code=exited, status=1/FAILURE)
Main PID: 1541 (code=exited, status=1/FAILURE)

Mar 16 04:00:46 mycompany-staffchat systemd[1]: Started The Rocket.Chat server.
Mar 16 04:00:47 mycompany-staffchat rocketchat[1541]: Meteor requires Node v12.0.0 or later.
Mar 16 04:00:47 mycompany-staffchat systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:00:47 mycompany-staffchat systemd[1]: rocketchat.service: Failed with result ‘exit-code’.

And when I try going back to: https://staffchat.mycompany.com I now get “Bad Gateway”

I tried deleting the droplet, and recreating everything, and instead of doing:

sudo rocketchatctl update

I followed the update procedures here: rocket.chat/ docs/ installation/ updating/

But wound up with the same result “Bad Gateway”

I have changed the actual domain name I use above to simply say “mycompany”.

Can anyone help resolve this?

How the heck do you upgrade without clobbering everything?

Stay safe out there!!!

Disregard. I found the answer here, which worked!!