haiwen / seafile-docker

A Docker image for Seafile server
Other
544 stars 184 forks source link

Upgrade from 6.3.2 to 7.0.2 #156

Closed thekingofcity closed 5 years ago

thekingofcity commented 5 years ago

After upgrade to 7.0, I continuous received InnoDB: Error

After docker-compose up, the first two lines of them are

seafile-mysql | 2019-06-16 04:21:10 7f52fd8c1700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:10 7f52fd8c1700 InnoDB: Error: Fetch of persistent statistics requested for table "mysql"."gtid_slave_pos" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
seafile-mysql | 2019-06-16  4:21:10 139994418403328 [Note] mysqld: ready for connections.
seafile-mysql | Version: '10.1.40-MariaDB-1~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

Then right after seafile | Updating seafile/seahub database ..., alot of InnoDB Error appeared.

seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Fetch of persistent statistics requested for table "ccnet_db"."UserRole" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Recalculation of persistent statistics requested for table "ccnet_db"."UserRole" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Fetch of persistent statistics requested for table "seafile_db"."RepoInfo" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Recalculation of persistent statistics requested for table "seafile_db"."RepoInfo" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Fetch of persistent statistics requested for table "seafile_db"."RepoSyncError" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Fetch of persistent statistics requested for table "seahub_db"."options_useroptions" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Recalculation of persistent statistics requested for table "seahub_db"."options_useroptions" index "options_useroptions_option_key_7bf7ae4b" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Fetch of persistent statistics requested for table "seahub_db"."profile_profile" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Recalculation of persistent statistics requested for table "seahub_db"."profile_profile" index "profile_profile_contact_email_0975e4bf_uniq" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Fetch of persistent statistics requested for table "seahub_db"."base_filecomment" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Recalculation of persistent statistics requested for table "seahub_db"."base_filecomment" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Recalculation of persistent statistics requested for table "seahub_db"."base_filecomment" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Recalculation of persistent statistics requested for table "seahub_db"."base_filecomment" index "resolved" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
seafile-mysql | 2019-06-16 04:21:12 7f52fd876700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).

But those didn't stop the script, then came with

seafile      | [INFO] You are using MySQL
seafile      | [INFO] updating ccnet database...
seafile      | [INFO] updating seafile database...
seafile      | [INFO] updating seahub database...
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.TotalStorageStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.TotalStorageStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.TotalStorageStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.TotalStorageStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.FileOpsStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.FileOpsStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.UserActivityStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.UserActivityStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.UserActivityStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.UserActivityStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1146, "Table 'seahub_db.UserActivityStat' doesn't exist")
seafile      | [WARNING] Failed to execute sql: (1051, "Unknown table 'seahub_db.UserTrafficStat'")
seafile      | [WARNING] Failed to execute sql: (1091, "Can't DROP 'profile_profile_contact_email_0975e4bf_uniq'; check that column/key exists")
seafile      | Done
seafile      | 
seafile      | migrating avatars ...
seafile      | 
seafile      | Done
seafile      | 
seafile      | updating /opt/seafile/seafile-server-latest symbolic link to /opt/seafile/seafile-server-7.0.2 ...
seafile      | 
seafile      | 
seafile      | 
seafile      | -----------------------------------------------------------------
seafile      | Upgraded your seafile server successfully.
seafile      | -----------------------------------------------------------------
seafile      | 
seafile      | 
seafile      | [06/16/19 04:21:13] ../common/session.c(132): using config file /opt/seafile/conf/ccnet.conf
seafile      | Starting seafile server, please wait ...
seafile      | ** Message: seafile-controller.c(718): No seafevents.
seafile      |

Seems that though some table didn't exist, the upgrade process still finished. And it was fine to open the website and list/upload/download files with a lot of InnoDB: Error in the console output. So I'm worried to know if those error was fine or not?

PS: to get the upgrade work

  1. add memcached settings in seahub_settings.py since version 6.3.2 didn't come with that.
  2. change for database in {ccnet_db,seafile_db,seahub_db}; do sudo docker exec -it seafile /usr/bin/mysql -e "grant all on ${database}.* to 'seaf'@'%.%.%.%' identified by '467fa02f-bf9a-4afb-9300-c4683073162a';"; done to for database in {ccnet_db,seafile_db,seahub_db}; do sudo docker exec -it seafile /usr/bin/mysql -e "grant all on ${database}.* to 'seafile'@'%.%.%.%' identified by '467fa02f-bf9a-4afb-9300-c4683073162a';"; done cus seaf is not a user in db?
  3. reset the password in cli for MariaDB and fix ‘Unix_socket’ Is Not Loaded Error 1
thekingofcity commented 5 years ago

BTW the upgrade manual1 is so slow to scroll, didn't know what to cause that. 1

thekingofcity commented 5 years ago

So after some attempt, I found that this is a mysql/mariadb error? I followed this tutorial and fix those InnoDB: Error. And then everything is fine.