Errors after directly upgrading from 5.25.0 to 7.7.1

Summary
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

I might have a similar issue here - at least I wanted to document this and attempt to pursue some course of solution. In my case I went from 6.4.1 through each large minor update stepwise to 9.0.0 running on MySQL. I have had trouble migrating to PGSQL so far and so I went from MariaDB to MySQL which facilitated the path forward to this point. I will later pursue the PGSQL issue, but I want to be sure to address some issues first.

So what prompted my awareness of this issue was when I hit reply on the web client of the server and the page went “white”. I noticed some messages in the JS console and on the server logs as well:

Server log:

mattermost.log│Oct 23 18:13:05 <hostname> mattermost[18164]: error [2023-10-23 18:13:05.463 Z] Unable to get user's Drafts.                  caller="web/context.go:117" path=/api/v4/users/me/teams/t5a1ujhcubnj│
peuc1sm1x9d39e/drafts request_id=o81cr4i8cffxxrpk44da4zrs4h ip_addr=<public_ip> user_id=5k8b9zqzspgkbj4yhpi3nbxcmy method=GET err_where=GetDraftsForUser http_code=500 error="GetDraftsForUser: Unable to get user│
's Drafts., failed to get user drafts: Error 1267 (HY000): Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='"                                             │

As far as the client goes, these are the messages in the console:
image

I have noticed that Drafts seem to be available, so I’m not clear where I should dig into this here to isolate the situation further.

I’ve also noticed this odd message:

mattermost.log│Oct 23 18:16:58 <hostname> mattermost[18164]: info  [2023-10-23 18:16:58.151 Z] api endpoint requires a license               caller="web/context.go:115" path=/api/v4/teams/hwuk5qdgw3fdjdsn4ybjx│
7your/groups request_id=8mwceswu678e9ycuiznjp7ej4y ip_addr=<LAN_ip> user_id=5k8b9zqzspgkbj4yhpi3nbxcmy method=GET err_where= http_code=501 error=": api endpoint requires a license"                             │

I am using the Mattermost Team Edition.