Closed karlshea closed 4 years ago
I'm experiencing the same problem. No logs and internal server error. Found out that mysql doesn't start.
Configured mysql to log errors
root@nextcloud:/var/db/mysql # cat /tmp/mysql_error.log
2020-04-22T18:52:33.6NZ mysqld_safe Logging to '/tmp/mysql_error.log'.
2020-04-22T18:52:33.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2020-04-22T18:52:33.989282Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
2020-04-22T18:52:33.989421Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
2020-04-22T18:52:33.989429Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-04-22T18:52:33.989431Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2020-04-22T18:52:33.990279Z 0 [Note] /usr/local/libexec/mysqld (mysqld 5.7.29-log) starting as process 26006 ...
2020-04-22T18:52:34.036423Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-04-22T18:52:34.036468Z 0 [Note] InnoDB: Uses event mutexes
2020-04-22T18:52:34.036483Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-04-22T18:52:34.036488Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-04-22T18:52:34.036646Z 0 [Note] InnoDB: Number of pools: 1
2020-04-22T18:52:34.036702Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-04-22T18:52:34.037476Z 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 8, chunk size = 128M
2020-04-22T18:52:34.104851Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-04-22T18:52:34.111235Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file '/var/db/mysql/ibdata1' is of a different size 4864 pages (rounded down to MB) than specified in the .cnf file: initial 8192 pages, max 0 (relevant if non-zero) pages!
2020-04-22T18:52:34.111262Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-04-22T18:52:34.431729Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-04-22T18:52:34.431766Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-04-22T18:52:34.431782Z 0 [ERROR] Failed to initialize builtin plugins.
2020-04-22T18:52:34.431788Z 0 [ERROR] Aborting
2020-04-22T18:52:34.431797Z 0 [Note] Binlog end
2020-04-22T18:52:34.431837Z 0 [Note] Shutting down plugin 'CSV'
2020-04-22T18:52:34.433119Z 0 [Note] /usr/local/libexec/mysqld: Shutdown complete
2020-04-22T18:52:34.6NZ mysqld_safe mysqld from pid file /var/db/mysql/nextcloud.pid ended
2020-04-22T18:53:21.6NZ mysqld_safe Logging to '/tmp/mysql_error.log'.
2020-04-22T18:53:21.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2020-04-22T18:53:21.763194Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
2020-04-22T18:53:21.763338Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.
2020-04-22T18:53:21.763346Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-04-22T18:53:21.763348Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2020-04-22T18:53:21.764227Z 0 [Note] /usr/local/libexec/mysqld (mysqld 5.7.29-log) starting as process 27401 ...
2020-04-22T18:53:21.830220Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-04-22T18:53:21.830262Z 0 [Note] InnoDB: Uses event mutexes
2020-04-22T18:53:21.830277Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-04-22T18:53:21.830282Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-04-22T18:53:21.830442Z 0 [Note] InnoDB: Number of pools: 1
2020-04-22T18:53:21.830500Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-04-22T18:53:21.831279Z 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 8, chunk size = 128M
2020-04-22T18:53:21.901468Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-04-22T18:53:21.907811Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file '/var/db/mysql/ibdata1' is of a different size 4864 pages (rounded down to MB) than specified in the .cnf file: initial 8192 pages, max 0 (relevant if non-zero) pages!
2020-04-22T18:53:21.907841Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-04-22T18:53:22.122002Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-04-22T18:53:22.122040Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-04-22T18:53:22.122057Z 0 [ERROR] Failed to initialize builtin plugins.
2020-04-22T18:53:22.122063Z 0 [ERROR] Aborting
2020-04-22T18:53:22.122071Z 0 [Note] Binlog end
2020-04-22T18:53:22.122116Z 0 [Note] Shutting down plugin 'CSV'
2020-04-22T18:53:22.123389Z 0 [Note] /usr/local/libexec/mysqld: Shutdown complete
2020-04-22T18:53:22.6NZ mysqld_safe mysqld from pid file /var/db/mysql/nextcloud.pid ended
got my database running by setting
innodb_data_file_path = ibdata1:128M:autoextend
->
innodb_data_file_path = ibdata1:64M:autoextend
mysql_upgrade
service mysql-server restart
@MrSauna I had exactly the same issue
I did need to make the change you indicated, and after running mysql_upgrade and restarting MySQL came up, but that didn't fix the issue for me, I still get "502 bad gateway".
Given all of the issues in the Jira that are still open it's clear plugins are not a priority for iXsystems, so I'll just delete it.
As @MrSauna states, setting innodb_data_file_path = ibdata1:64M:autoextend
in /usr/local/etc/mysql/my.cnf
is neccessary.
What worked for me though, was just starting MySQL after changing the config and NOT running the mysql_upgrade. When I opened Nextcloud in a webbrowser, Nexctcloud was ready to perform the last part of the update.
See https://www.reddit.com/r/freenas/comments/fy7m9x/113u2_nextcloud_plugin_update_broke/