Following Slack migration guide led to an import job stuck "in progress"

Summary
We followed the Slack migration guide without issue, but the import job appears to be stuck on “in progress”. Not even sure where to find useful logs, those located in mattermost/logs don’t seem to have any information related to the import. Users and channels were imported, posts and attachments apparently not.

Steps to reproduce
On Mattermost 7.10.0 (latest at time of writing), follow the official guide: Migration guide — Mattermost documentation

Expected behavior
That the import would run and complete successfully.

Observed behavior
Users and channels were imported successfully, but posts and attachments were not.

Current job show output:

[
  {
    "id": "3d3391jud3g9jnatphgp7boj1w",
    "type": "import_process",
    "priority": 0,
    "create_at": 1682111314577,
    "start_at": 1682111325665,
    "last_activity_at": 1682111325665,
    "status": "in_progress",
    "progress": 0,
    "data": {
      "import_file": "f67myp3s73redbu4kbjicea3mr_mattermost-bulk-import.zip"
    }
  }
]

Edit: We installed into a custom directory. The app is seemingly working fine from there, but is there some step of the import process that depends on the app living in opt?

Edit2: We also were using mmctl with --local. Maybe it has trouble importing using local sockets? Retrying with saved creds.

Thanks for any help!

Got it working!

For future readers I did the following, not sure which (or collection of which) was actually responsible:

  • Ran all commands even through slack export conversion process as mattermost user sudo -u mattermost. Had to move all my working files into a dir owned by mattermost user to do so.
  • Created a new user with an email address that did not exist in the slack import as an admin user.
  • Used said new user to auth mmctl instead of using --local
  • Using auth mmctl also means I had to increase client_max_body_size in the nginx server config (2 places if you followed the install guide)
  • Ran everything from the mattermost dir. So bin/mmctl instead of running from within bin. Probably didn’t matter.

And bob’s your uncle.

Import ran smoothly, took about 10-15m to complete.

Hopefully this helps someone else. Ideally if it is the case that import cannot be run using --local, that ought to be added explicitly to the documentation.