Upgrading rocketchat from 3.2.1 to 4.5.0 failure

Description

Current prod version: mongo atlas 4.2 and rocketchat 3.2.1
Failing to upgrade rocketchat to 4.5.0 by connect mongodb atlas(5.0) to ec2(aws) version 4.5.0 with next error:

Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: {“level”:20,“time”:“2023-02-14T10:09:31.548Z”,“pid”:1005,“hostname”:“ip-10-0-1-11”,“name”:“”,“name”:“Callbacks”,“msg”:“Executing callback with id uWJcsoRSWu2in78Td for hook workspaceLicenseChanged”}
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: === UnHandledPromiseRejection ===
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: Error: Start date cannot be later than expire date
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: at BannersRaw.create (app/models/server/raw/Banners.ts:23:10)
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: at server/services/banner/service.ts:56:22
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: => awaited here:
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: at Function.Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: at server/sdk/lib/LocalBroker.ts:15:15
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: ---------------------------------
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: Errors like this can cause oplog processing errors.
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the process
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: Future node.js versions will automatically exit the process
Feb 14 10:09:31 ip-10-0-1-11 rocketchat[1005]: =================================
Feb 14 10:09:31 ip-10-0-1-11 systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 10:09:31 ip-10-0-1-11 systemd[1]: rocketchat.service: Failed with result ‘exit-code’.

I have managed deploying rocketchat from 3.2.1>4.5.0>5.4.1 on dev before this way, dropping some index’s but cannot recreate it now, failing on the same error and can’t debug it.
JIRA crowd and SAML are disabled…

Server Setup Information

  • Version of Rocket.Chat Server:
  • Operating System: ubuntu 18
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v14.19.3
  • MongoDB Version: 5.0.x
  • Proxy: nginx
  • Firewalls involved: no

I’m pretty sure you need to go all the way through 3.3-3.4-3.5 etc. to make sure everything is done correctly.

This was how I did it

2 Likes

I’ve managed to reach rc 3.9 but failing upgrade to any 4.x with next error:

eb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: {"level":20,"time":"2023-02-15T21:18:15.808Z","pid":4976,"hostname":"ip-10-0-1-94","name":"Callbacks","msg":"Executing callback with id TCtXNqkmxosQf7eoL for hook workspaceLicenseChanged"}
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: === UnHandledPromiseRejection ===
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: Error: Start date cannot be later than expire date
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]:     at BannersRaw.create (app/models/server/raw/Banners.ts:30:10)
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]:     at server/services/banner/service.ts:56:22
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]:     at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]:  => awaited here:
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]:     at Function.Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]:     at server/sdk/lib/LocalBroker.ts:15:15
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]:     at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: ---------------------------------
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: Errors like this can cause oplog processing errors.
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the process
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: Future node.js versions will automatically exit the process
Feb 15 21:18:15 ip-10-0-1-94 rocketchat[4976]: =================================
Feb 15 21:18:15 ip-10-0-1-94 systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
Feb 15 21:18:15 ip-10-0-1-94 systemd[1]: rocketchat.service: Failed with result 'exit-code'.

Any clue what can it be? or how to debug it?

Sorry but no. Let’s hope @dudanogueira is awake :wink:

I have isolated the issue, it seems to be the RC cloud causing this failure,
If I disconnect it - all works but if I try to connect it or upgrade to from 3.x to 4.x with the cloud connected I get immediately this failure.
Any thoughts?