Migrating Rocket-Chat from Meteor built to Synology Docker containers

Our company was missing the opportunity to import our corporate-export from slack (an export including direct messages, private channels,…) to Rocket-Chat, so I forked the app and improved the Slack-Importer-Scripts to import all this data (right now it only imports users and public channels). You can find my pull-request here

I’m not getting any response on this, I guess because the Dev’s are really busy with the other 253 pull-requests and the thousands of issues, what I understand.
So I do not think that my pull-request will be merged into the official code soon.

That’s why I planned to:

  1. Import all the company data locally with my forked version
  2. dump the data out of the meteor-created mongo-db
  3. move it to our companies Synology-Server, which is running a docker-service
  4. restore the data from the dump to a docker-mongo-container (mongodb Version 4.0.5)
  5. deploy the rocket-chat-container on that database (Rocket-Chat version 0.74.3)

I followed the Rocket.Chat guide and “mongodump and mongorestore for mongodb in a docker container” for the docker-specific stuff.
Everything works fine until step 5: The new mongodb has the “meteor”-database and it’s filled with all the data from my forked system. But Rocket-Chat does not want to start on that db. The docker-container is linked correctly to the mongodb-container. Rocket-Chat-containers log (similar lines shortened):

Log

2019-04-02 18:35:10 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_token_path
2019-04-02 18:35:10 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_server_type

