Довелось сегодня обновлять свой корпоративный экземпляр
rocket.chat с версии 0.74 до 1.3.2 (последний релиз на сегодня).
В принципе, в доке (
Rocket.Chat Documentation - Updating to 1.0) нормально все расписано, но после обновления,
systemctl start rocketchat
вывалил ошибку:
+----------------------------------------------------------------------+
| |
| ERROR! SERVER STOPPED |
| |
| Your database migration failed: |
| Cannot destructure property 'value' of 'undefined' or 'null'. |
| |
| Please make sure you are running the latest version and try again. |
| If the problem persists, please contact support. |
| |
| This Rocket.Chat version: 1.3.2 |
| Database locked at version: 147 |
| Database target version: 149 |
| |
| Commit: 22894861c52cca1ff09f545db07c5259e9465791 |
| Date: Wed Aug 14 00:23:11 2019 -0300 |
| Branch: HEAD |
| Tag: 1.3.2 |
| |
+----------------------------------------------------------------------+
Чтоб пофиксить грабли, делаем:
mongo
rs01:PRIMARY>
rs01:PRIMARY> db.migrations.find()
rs01:PRIMARY> use rocketchat
switched to db rocketchat
rs01:PRIMARY> db.migrations.find()
{ "_id" : "control", "locked" : true, "version" : 147, "buildAt" : "2019-08-14T03:35:01.376Z", "lockedAt" : ISODate("2019-08-28T09:58:52.090Z") }
rs01:PRIMARY> db.migrations.update({"_id": "control"}, {"version": 149, "locked": false})
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
rs01:PRIMARY> db.migrations.find()
{ "_id" : "control", "version" : 149, "locked" : false }
rs01:PRIMARY> exit
bye