ODK Central database migration incomplete

Hi,

Trying to migrate ODK Central client (v1.1.2) server (v1.1.1) to the latest version I pulled the latest code, upgraded docker-compose, increased postgres memory allocation, built only with some warnings, but when trying to get it up I got the following output:

service_1 | wait-for-it.sh: waiting 15 seconds for postgres:5432
service_1 | wait-for-it.sh: postgres:5432 is available after 0 seconds
service_1 | generating local service configuration..
service_1 | running migrations..
service_1 | internal/modules/cjs/loader.js:892
service_1 | throw err;
service_1 | ^
service_1 |
service_1 | Error: Cannot find module './lib/model/migrate'
service_1 | Require stack:
service_1 | - /usr/odk/[eval]
service_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
service_1 | at Function.Module._load (internal/modules/cjs/loader.js:745:27)
service_1 | at Module.require (internal/modules/cjs/loader.js:961:19)
service_1 | at require (internal/modules/cjs/helpers.js:92:18)
service_1 | at [eval]:1:35
service_1 | at Script.runInThisContext (vm.js:134:12)
service_1 | at Object.runInThisContext (vm.js:310:38)
service_1 | at internal/process/execution.js:81:19
service_1 | at [eval]-wrapper:6:22
service_1 | at evalScript (internal/process/execution.js:80:60) {
service_1 | code: 'MODULE_NOT_FOUND',
service_1 | requireStack: [ '/usr/odk/[eval]' ]
service_1 | }
service_1 | checking migration success..
service_1 | internal/modules/cjs/loader.js:892
service_1 | throw err;
service_1 | ^
service_1 |
service_1 | Error: Cannot find module './lib/model/migrate'
service_1 | Require stack:
service_1 | - /usr/odk/[eval]
service_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
service_1 | at Function.Module._load (internal/modules/cjs/loader.js:745:27)
service_1 | at Module.require (internal/modules/cjs/loader.js:961:19)
service_1 | at require (internal/modules/cjs/helpers.js:92:18)
service_1 | at [eval]:1:43
service_1 | at Script.runInThisContext (vm.js:134:12)
service_1 | at Object.runInThisContext (vm.js:310:38)
service_1 | at internal/process/execution.js:81:19
service_1 | at [eval]-wrapper:6:22
service_1 | at evalScript (internal/process/execution.js:80:60) {
service_1 | code: 'MODULE_NOT_FOUND',
service_1 | requireStack: [ '/usr/odk/[eval]' ]
service_1 | }
service_1 | *** Error starting ODK! ***
service_1 | After attempting to automatically migrate the database, we have detected unapplied migrations, which suggests a problem with the database migration step. Please look in the console above this message for any errors and post what you find in the forum: https://forum.getodk.org/

I'll appreciate any guidance, TIA,

--
Seb

Hi @sebtux! I don't think we've seen this error before. The fact that you're seeing the message at the end means that the infrastructure you're running matches v1.4. However, the message about Cannot find module './lib/model/migrate' is unexpected, because that file has existed since v1.2. That makes me think that your code for the server is still on v1.1 and doesn't match the infrastructure you're running. Did you run git submodule update -i? Try double-checking that you've followed all upgrade instructions. If you're still having trouble, run the following commands to see what version you're at, then post the result:

git rev-parse HEAD
git submodule
3 Likes

Thank you, I made a mistake using git!

2 Likes