Internal Server Error on NextCloud after updating DietPi Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Joulinar
Posts: 2023
Joined: Sat Nov 16, 2019 12:49 am

Re: Internal Server Error on NextCloud after updating DietPi

Post by Joulinar »

First let's fix your issue before removing any folder
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mk33
Posts: 21
Joined: Thu Jun 11, 2020 10:13 pm

Re: Internal Server Error on NextCloud after updating DietPi

Post by mk33 »

Code: Select all

sudo journalctl -u mariadb
-- Logs begin at Tue 2020-07-14 21:11:03 BST, end at Tue 2020-07-14 21:30:38 BST. --
Jul 14 21:11:50 DietPi systemd[1]: Starting MariaDB 10.3.22 database server...
Jul 14 21:11:51 DietPi mysqld[670]: 2020-07-14 21:11:51 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as p
rocess 670 ...
Jul 14 21:11:54 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jul 14 21:11:54 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jul 14 21:11:54 DietPi systemd[1]: Failed to start MariaDB 10.3.22 database server.
cat /var/log/mysql/error.log outputs nothing, it's empty...
User avatar
Joulinar
Posts: 2023
Joined: Sat Nov 16, 2019 12:49 am

Re: Internal Server Error on NextCloud after updating DietPi

Post by Joulinar »

yeah the file was truncated.

pls restart maria db and check the error.log afterwards

Code: Select all

systemctl restart mariadb.service
cat /var/log/mysql/error.log
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mk33
Posts: 21
Joined: Thu Jun 11, 2020 10:13 pm

Re: Internal Server Error on NextCloud after updating DietPi

Post by mk33 »

Code: Select all

$ systemctl restart mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.



$ cat /var/log/mysql/error.log
2020-07-14 23:37:55 0 [Note] InnoDB: Using Linux native AIO
2020-07-14 23:37:55 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-14 23:37:55 0 [Note] InnoDB: Uses event mutexes
2020-07-14 23:37:55 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-14 23:37:55 0 [Note] InnoDB: Number of pools: 1
2020-07-14 23:37:55 0 [Note] InnoDB: Using generic crc32 instructions
2020-07-14 23:37:55 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-07-14 23:37:55 0 [Note] InnoDB: Completed initialization of buffer pool
2020-07-14 23:37:55 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-07-14 23:37:55 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-07-14 23:37:55 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-07-14 23:37:55 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-07-14 23:37:55 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-07-14 23:37:55 0 [Note] InnoDB: 10.3.22 started; log sequence number 46552664; transaction id 115418
2020-07-14 23:37:55 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
2020-07-14 23:37:55 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-07-14 23:37:55 0 [Note] Recovering after a crash using tc.log
2020-07-14 23:37:55 0 [ERROR] Bad magic header in tc log
2020-07-14 23:37:55 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2020-07-14 23:37:55 0 [ERROR] Can't init tc log
2020-07-14 23:37:55 0 [ERROR] Aborting

2020-07-14 23:39:24 0 [Note] InnoDB: Using Linux native AIO
2020-07-14 23:39:24 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-14 23:39:24 0 [Note] InnoDB: Uses event mutexes
2020-07-14 23:39:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-14 23:39:24 0 [Note] InnoDB: Number of pools: 1
2020-07-14 23:39:24 0 [Note] InnoDB: Using generic crc32 instructions
2020-07-14 23:39:24 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-07-14 23:39:24 0 [Note] InnoDB: Completed initialization of buffer pool
2020-07-14 23:39:24 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-07-14 23:39:24 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-07-14 23:39:24 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-07-14 23:39:24 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-07-14 23:39:24 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-07-14 23:39:24 0 [Note] InnoDB: Waiting for purge to start
2020-07-14 23:39:24 0 [Note] InnoDB: 10.3.22 started; log sequence number 46552673; transaction id 115418
2020-07-14 23:39:24 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
2020-07-14 23:39:24 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-07-14 23:39:24 0 [Note] Recovering after a crash using tc.log
2020-07-14 23:39:24 0 [ERROR] Bad magic header in tc log
2020-07-14 23:39:24 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2020-07-14 23:39:24 0 [ERROR] Can't init tc log
2020-07-14 23:39:24 0 [ERROR] Aborting



$ systemctl restart mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
root@DietPi:/home/dt# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.22 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-07-14 23:39:27 BST; 33s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 892 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Process: 893 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 895 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]
   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 952 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/F
AILURE)
 Main PID: 952 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Jul 14 23:39:24 DietPi systemd[1]: Starting MariaDB 10.3.22 database server...
Jul 14 23:39:24 DietPi mysqld[952]: 2020-07-14 23:39:24 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as p
rocess 952 ...
Jul 14 23:39:27 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jul 14 23:39:27 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jul 14 23:39:27 DietPi systemd[1]: Failed to start MariaDB 10.3.22 database server.
User avatar
Joulinar
Posts: 2023
Joined: Sat Nov 16, 2019 12:49 am

Re: Internal Server Error on NextCloud after updating DietPi

Post by Joulinar »

pls do

Code: Select all

mv /mnt/dietpi_userdata/mysql/tc.log /mnt/dietpi_userdata/mysql/tc.save
systemctl restart mariadb.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mk33
Posts: 21
Joined: Thu Jun 11, 2020 10:13 pm

