Errors after directly upgrading from 5.25.0 to 7.7.1

I upgrade my Mattermost server directly from 5.25.0 (I think that’s the before upgrade version.) to 7.7.1, I think now my database table(s) and their configuration(s) may have compatibility problem with 7.7.1, because my desktop application and Android app result seem to display problems.

Steps to reproduce

  • Operating system: From Ubuntu 16.04 to Ubuntu 18.04
  • MySQL: From 5.7.33 to 8.0.32
  • Mattermost server: I think I was on 5.25.0; I only tried to find out my previous version after the upgrade is completed; I used command “mattermost version”. Now it is at 7.7.1
  • Database Schema Version: 100
    ** How to reproduce the error: Perhaps it is simply just upgrading from 5.25.0 to 7.7.1 alone, but I cannot say for sure.

Expected behavior

  • I expect my new desktop application and Android app to pick up my existing server URL address and channels.

Observed behavior

  • My desktop application asks me to input server URL and then ask me to create a team. The blue “< Back” link at top left does not bring me to a new page.
    ** I can click the “Go to System Console” when I am being asked to create a team, and then I can click the blue “< Back to [my existing team before upgrade]” to see my old teams and chat records.
  • Android app shows “No teams are available to join”.
  • There are many errors on mattermost.log:
    ** “GetChannelMembersForUserWithPagination: Unable to get the channel members.”
    ** “Unable to get the teams unread messages.”
    ** “Unable to get the channels.”
    ** “Unable to get the channel members.”
    ** “We could not get all teams.”
    ** “Unable to get user’s Drafts.”
    ** “Unable to get user threads.”
    ** “GetThreadsForUser: Unable to get user threads, failed to count urgent mentioned threads for user id=[…]”

I read 2 posts from this forum, their OP both said they fixed their problem by upgrading version by version.

  • If that is the solution, how may I do that? I am already on 7.7.1.
  • Is there migration MySQL codes that I can simply run on MySQL?

Hi @Chi and welcome to the Mattermost forum!

Can you confirm the current state of your system, please? Did you roll back and are now back on 5.25 or is your Mattermost setup just not working at the moment and you’re waiting for a fix?
The broken upgrade is most likely caused by the fact that you should have upgraded to 5.37.10 first as mentioned in the Important upgrade notes. When on 5.37.10, you can then directly go to 7.8.0, no further intermediate steps necessary.

In order to find out what exactly is broken, I would need to see the contents of your mattermost.log file. If you followed the default installation instructions, this file should be available under /opt/mattermost/logs/mattermost.log - can you share relevant lines from there? Ideally you would watch the file using tail -f in a second terminal and restart your Mattermost application server so we can have all the log lines from a fresh server start, that would be awesome.

Thank you very much for your help.

  • I was in the middle of my second upgrade attempt when I saw your reply; my server already done the first upgrade to 5.39.3. After seeing your reply, it inspired me that I can choose each of the next ESR version to upgrade.
  • I wanted to play the safest way, so I upgraded each ESR version starting v6.3.10, and then v7.1.5, and then v7.8.0. Along the way, I fixed database collation conflicts after each upgrade; there are still some error messages in log, but Mattermost’s user interface’s result seems perfectly predictable and seems working well. Please allow me to create another ticket here to ask questions about my remaining error messages.
  • I would like to suggest an edit on the Upgrade Mattermost Server — Mattermost documentation page, the step 2 wget line, my 2 cents is it may help readers if there is text to tell readers to choose Enterprise or Team edition to download, because without the “-team” value in URL, I think it is default downloading the Enterprise version, and the Upgrade Mattermost Server — Mattermost documentation session is kind of describing something opposite.

I would like to thank you for your help again.

Hi again,

glad to hear you’re up and running now and yes, there were some notes in the important upgrades notes with regards to collation changes that might be necessary during the upgrades; taking such big leaps always takes some time, so if in the future you can keep the increments smaller, this will be a much better upgrade experience for you :slight_smile:

Please create new topics with the remaining errors you’re seeing, we’ll get them fixed as well.

With regards to the documentation: I’ve now proposed the following change to the upgrade server doc:

This should make it much clearer, I guess - hope it gets accepted :slight_smile:

Update: the documentation got updated with my suggestion.

1 Like