Rocket.Chat's Community Open Call 🎤 Jan 19th, 2022 Join us!

Not migrating, control is locked

Description

I’m using snap version on a ubuntu 18 lts.

I tried to switch to channel 4.x/edge, but the caddy started to fail to launch, so I switched back to 4.x/stable

Now mongo db seems to be locked and the server returns 502 Bad Gateway

Server Setup Information

  • Version of Rocket.Chat Server: 4.0.5
  • Operating System: Ubuntu 18.04 LTS
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version: 3.6.14
  • Proxy: caddy
  • Firewalls involved: no

Any additional Information

Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[27077]: /snap/rocketchat-server/1492/programs/server/node_modules/fibers/future.js:280
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[27077]:                                                 throw(ex);
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[27077]:                                                 ^
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[27077]: Error: Can't find migration version 243
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[27077]:     at migrateDatabase (server/lib/migrations.ts:229:9)
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[27077]:     at migrateDatabase (server/lib/migrations.ts:181:11)
Nov 30 04:17:00 optimus-rocket-chat systemd[1]: snap.rocketchat-server.rocketchat-server.service: Main process exited, code=exited, status=1/FAILURE
Nov 30 04:17:00 optimus-rocket-chat systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
Nov 30 04:17:00 optimus-rocket-chat systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
Nov 30 04:17:00 optimus-rocket-chat systemd[1]: snap.rocketchat-server.rocketchat-server.service: Scheduled restart job, restart counter is at 35.
Nov 30 04:17:00 optimus-rocket-chat systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
Nov 30 04:17:00 optimus-rocket-chat systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: Checking if oplog has been enabled, and enabling if not
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: MongoDB shell version v3.6.14
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: Implicit session: session { "id" : UUID("26cae43e-ceeb-4f42-88f8-50a7bafc3c3e") }
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: MongoDB server version: 3.6.14
Nov 30 04:17:00 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: Checking if mongo featureCompatibilityVersion is correct, changing if not
Nov 30 04:17:11 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: LocalStore: store created at
Nov 30 04:17:11 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: LocalStore: store created at
Nov 30 04:17:11 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: LocalStore: store created at
Nov 30 04:17:16 optimus-rocket-chat rocketchat-server.rocketchat-server[28216]: {"level":40,"time":"2021-11-30T04:17:16.451Z","pid":28300,"hostname":"optimus-rocket-chat","name":"Migrations"
{"level":40,"time":"2021-11-30T00:24:39.246Z","pid":6309,"hostname":"optimus-rocket-chat","name":"Migrations","msg":"Not migrating, control is locked. Attempt 13/30. Trying again in 10 seconds."}

Swhitched back do 4.x/edge and fixed the error with caddy.

The caddy is on v2, henve the old caddyfile its not compatible.

Ok, so it’s up and running for now, right?

please, always do backups and try upgrading at a test environment first.

Hello,
I upgrade from 3.18.3 to 4.1.2 done.But it’s will caddy can’t start.

2021-12-02T21:41:29+08:00 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
2021-12-02T21:41:29+08:00 rocketchat-server.rocketchat-caddy[2351]: {“level”:“info”,“ts”:1638452489.7481782,“msg”:“using provided configuration”,“config_file”:"/var/snap/rocketchat-server/1494/Caddyfile",“config_adapter”:""}
2021-12-02T21:41:29+08:00 rocketchat-server.rocketchat-caddy[2351]: run: adapting config using caddyfile: /var/snap/rocketchat-server/1494/Caddyfile:2: unrecognized directive: proxy
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’.
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Scheduled restart job, restart counter is at 5.
2021-12-02T21:41:29+08:00 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Start request repeated too quickly.
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’.
2021-12-02T21:41:29+08:00 systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-caddy.

For some reason the snap updates the caddy, and the new caddy does not work with the old caddy config.

It has been reported on the git, here on the forum and in the chat channel, but no answers.

The solution is read the caddy documentation and overwrite the rocket chat config .

1 Like