Re: Internal Server Error on NextCloud after updating DietPi

Post by mk33 »

How did you know that you needed to do that mv? There was nothing in logs about that file "tc.save" ...

DB server is running now. I can access NC, everything looks fine.

Code: Select all

# systemctl restart mariadb.service
# cat /var/log/mysql/error.log
2020-07-15  9:08:54 0 [Note] InnoDB: Using Linux native AIO
2020-07-15  9:08:54 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-15  9:08:54 0 [Note] InnoDB: Uses event mutexes
2020-07-15  9:08:54 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-15  9:08:54 0 [Note] InnoDB: Number of pools: 1
2020-07-15  9:08:54 0 [Note] InnoDB: Using generic crc32 instructions
2020-07-15  9:08:54 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-07-15  9:08:54 0 [Note] InnoDB: Completed initialization of buffer pool
2020-07-15  9:08:54 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-07-15  9:08:54 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-07-15  9:08:54 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-07-15  9:08:54 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-07-15  9:08:54 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-07-15  9:08:54 0 [Note] InnoDB: 10.3.22 started; log sequence number 46552682; transaction id 115418
2020-07-15  9:08:54 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
2020-07-15  9:08:54 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-07-15  9:08:54 0 [Note] Recovering after a crash using tc.log
2020-07-15  9:08:54 0 [ERROR] Bad magic header in tc log
2020-07-15  9:08:54 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2020-07-15  9:08:54 0 [ERROR] Can't init tc log
2020-07-15  9:08:54 0 [ERROR] Aborting

2020-07-15  9:11:21 0 [Note] InnoDB: Using Linux native AIO
2020-07-15  9:11:21 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-15  9:11:21 0 [Note] InnoDB: Uses event mutexes
2020-07-15  9:11:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-15  9:11:21 0 [Note] InnoDB: Number of pools: 1
2020-07-15  9:11:21 0 [Note] InnoDB: Using generic crc32 instructions
2020-07-15  9:11:21 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-07-15  9:11:21 0 [Note] InnoDB: Completed initialization of buffer pool
2020-07-15  9:11:21 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-07-15  9:11:21 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-07-15  9:11:21 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-07-15  9:11:21 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-07-15  9:11:21 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-07-15  9:11:21 0 [Note] InnoDB: Waiting for purge to start
2020-07-15  9:11:21 0 [Note] InnoDB: 10.3.22 started; log sequence number 46552691; transaction id 115418
2020-07-15  9:11:21 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
2020-07-15  9:11:21 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-07-15  9:11:21 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-07-15  9:11:21 0 [Note] Reading of all Master_info entries succeeded
2020-07-15  9:11:21 0 [Note] Added new Master_info '' to hash table
2020-07-15  9:11:21 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.22-MariaDB-0+deb10u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Raspbian 10
2020-07-15  9:11:21 0 [Note] InnoDB: Buffer pool(s) load completed at 200715  9:11:21

Code: Select all

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: status 

[  OK  ] DietPi-Services | redis-server         active (running) since Wed 2020-07-15 09:08:53 BST; 8min ago
[  OK  ] DietPi-Services | mariadb              active (running) since Wed 2020-07-15 09:11:21 BST; 5min ago
[  OK  ] DietPi-Services | php7.3-fpm           active (running) since Wed 2020-07-15 09:08:57 BST; 8min ago
[  OK  ] DietPi-Services | lighttpd             active (running) since Wed 2020-07-15 09:08:58 BST; 8min ago
[  OK  ] DietPi-Services | cron                 active (running) since Wed 2020-07-15 09:08:58 BST; 8min ago
[  OK  ] DietPi-Services | dropbear             active (running) since Wed 2020-07-15 09:08:52 BST; 8min ago
[  OK  ] DietPi-Services | dietpi-ramlog        active (exited) since Wed 2020-07-15 00:23:15 BST; 8h ago
[  OK  ] DietPi-Services | dietpi-preboot       active (exited) since Wed 2020-07-15 00:23:15 BST; 8h ago
[  OK  ] DietPi-Services | dietpi-boot          active (exited) since Wed 2020-07-15 09:08:52 BST; 8min ago
[  OK  ] DietPi-Services | dietpi-postboot      active (exited) since Wed 2020-07-15 09:08:52 BST; 8min ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor  inactive (dead)
User avatar
Joulinar
Posts: 2023
Joined: Sat Nov 16, 2019 12:49 am

Re: Internal Server Error on NextCloud after updating DietPi

Post by Joulinar »

well the error was described within your error.log

Code: Select all

2020-07-14 23:37:55 0 [ERROR] Bad magic header in tc log
2020-07-14 23:37:55 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2020-07-14 23:37:55 0 [ERROR] Can't init tc log
2020-07-14 23:37:55 0 [ERROR] Aborting
It's stating that the tc.log is corrupted. And we simply moved tc.log to tc.save. It could have been removed as well ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mk33
Posts: 21
Joined: Thu Jun 11, 2020 10:13 pm

Re: Internal Server Error on NextCloud after updating DietPi

Post by mk33 »

Closing this topic.
Many thanks for helping me make things working again Joulinar :)
Post Reply