The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 26

Upgrding from 3.18.1 to 4.0.0 App "Poll" fails to load

Description

I have just upgraded from 3.18.1 to 4.0.0 using docker but unfortunately the database fails to migrate.

I have not upgraded mongo and it was working fine before.

Server Setup Information

  • Version of Rocket.Chat Server: 4.0.0
  • Operating System: Ubuntu 20.04.3
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version: 4.2
  • Proxy: HAPROXY
  • Firewalls involved:

Any additional Information

±---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| ERROR! SERVER STOPPED |

±---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| |

| Your database migration failed: |

| Failed to load the App “Poll” (c33fa1a6-68a7-491e-bf49-9d7b99671c48) as it requires v1.0.0 of the App API however your server comes with v1.28.0. Please tell the author to update their App as it is out of date. |

| |

| Please make sure you are running the latest version and try again. |

| If the problem persists, please contact support. |

| |

| This Rocket.Chat version: 4.0.0 |

| Database locked at version: 237 |

| Database target version: 239 |

| |

| Commit: 2ffdd13795daca5c36ba4634daab6d05c879da8f |

| Date: Fri Oct 1 19:38:14 2021 -0300 |

| Branch: HEAD |

| Tag: 4.0.0 |

| |

±---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

{“level”:50,“time”:“2021-10-02T11:49:32.365Z”,“pid”:41,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“err”:{“name”:“RequiredApiVersion”,“message”:“Failed to load the App “Poll” (c33fa1a6-68a7-491e-bf49-9d7b99671c48) as it requires v1.0.0 of the App API however your server comes with v1.28.0. Please tell the author to update their App as it is out of date.”,“stack”:“undefined\n => awaited here:\n at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)\n at Object.up (server/startup/migrations/v238.ts:43:12)\n at migrate (server/lib/migrations.ts:138:2)\n at migrateDatabase (server/lib/migrations.ts:242:5)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)\n at migrateDatabase (server/lib/migrations.ts:181:11)”},“msg”:“Failed to load the App “Poll” (c33fa1a6-68a7-491e-bf49-9d7b99671c48) as it requires v1.0.0 of the App API however your server comes with v1.28.0. Please tell the author to update their App as it is out of date.”}

Tried 3 times. Waiting 5 secs…

LocalStore: store created at

LocalStore: store created at

LocalStore: store created at

{“level”:40,“time”:“2021-10-02T11:50:08.047Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 0/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:50:18.054Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 1/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:50:28.061Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 2/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:50:38.067Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 3/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:50:48.073Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 4/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:50:58.079Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 5/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:51:08.086Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 6/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:51:18.094Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 7/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:51:28.101Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 8/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:51:38.108Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 9/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:51:48.114Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 10/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:51:58.120Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 11/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:52:08.126Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 12/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:52:18.133Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 13/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:52:28.139Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 14/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:52:38.145Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 15/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:52:48.153Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 16/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:52:58.159Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 17/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:53:08.163Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 18/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:53:18.169Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 19/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:53:28.176Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 20/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:53:38.185Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 21/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:53:48.190Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 22/30. Trying again in 10 seconds.”}

{“level”:40,“time”:“2021-10-02T11:53:58.196Z”,“pid”:57,“hostname”:“9b048d5e9c2c”,“name”:“Migrations”,“msg”:“Not migrating, control is locked. Attempt 23/30. Trying again in 10 seconds.”}

Hello, just read the original post sorry for my abruptness.

Thanks for reading this I haver spent all weekend on this now with no solution. It is an odd one, I updated the main rocketchat docker to the latest which I believe is 4.0.0 according to the chat log. After many hours of Googleing I can not find an answer just something similar. I have noticed after a reboot one of my other rocketchat instances is now suffering the same problem but that is using version 4.0 of mongo not 4.2.

Thank you so much for reading this I hope to be able resolve this.
Duncan

When I try to put back to 3.18.1 I get the following error

error: “Can’t find migration version 237”,

reason: undefined,

details: undefined,

errorType: ‘Meteor.Error’

Thanks Duncan

Hi!

Looks like that the Poll app is not allowing the server to properly start and then migrate. It says that it requires v1.0.0 APP Api, while v1.28.0 is the offered one in Rocket.Chat 4.0.0

If you can, try disabling the Poll app before the upgrade, or upgrade the Poll app to the latest version (2.0.0)…

considering you have backed up the database… if not, let us know…

The latest version of the Poll App, as of now, is 2.0.0, according to here:

Let me know what the situation is.

Thank you so much for your help, I never thought about the poll app in rocketchat. I was stupid I did the upgrade with out a recent backup.

Rember if it is fool proof they will make a bigger fool and that person was me this time:-)

Hi!

It’s ALWAYS a best practice to backup before upgrades. Even when you tested the upgrade and are sure that everything is going to work fine.

YET… I did the same thing a few months ago with another software, hahaha. It’s ok! :stuck_out_tongue:

So, were you able to properly migrate after all?

Thanks so much for your help I have no idea how to disable the poll app, I can not gain access to the web interface to disable it and have no idea how to disable it on the command line. I have tried “npm install” “rc-apps deploy” but I just get errors probably due to permissions that I have not found a way around. I am hoping to fix it but if I can not I will just abandon and recreate. It is a good practice.

Finally fixed it. I had to go in to mongo and issue the following commands

use rocketchat

db.migrations.find() (not totally necessary but checked for duplicate records)

db.migrations.update({"_id": "control"}, {"version": 231, "locked": false})

This allowed me to roll back the version to 3.18.1. I then went to administration/apps and uninstalled the poll app.

After this I managed to update to new version.

Thank you everyone for your help I hope if anyone else comes across this problem this helps.

Duncan

1 Like