6.0 Important Upgrade Notes

Mattermost version 6.0 introduces many exciting changes to the product, which come with important notes to consider when performing the upgrade.

There is a very fundamental change to the clustering code, which means that now in a cluster, nodes from different versions cannot run. With v6.0 you are unable to also run v5.x simultaneously. This means you should expect to schedule downtime especially in a clustered environment with this upgrade.

Furthermore, 6.0 introduces database schema changes and longer migration times should be expected, especially on MySQL installations. Based on your database size and setup the migration can take a significant amount of time and may even lock the tables for posts, so there is no way to post or to receive messages. There are a few schema changes upcoming, but one in particular is related to this change in the mattermost server.

We will add more details on additional changes and queries, expected migration durations and possible mitigation strategies in the upcoming weeks.

3 Likes

Please see this document for more details on specific database migrations and expected migration times.

2 Likes

Hello,
I got error bellow when I try to upgrade from 5.39 version to 6.0 version.
{“level”:“warn”,“ts”:1634229007.957633,“caller”:“sqlstore/store.go:1191”,“msg”:“Could not create foreign key: Error 1005: Can’t create table mattermost.#sql-289b_58ed (errno: 121 “Duplicate key on write or update”)”}
{“level”:“warn”,“ts”:1634229007.969821,“caller”:“sqlstore/store.go:1191”,“msg”:“Could not create foreign key: Error 1005: Can’t create table mattermost.#sql-289b_58ed (errno: 121 “Duplicate key on write or update”)”}

Your report looks similar to Migration warnings in logs 6.0 · Issue #18670 · mattermost/mattermost-server · GitHub, which our devs are looking into. Feel free to review and comment on the Github Issue.

Hello
I think this isn`t a warning, this is a fatal error. There are the tail of mattermost.log
[root@linuxserver-clone mysql]# tail /opt/mattermost/logs/mattermost.log

{“timestamp”:“2021-10-16 16:26:17.975 -03:00”,“level”:“info”,“msg”:“Loaded system translations”,“caller”:“i18n/i18n.go:93”,“for locale”:“pt-BR”,“from locale”:"/opt/mattermost/i18n/pt-BR.json"}

{“timestamp”:“2021-10-16 16:26:17.980 -03:00”,“level”:“info”,“msg”:“Pinging SQL”,“caller”:“sqlstore/store.go:252”,“database”:“master”}

{“timestamp”:“2021-10-16 16:26:17.990 -03:00”,“level”:“info”,“msg”:“Pinging SQL”,“caller”:“sqlstore/store.go:252”,“database”:“migrations”}

{“timestamp”:“2021-10-16 16:26:17.997 -03:00”,“level”:“fatal”,“msg”:“Error creating database tables.”,“caller”:“sqlstore/store.go:199”,“error”:“Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘json, LastUpdateAt bigint, SchemeUser tinyint, SchemeAdmin tinyint, `Schem’ at line 1”}

{“timestamp”:“2021-10-16 16:32:53.707 -03:00”,“level”:“info”,“msg”:“Server is initializing…”,“caller”:“app/server.go:265”,“go_version”:“go1.16.7”}

{“timestamp”:“2021-10-16 16:32:53.707 -03:00”,“level”:“info”,“msg”:“Starting websocket hubs”,“caller”:“app/web_hub.go:93”,“number_of_hubs”:4}

{“timestamp”:“2021-10-16 16:32:53.722 -03:00”,“level”:“info”,“msg”:“Loaded system translations”,“caller”:“i18n/i18n.go:93”,“for locale”:“pt-BR”,“from locale”:"/opt/mattermost/i18n/pt-BR.json"}

{“timestamp”:“2021-10-16 16:32:53.733 -03:00”,“level”:“info”,“msg”:“Pinging SQL”,“caller”:“sqlstore/store.go:252”,“database”:“master”}

{“timestamp”:“2021-10-16 16:32:53.739 -03:00”,“level”:“info”,“msg”:“Pinging SQL”,“caller”:“sqlstore/store.go:252”,“database”:“migrations”}

{“timestamp”:“2021-10-16 16:32:53.796 -03:00”,“level”:“fatal”,“msg”:“Error creating database tables.”,“caller”:“sqlstore/store.go:199”,“error”:“Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘json, LastUpdateAt bigint, SchemeUser tinyint, SchemeAdmin tinyint, `Schem’ at line 1”}

@excaravelho Any success? I have the same issue.

1 Like

same here… is a Fatal error and I cannot start my server.
Please help

{"timestamp":"2021-10-18 06:39:09.073 Z","level":"info","msg":"Server is initializing...","caller":"app/server.go:265","go_version":"go1.16.7"}
{"timestamp":"2021-10-18 06:39:09.073 Z","level":"info","msg":"Starting websocket hubs","caller":"app/web_hub.go:93","number_of_hubs":2}
{"timestamp":"2021-10-18 06:39:09.073 Z","level":"info","msg":"Loaded system translations","caller":"i18n/i18n.go:93","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"timestamp":"2021-10-18 06:39:09.077 Z","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:252","database":"master"}
{"timestamp":"2021-10-18 06:39:09.093 Z","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:252","database":"migrations"}
{"timestamp":"2021-10-18 06:39:09.099 Z","level":"fatal","msg":"Error creating database tables.","caller":"sqlstore/store.go:199","error":"Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json, `LastUpdateAt` bigint, `SchemeUser` tinyint, `SchemeAdmin` tinyint, `Schem' at line 1"}
1 Like

Hello cola, nothing yet. I downgraded to 5.39 again

Hi downgraded too, it seems there an error in the string `Schem’ (instead of “Scheme”). Maybe hardcoded in the binary?!

We have a PR here that we’re working on to include in a dot release: [MM-39299] Remove outdated translations and update go-i18n library by isacikgoz · Pull Request #18674 · mattermost/mattermost-server · GitHub

that will fix the “Schem” bug?
Let us known… we are blocked at the 5.39
thanks

v6.0.1 has been released with the fix.

Sorry but the problem persist with 6.0.1

{"timestamp":"2021-10-24 19:25:15.379 +02:00","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:253","database":"master"}
{"timestamp":"2021-10-24 19:25:15.381 +02:00","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:253","database":"migrations"}
{"timestamp":"2021-10-24 19:25:15.389 +02:00","level":"fatal","msg":"Error creating database tables.","caller":"sqlstore/store.go:200","error":"Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json, `LastUpdateAt` bigint, `SchemeUser` tinyint, `SchemeAdmin` tinyint, `Schem' at line 1"}
2 Likes

When will the Helm chart for Team Edition 6.0.1 be made available?

Is there an expected delay between a release and the helm chart release?

BR,
Jimisola

Same issue as mentioned above (tested with 6.0.1 and today again with 6.0.2). Upgraded from Mattermost 5.38.2.
Database: mariadb Ver 15.1 Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

{"timestamp":"2021-11-04 11:19:24.781 +01:00","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:253","database":"master"}
{"timestamp":"2021-11-04 11:19:24.947 +01:00","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:253","database":"migrations"}
{"timestamp":"2021-11-04 11:19:25.015 +01:00","level":"fatal","msg":"Error creating database tables.","caller":"sqlstore/store.go:200","error":"Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json, `LastUpdateAt` bigint, `SchemeUser` tinyint, `SchemeAdmin` tinyint, `Schem' at line 1"}

I´ve got the same error until updating from 5.39.0 to 6.0.2

@streamer45 @isacikgoz Can you help take a look at this error?

I’ve tried the following upgrade path now:

5.38.2 → 5.39.1 (working fine) → 6.0.2 (same error)

Was there anything else you might have changed?

I made no other changes.

Upgraded to MariaDB 10.5 as mentioned here: https://issueexplorer.com/issue/mattermost/mattermost-server/18864 which solved this issue for me.

1 Like