RocketChat / install.sh

command line tool to help you install and configure a RocketChat server in a Linux host
https://rocket.chat/docs/installation/rocketchatctl/
32 stars 33 forks source link

Upgrade to 4.5.0 fails #56

Open m4z opened 2 years ago

m4z commented 2 years ago

(Might be related to #55.)

# rocketchatctl update
Updates could be risky, you can use the backup option # rocketchatctl backup, to create a backup of the rocketchat database first. Please check that you have enough space in your system to store the backup.
Current update available for RocketChat server: from 4.4 to 4.5.0.
/usr/local/bin/rocketchatctl: line 1127: jq: command not found
(23) Failed writing body
  installing : node-v12.22.8
       mkdir : /usr/local/n/versions/node/12.22.8
       fetch : https://nodejs.org/dist/v12.22.8/node-v12.22.8-linux-x64.tar.xz
   installed : v12.22.8 (with npm 6.14.15)
Warning: rocketchat.service changed on disk. Run 'systemctl daemon-reload' to reload units.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   132  100   132    0     0    267      0 --:--:-- --:--:-- --:--:--   266
100  165M  100  165M    0     0   927k      0  0:03:02  0:03:02 --:--:-- 25.8M
npm WARN deprecated node-pre-gyp@0.15.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

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

`linux-x64-72-glibc` exists; testing
Binary is fine; exiting
npm WARN lifecycle meteor-dev-bundle@~install: cannot run in wd meteor-dev-bundle@ node npm-rebuild.js (wd=/tmp/bundle/programs/server)
added 157 packages from 85 contributors and audited 157 packages in 7.571s

4 packages are looking for funding
  run `npm fund` for details                                 

found 0 vulnerabilities                  

Warning: rocketchat.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Waiting up to 5 minutes for RocketChat server to be active ... 2                                                                            
Waiting up to 5 minutes for RocketChat server to be active ... 4
RocketChat server not running. Cancelling

In the syslog I see:

Mar  4 12:44:59 trolls.stage.mydomain.example systemd[1]: Started The Rocket.Chat server.
Mar  4 12:44:59 trolls.stage.mydomain.example rocketchat[21508]: Meteor requires Node v14.0.0 or later.
Mar  4 12:44:59 trolls.stage.mydomain.example systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
Mar  4 12:44:59 trolls.stage.mydomain.example systemd[1]: rocketchat.service: Unit entered failed state.
Mar  4 12:44:59 trolls.stage.mydomain.example systemd[1]: rocketchat.service: Failed with result 'exit-code'.
Mar  4 12:44:59 trolls.stage.mydomain.example systemd[1]: rocketchat.service: Service hold-off time over, scheduling restart.
Mar  4 12:44:59 trolls.stage.mydomain.example systemd[1]: Stopped The Rocket.Chat server.
Mar  4 12:44:59 trolls.stage.mydomain.example systemd[1]: Started The Rocket.Chat server.
[…]
Mar  4 12:45:01 trolls.stage.mydomain.example systemd[1]: rocketchat.service: Start request repeated too quickly.
Mar  4 12:45:01 trolls.stage.mydomain.example systemd[1]: Failed to start The Rocket.Chat server.
Mar  4 12:45:01 trolls.stage.mydomain.example systemd[1]: rocketchat.service: Unit entered failed state.
Mar  4 12:45:01 trolls.stage.mydomain.example systemd[1]: rocketchat.service: Failed with result 'exit-code'.

It might very well be that my npm package versions are screwed up because I had huge problems with upgrading Rocket.Chat from 4.3 to 4.4 because some of the npm packages used (I had problems with node-gyp and fibers) seemed to ignore or incorrectly use the proxy, https-proxy and ca-file settings from .npmrc, which is why I had to manually point them to the https-proxy and the ca-file when they seemed to ignore the ca-file and wanted to use the (http) proxy for https sites. I don't know much about node, I'll write a separate issue for that.

m4z commented 2 years ago

Ah, related to RocketChat/Rocket.Chat/issues/24665

m4z commented 2 years ago

Yep, replacing the node path in ExecStart of /lib/systemd/system/rocketchat.service with "14.18.2" fixes the issue.