Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mattermost
  3. Mattermost Upgrade to 1.59.0 breaks

Mattermost Upgrade to 1.59.0 breaks

Scheduled Pinned Locked Moved Mattermost
9 Posts 4 Posters 1.6k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • robiR Offline
    robiR Offline
    robi
    wrote on last edited by robi
    #1

    Log after upgrade looks like a DB migration issue:

    Feb 20 02:35:05 {"timestamp":"2022-02-20 02:35:05.969 Z","level":"fatal","msg":"Failed to apply database migrations.","caller":"sqlstore/store.go:157","error":"driver: mysql, message: failed when applying migration, command: apply_migration, originalError: Error 1304: PROCEDURE RenameSolarizedThemeWithUnderscore already exists, query: \n\nCREATE TABLE IF NOT EXISTS Preferences (\n UserId varchar(26) NOT NULL,\n Category varchar(32) NOT NULL,\n Name varchar(32) NOT NULL,\n Value text,\n PRIMARY KEY (UserId, Category, Name)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n\nSET @preparedStatement = (SELECT IF(\n (\n SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS\n WHERE table_name = 'Preferences'\n AND table_schema = DATABASE()\n AND column_name = 'Value'\n AND data_type != 'text'\n ) > 0,\n 'ALTER TABLE Preferences MODIFY Value text;',\n 'SELECT 1'\n));\n\nPREPARE alterIfExists FROM @preparedStatement;\nEXECUTE alterIfExists;\nDEALLOCATE PREPARE alterIfExists;\n\nSET @preparedStatement = (SELECT IF(\n (\n SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_name = 'Preferences'\n AND table_schema = DATABASE()\n AND index_name = 'idx_preferences_category'\n ) > 0,\n 'SELECT 1',\n 'CREATE INDEX idx_preferences_category ON Preferences(Category);'\n));\n\nPREPARE createIndexIfNotExists FROM @preparedStatement;\nEXECUTE createIndexIfNotExists;\nDEALLOCATE PREPARE createIndexIfNotExists;\n\nSET @preparedStatement = (SELECT IF(\n (\n SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_name = 'Preferences'\n AND table_schema = DATABASE()\n AND index_name = 'idx_preferences_name'\n ) > 0,\n 'SELECT 1',\n 'CREATE INDEX idx_preferences_name ON Preferences(Name);'\n));\n\nPREPARE createIndexIfNotExists FROM @preparedStatement;\nEXECUTE createIndexIfNotExists;\nDEALLOCATE PREPARE createIndexIfNotExists;\n\nCREATE PROCEDURE RenameSolarizedThemeWithUnderscore()\nBEGIN\n DECLARE finished INTEGER DEFAULT 0;\n DECLARE curUserId VARCHAR(26);\n DECLARE curName VARCHAR(32);\n DECLARE curValue text;\n\n DECLARE preference\n CURSOR FOR\n SELECT UserId, Name, Value\n FROM Preferences\n WHERE Category = 'theme' AND Value LIKE '%solarized_%';\n\n -- declare NOT FOUND handler\n DECLARE CONTINUE HANDLER\n FOR NOT FOUND SET finished = 1;\n\n OPEN preference;\n\n getPreference: LOOP\n FETCH preference INTO curUserId, curName, curValue;\n IF finished = 1 THEN\n LEAVE getPreference;\n END IF;\n\n -- update affected rows\n UPDATE Preferences\n SET Value = replace(curValue, 'solaraized_', 'solarized-')\n WHERE Category = 'theme'\n AND UserId = curUserId\n AND Name = curName;\n END LOOP getPreference;\nEND;\n\nCALL RenameSolarizedThemeWithUnderscore();\n\nDROP PROCEDURE IF EXISTS RenameSolarizedThemeWithUnderscore;\n\nSET @preparedStatement = (SELECT IF(\n (\n SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_name = 'Preferences'\n AND table_schema = DATABASE()\n AND index_name = 'idx_preferences_user_id'\n ) > 0,\n 'DROP INDEX idx_preferences_user_id ON Preferences;',\n 'SELECT 1'\n));\n\nPREPARE removeIndexIfExists FROM @preparedStatement;\nEXECUTE removeIndexIfExists;\nDEALLOCATE PREPARE removeIndexIfExists;\n\n"}

    Restored previous version for now.

    Conscious tech

    1 Reply Last reply
    2
    • gardinermichaelG Offline
      gardinermichaelG Offline
      gardinermichael
      wrote on last edited by
      #2

      My organization is getting the same error. We've rolled back to 1.58.0 for the moment and disabled updates.

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        Thanks for reporting @robi . We got a couple of tickets on support with the same backtrace. I have revoked the release.

        1 Reply Last reply
        1
        • girishG girish moved this topic from Support on
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          This is already reported upstream - https://github.com/mattermost/mattermost-server/issues/19602

          1 Reply Last reply
          2
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            OK, I have found the root cause - https://github.com/mattermost/mattermost-server/issues/19602#issuecomment-1057360142 . It's a mixture of app not specifying the collation order and Cloudron provisioning database collation to not match upstream defaults.

            1 Reply Last reply
            1
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @robi Can you please try the latest package? should be fixed now.

              robiR 1 Reply Last reply
              1
              • girishG girish

                @robi Can you please try the latest package? should be fixed now.

                robiR Offline
                robiR Offline
                robi
                wrote on last edited by
                #7

                @girish checked for updates twice, none available.

                Notification is offering 7.1.2 though.

                Conscious tech

                nebulonN girishG 2 Replies Last reply
                0
                • robiR robi

                  @girish checked for updates twice, none available.

                  Notification is offering 7.1.2 though.

                  nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #8

                  @robi the latest mattermost package has "minBoxVersion": "7.1.2" set, so first you have to update your Cloudron to 7.1.2 and then the mattermost update will be available.

                  1 Reply Last reply
                  0
                  • robiR robi

                    @girish checked for updates twice, none available.

                    Notification is offering 7.1.2 though.

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #9

                    @robi yes, please update to latest cloudron and then update mattermost. there are some db fixes in 7.1 which are required for the upgrade.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search