2019-04-02 18:35:10 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Dolphin_URL
2019-04-02 18:35:10 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Dolphin
2019-04-02 18:35:09 stdout errorType: ‘Meteor.Error’ }
2019-04-02 18:35:09 stdout message: ‘[Can't find migration version 139]’,
2019-04-02 18:35:09 stdout details: undefined,
2019-04-02 18:35:09 stdout reason: undefined,
2019-04-02 18:35:09 stdout error: ‘Can't find migration version 139’,
2019-04-02 18:35:09 stdout isClientSafe: true,
2019-04-02 18:35:09 stdout at /app/bundle/programs/server/boot.js:470:11
2019-04-02 18:35:09 stdout at Function.run (/app/bundle/programs/server/profile.js:510:12)
2019-04-02 18:35:09 stdout at /app/bundle/programs/server/boot.js:471:5
2019-04-02 18:35:09 stdout at /app/bundle/programs/server/boot.js:220:19
2019-04-02 18:35:09 stdout at Array.forEach ()
2019-04-02 18:35:09 stdout at /app/bundle/programs/server/boot.js:411:36
2019-04-02 18:35:09 stdout at /app/bundle/programs/server/app/app.js:15484:1
2019-04-02 18:35:09 stdout at require (packages/modules-runtime.js:258:21)
2019-04-02 18:35:09 stdout at Module.require (packages/modules-runtime.js:238:14)
2019-04-02 18:35:09 stdout at fileEvaluate (packages/modules-runtime.js:336:7)
2019-04-02 18:35:09 stdout at xrun.js (server/startup/migrations/xrun.js:4:24)
2019-04-02 18:35:09 stdout at Object.Migrations.migrateTo (packages/rocketchat:migrations/server/migrations.js:180:20)
2019-04-02 18:35:09 stdout at Object.Migrations._migrateTo (packages/rocketchat:migrations/server/migrations.js:255:24)
2019-04-02 18:35:09 stdout at Object.Migrations._findIndexByVersion (packages/rocketchat:migrations/server/migrations.js:403:8)
2019-04-02 18:35:09 stdout Exception in callback of async function: { Error: [Can’t find migration version 139]
2019-04-02 18:35:09 stdout e[34mSearch Logger ➔ infoe[39m create search provider chatpalProvider
2019-04-02 18:35:09 stdout e[34mSearch Logger ➔ infoe[39m create search provider defaultProvider
2019-04-02 18:35:08 stdout forOtherUsers: [ ‘services.wordpress.user_login’ ] } }
2019-04-02 18:35:08 stdout { forLoggedInUser: [ ‘services.wordpress’ ],
2019-04-02 18:35:08 stdout addAutopublishFields:
2019-04-02 18:35:08 stdout identityPath: ‘/oauth/me’,
2019-04-02 18:35:08 stdout e[34mCustomOAuth ➔ debuge[39m Init CustomOAuth wordpress { serverURL: ‘’,
2019-04-02 18:35:08 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:35:07 stdout forOtherUsers: [ ‘services.tokenpass.name’ ] } }
2019-04-02 18:35:07 stdout { forLoggedInUser: [ ‘services.tokenpass’ ],
2019-04-02 18:35:07 stdout addAutopublishFields:
2019-04-02 18:35:07 stdout mergeUsers: true,
2019-04-02 18:35:07 stdout usernameField: ‘username’,
2019-04-02 18:35:07 stdout tokenSentVia: ‘payload’,
2019-04-02 18:35:07 stdout scope: ‘user,tca,private-balances’,
2019-04-02 18:35:07 stdout tokenPath: ‘/oauth/access-token’,
2019-04-02 18:35:07 stdout authorizePath: ‘/oauth/authorize’,
2019-04-02 18:35:07 stdout identityPath: ‘/oauth/user’,
2019-04-02 18:35:07 stdout e[34mCustomOAuth ➔ debuge[39m Init CustomOAuth tokenpass { serverURL: ‘’,
2019-04-02 18:35:07 stdout e[34mSlackBridge ➔ Class.debuge[39m Setting: SlackBridge_Enabled false
2019-04-02 18:35:07 stdout e[34mSlackBridge ➔ Class.debuge[39m Setting: SlackBridge_Reactions_Enabled true
2019-04-02 18:35:07 stdout e[34mSlackBridge ➔ Class.debuge[39m Setting: SlackBridge_ExcludeBotnames
2019-04-02 18:35:07 stdout e[34mSlackBridge ➔ Class.debuge[39m Setting: SlackBridge_AliasFormat
2019-04-02 18:35:07 stdout e[34mSlackBridge ➔ Class.debuge[39m Setting: SlackBridge_APIToken
2019-04-02 18:35:07 stdout e[34mSlackBridge ➔ Rocket.debuge[39m constructor
2019-04-02 18:35:07 stdout e[34mSlackBridge ➔ Slack.debuge[39m constructor
2019-04-02 18:35:05 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:35:05 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:35:05 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired

2019-04-02 18:35:05 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:35:05 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:35:04 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_token_path
2019-04-02 18:35:04 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_server_type
2019-04-02 18:35:04 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_secret

2019-04-02 18:35:03 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Dolphin_URL
2019-04-02 18:35:03 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Dolphin
2019-04-02 18:35:02 stdout e[34mCAS ➔ infoe[39m Disabling CAS login service
2019-04-02 18:35:01 stdout memory, and will not scale past a single process.
2019-04-02 18:35:01 stdout designed for a production environment, as it will leak
2019-04-02 18:35:01 stdout Warning: connect.session() MemoryStore is not
2019-04-02 18:35:01 stdout forOtherUsers: [ ‘services.gitlab.username’ ] } }
2019-04-02 18:35:01 stdout { forLoggedInUser: [ ‘services.gitlab’ ],
2019-04-02 18:35:01 stdout addAutopublishFields:
2019-04-02 18:35:01 stdout scope: ‘read_user’,
2019-04-02 18:35:01 stdout identityPath: ‘/api/v3/user’,
2019-04-02 18:35:01 stdout e[34mCustomOAuth ➔ debuge[39m Init CustomOAuth gitlab { serverURL: ‘https://gitlab.com’,
2019-04-02 18:35:01 stdout forOtherUsers: [ ‘services.github-enterprise.username’ ] } }
2019-04-02 18:35:01 stdout { forLoggedInUser: [ ‘services.github-enterprise’ ],
2019-04-02 18:35:01 stdout addAutopublishFields:
2019-04-02 18:35:01 stdout tokenPath: ‘/login/oauth/access_token’,
2019-04-02 18:35:01 stdout authorizePath: ‘/login/oauth/authorize’,
2019-04-02 18:35:01 stdout identityPath: ‘/api/v3/user’,
2019-04-02 18:35:01 stdout e[34mCustomOAuth ➔ debuge[39m Init CustomOAuth github_enterprise { serverURL: ‘’,
2019-04-02 18:35:00 stdout forOtherUsers: [ ‘services.drupal.name’ ] } }
2019-04-02 18:35:00 stdout { forLoggedInUser: [ ‘services.drupal’ ],
2019-04-02 18:35:00 stdout addAutopublishFields:
2019-04-02 18:35:00 stdout mergeUsers: true,
2019-04-02 18:35:00 stdout usernameField: ‘preferred_username’,
2019-04-02 18:35:00 stdout tokenSentVia: ‘payload’,
2019-04-02 18:35:00 stdout scope: ‘openid email profile offline_access’,
2019-04-02 18:35:00 stdout tokenPath: ‘/oauth2/token’,
2019-04-02 18:35:00 stdout authorizePath: ‘/oauth2/authorize’,
2019-04-02 18:35:00 stdout identityPath: ‘/oauth2/UserInfo’,
2019-04-02 18:35:00 stdout e[34mCustomOAuth ➔ debuge[39m Init CustomOAuth drupal { serverURL: ‘’,
2019-04-02 18:35:00 stdout forOtherUsers: [ ‘services.dolphin.name’ ] } }
2019-04-02 18:35:00 stdout { forLoggedInUser: [ ‘services.dolphin’ ],
2019-04-02 18:35:00 stdout addAutopublishFields:
2019-04-02 18:35:00 stdout scope: ‘basic’,
2019-04-02 18:35:00 stdout identityPath: ‘/m/oauth2/api/me/’,
2019-04-02 18:35:00 stdout tokenPath: ‘/m/oauth2/token/’,
2019-04-02 18:35:00 stdout authorizePath: ‘/m/oauth2/auth/’,
2019-04-02 18:35:00 stdout e[34mCustomOAuth ➔ debuge[39m Init CustomOAuth dolphin { serverURL: ‘’,
2019-04-02 18:35:00 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:35:00 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired

2019-04-02 18:35:00 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:35:00 stdout e[35mAPI ➔ warne[39m Invalid value for permissionsRequired
2019-04-02 18:34:58 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_token_path
2019-04-02 18:34:58 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_server_type
2019-04-02 18:34:58 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Wordpress_secret

2019-04-02 18:34:58 stdout e[34mrocketchat:lib ➔ oauth_updatede[39m Accounts_OAuth_Dolphin
2019-04-02 18:34:57 stdout Setting default file store to GridFS
2019-04-02 18:34:57 stdout Starting Email Intercepter…
2019-04-02 18:34:57 stdout LocalStore: store created at
2019-04-02 18:34:57 stdout LocalStore: store created at
2019-04-02 18:34:57 stdout LocalStore: store created at
2019-04-02 18:34:57 stdout Updating process.env.MAIL_URL

So I assume it could be brought down to:

Exception in callback of async function: { Error: [Can’t find migration version 139]
at Object.Migrations._findIndexByVersion (packages/rocketchat:migrations/server/migrations.js:403:8)
at Object.Migrations._migrateTo (packages/rocketchat:migrations/server/migrations.js:255:24)
at Object.Migrations.migrateTo (packages/rocketchat:migrations/server/migrations.js:180:20)
at xrun.js (server/startup/migrations/xrun.js:4:24)
at fileEvaluate (packages/modules-runtime.js:336:7)
at Module.require (packages/modules-runtime.js:238:14)
at require (packages/modules-runtime.js:258:21)
at /app/bundle/programs/server/app/app.js:15484:1
at /app/bundle/programs/server/boot.js:411:36
at Array.forEach ()
at /app/bundle/programs/server/boot.js:220:19
at /app/bundle/programs/server/boot.js:471:5
at Function.run (/app/bundle/programs/server/profile.js:510:12)
at /app/bundle/programs/server/boot.js:470:11
isClientSafe: true,
error: ‘Can't find migration version 139’,
reason: undefined,
details: undefined,
message: ‘[Can't find migration version 139]’,
errorType: ‘Meteor.Error’ }

but what does this mean or how can I fix that?

Anyone an idea about that?

I found the solution by myself:

Because the development branch is ahead of the docker-latest-branch, the db-version in the collection “migrations” of the development-version (139) was also ahead of the version which the rocketchat-docker-container was looking for (137).

Changing the db-version in the backup data collection “migrations” from 139 to 137 and setting the “locked” to “false” let’s rocket-chat start the instance without any errors.

How did you achieve this? Can you please help me out, I’m having this same problem.

Exception in callback of async function: errorClass [Error]: [Can't find migration version 206]
stdout
10:14:17
    at Object.Migrations._findIndexByVersion (app/migrations/server/migrations.js:402:8)
stdout
10:14:17
    at Object.Migrations._migrateTo (app/migrations/server/migrations.js:254:24)
stdout
10:14:17
    at Object.Migrations.migrateTo (app/migrations/server/migrations.js:179:20)
stdout
10:14:17
    at module (server/startup/migrations/xrun.js:6:13)
stdout
10:14:17
    at fileEvaluate (packages/modules-runtime.js:336:7)
stdout
10:14:17
    at Module.require (packages/modules-runtime.js:238:14)
stdout
10:14:17
    at Module.moduleLink [as link] (/app/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime/index.js:52:22)
stdout
10:14:17
    at module (server/startup/migrations/index.js:1:3836)
stdout
10:14:17
    at fileEvaluate (packages/modules-runtime.js:336:7)
stdout
10:14:17
    at Module.require (packages/modules-runtime.js:238:14)
stdout
10:14:17
    at Module.moduleLink [as link] (/app/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime/index.js:52:22)
stdout
10:14:17
    at module (server/main.js:1:200)
stdout
10:14:17
    at fileEvaluate (packages/modules-runtime.js:336:7)
stdout
10:14:17
    at Module.require (packages/modules-runtime.js:238:14)
stdout
10:14:17
    at require (packages/modules-runtime.js:258:21)
stdout
10:14:17
    at /app/bundle/programs/server/app/app.js:156307:15
stdout
10:14:17
    at /app/bundle/programs/server/boot.js:398:38
stdout
10:14:17
    at Array.forEach (<anonymous>)
stdout
10:14:17
    at /app/bundle/programs/server/boot.js:226:21
stdout
10:14:17
    at /app/bundle/programs/server/boot.js:461:7
stdout
10:14:17
    at Function.run (/app/bundle/programs/server/profile.js:280:14)
stdout
10:14:17
    at /app/bundle/programs/server/boot.js:460:13 {
stdout
10:14:17
  isClientSafe: true,
stdout
10:14:17
  error: "Can't find migration version 206",
stdout
10:14:17
  reason: undefined,
stdout
10:14:17
  details: undefined,
stdout
10:14:17
  message: "[Can't find migration version 206]",
stdout
10:14:17
  errorType: 'Meteor.Error'
stdout
10:14:17
}