Lighttpd SSL failures after upgrade from Buster to Bullseye Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
przemko
Posts: 202
Joined: Sun Mar 15, 2020 5:40 pm

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by przemko »

Do You think I can use https://www.supergrubdisk.org/category/download/ to fix grub on Dietpi?

Regards.
User avatar
Joulinar
Posts: 5927
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by Joulinar »

I don't know as I never used something like this.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 202
Joined: Sun Mar 15, 2020 5:40 pm

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by przemko »

Hi, I rescue grub and everything works on buster again but nextcloud is broken.

Code: Select all

─────────────────────────────────────────────────────(2021-07-18) x86_6 DietPi v7.6.2 : 13:43 - pią 08.10.2021
 ─────────────────────────────────────────────────────
 - Device model : Native PC (x86_64)n GNU/Linux system are free software - CPU temp : 47'C : 116'F (Optimal temperature)
 - LAN IP : 192.168.0.19 (eth0)r each program are described in the
 - MOTD : Learn how to upgrade your system from Buster to Bullseye:
          https://dietpi.com/blog/?p=811
 ───────────────────────────────────────────────────── the extent
permitted by applicable law.
 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image by        : DietPi Core Team (pre-image: Debian mini.iso)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Patreon Legends : Camry2731
 Contribute      : https://dietpi.com/contribute.html
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

dietpi@DietPi:~$ sudo dietpi-services status

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

[  OK  ] DietPi-Services | avahi-daemon         active (running) since Fri 2021-10-08 13:41:32 CEST; 1min 49s ago
[  OK  ] DietPi-Services | proftpd              active (running) since Fri 2021-10-08 13:41:32 CEST; 1min 48s ago
[  OK  ] DietPi-Services | nfs-kernel-server    active (exited) since Fri 2021-10-08 13:41:32 CEST; 1min 48s ago
[  OK  ] DietPi-Services | redis-server         active (running) since Fri 2021-10-08 13:41:32 CEST; 1min 48s ago
[FAILED] DietPi-Services | ● mariadb.service - MariaDB 10.3.29 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-10-08 13:41:34 CEST; 1min 46s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 758 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Process: 793 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 826 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 920 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
 Main PID: 920 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Oct 08 13:41:32 DietPi systemd[1]: Starting MariaDB 10.3.29 database server...
Oct 08 13:41:32 DietPi mysqld[920]: 2021-10-08 13:41:32 0 [Note] /usr/sbin/mysqld (mysqld 10.3.29-MariaDB-0+deb10u1) starting as process 920 ...Oct 08 13:41:34 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 08 13:41:34 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 08 13:41:34 DietPi systemd[1]: Failed to start MariaDB 10.3.29 database server.
[  OK  ] DietPi-Services | php7.3-fpm           active (running) since Fri 2021-10-08 13:41:34 CEST; 1min 46s ago
[  OK  ] DietPi-Services | lighttpd             active (running) since Fri 2021-10-08 13:41:34 CEST; 1min 46s ago
[  OK  ] DietPi-Services | emby-server          active (running) since Fri 2021-10-08 13:41:34 CEST; 1min 46s ago
[  OK  ] DietPi-Services | noip2                active (running) since Fri 2021-10-08 13:41:34 CEST; 1min 46s ago
[  OK  ] DietPi-Services | cron                 active (running) since Fri 2021-10-08 13:41:34 CEST; 1min 46s ago
[  OK  ] DietPi-Services | ssh                  active (running) since Fri 2021-10-08 13:41:32 CEST; 1min 49s ago
[  OK  ] DietPi-Services | fail2ban             active (running) since Fri 2021-10-08 13:41:13 CEST; 2min 7s ago
[ INFO ] DietPi-Services | dietpi-vpn           inactive (dead)
[  OK  ] DietPi-Services | dietpi-ramlog        active (exited) since Fri 2021-10-08 13:41:13 CEST; 2min 7s ago
[  OK  ] DietPi-Services | dietpi-preboot       active (exited) since Fri 2021-10-08 13:41:13 CEST; 2min 7s ago
[  OK  ] DietPi-Services | dietpi-boot          active (exited) since Fri 2021-10-08 13:41:32 CEST; 1min 49s ago
[  OK  ] DietPi-Services | dietpi-postboot      active (exited) since Fri 2021-10-08 13:41:32 CEST; 1min 49s ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor  inactive (dead)
dietpi@DietPi:~$ sudo dietpi-services mariadb restart
[FAILED] DietPi-Services | Service (restart) could not be found.
dietpi@DietPi:~$ sudo dietpi-services restart mariadb

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: restart mariad
User avatar
Joulinar
Posts: 5927
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by Joulinar »

MariaDB is failing not Nextcloud ;)

Code: Select all

systemctl restart mariadb.service
journalctl -u mariadb
cat /var/log/mysql/error.log
readlink /var/lib/mysql
readlink -f /var/lib/mysql
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 202
Joined: Sun Mar 15, 2020 5:40 pm

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by przemko »

I hit that commands:

Code: Select all

dietpi@DietPi:~$ sudo 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.
dietpi@DietPi:~$ sudo journalctl -u mariadb
-- Logs begin at Fri 2021-10-08 14:02:13 CEST, end at Fri 2021-10-08 15:42:11 CEST. --
paź 08 14:02:29 DietPi systemd[1]: Starting MariaDB 10.3.29 database server...
paź 08 14:02:29 DietPi mysqld[986]: 2021-10-08 14:02:29 0 [Note] /usr/sbin/mysqld (mysqld 10.3.29-MariaDB-0+deb10u1) starting as process 986 ...
paź 08 14:02:31 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
paź 08 14:02:31 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
paź 08 14:02:31 DietPi systemd[1]: Failed to start MariaDB 10.3.29 database server.
paź 08 15:41:49 DietPi systemd[1]: Starting MariaDB 10.3.29 database server...
paź 08 15:41:49 DietPi mysqld[4615]: 2021-10-08 15:41:49 0 [Note] /usr/sbin/mysqld (mysqld 10.3.29-MariaDB-0+deb10u1) starting as process 4615 ...
paź 08 15:41:50 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
paź 08 15:41:50 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
paź 08 15:41:50 DietPi systemd[1]: Failed to start MariaDB 10.3.29 database server.
dietpi@DietPi:~$ cat /var/log/mysql/error.log
cat: /var/log/mysql/error.log: Brak dostępu
dietpi@DietPi:~$ sudo cat /var/log/mysql/error.log
2021-10-08 15:41:49 0 [Note] InnoDB: Using Linux native AIO
2021-10-08 15:41:49 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-10-08 15:41:49 0 [Note] InnoDB: Uses event mutexes
2021-10-08 15:41:49 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-10-08 15:41:49 0 [Note] InnoDB: Number of pools: 1
2021-10-08 15:41:49 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-10-08 15:41:49 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-10-08 15:41:49 0 [Note] InnoDB: Completed initialization of buffer pool
2021-10-08 15:41:49 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-10-08 15:41:49 0 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.5.11.
2021-10-08 15:41:49 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-10-08 15:41:50 0 [Note] InnoDB: Starting shutdown...
2021-10-08 15:41:50 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-10-08 15:41:50 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-10-08 15:41:50 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-10-08 15:41:50 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-10-08 15:41:50 0 [ERROR] Aborting

dietpi@DietPi:~$ sudo readlink /var/lib/mysql
/mnt/dietpi_userdata/mysql
dietpi@DietPi:~$ sudo readlink -f /var/lib/mysql
/mnt/Toshiba/dietpi_userdata/mysql
dietpi@DietPi:~$ 
Regards.
User avatar
Joulinar
Posts: 5927
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by Joulinar »

Ah I know what happen. You have your data located on an external disk. Means, they are excluded by dietpi-backup. Hence, your database folder could not be restored. As you started MariaDB on Bullseye, your database files got upgraded to MariaDB 10.5.11. However due to the restore to Buster, MariaDB got downgrade to 10.3.29 as well. And now, database files did not match with database version.

Code: Select all

systemd[1]: Starting MariaDB 10.3.29 database server...
[ERROR] InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.5.11.
Not sure if there is a safe way to get MariaDB back working. Probably you would need to complete Bullseye upgrade.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 202
Joined: Sun Mar 15, 2020 5:40 pm

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by przemko »

Hi, I have on second USB HDD dietpi-sync and all folders from dietpi_userdata, including /MySQL and nextcloud_data folder. Can I just copy /MySQL folder from there?
Regards.
User avatar
Joulinar
Posts: 5927
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by Joulinar »

that should be working. But I would save the original folder before moving the backup in place. Best to rename the mysql folder on dietpi_userdata to some backup name and copy the backup into the original place.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 202
Joined: Sun Mar 15, 2020 5:40 pm

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by przemko »

That don't work, meybe dietpi-sync sync my new /mysql folder and that was the same.

I cannot reinstall or repair nextcloud:

Code: Select all

root@DietPi:/# ncc maintenance:repair
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:85
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM `...', Array, Array, NULL)
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery('SELECT * FROM `...', Array, Array)
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(110): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(301): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(965): OC\AppConfig->getValues(false, 'installed_versi...')
#9 /var/www/nextcloud/lib/private/Server.php(682): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OC\\Memcache\\Fac...')
#13 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OC\\Memcache\\Fac...', false)
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Memcache\\Fac...')
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(177): OC\AppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\ICacheFacto...')
#19 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OCP\\ICacheFacto...', false)
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\ICacheFacto...')
#21 /var/www/nextcloud/lib/private/Server.php(1041): OC\AppFramework\Utility\SimpleContainer->get('OCP\\ICacheFacto...')
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
#25 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...', false)
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
#27 /var/www/nextcloud/lib/private/Server.php(2000): OC\AppFramework\Utility\SimpleContainer->get('OCP\\Lock\\ILocki...')
#28 /var/www/nextcloud/lib/private/Files/View.php(119): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(430): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OC\\Files\\Node\\H...')
#33 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OC\\Files\\Node\\H...', false)
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Files\\Node\\H...')
#35 /var/www/nextcloud/lib/private/Server.php(1363): OC\AppFramework\Utility\SimpleContainer->get('OC\\Files\\Node\\H...')
#36 /var/www/nextcloud/lib/base.php(588): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1076): OC::init()
#38 /var/www/nextcloud/console.php(49): require_once('/var/www/nextcl...')
#39 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

Code: Select all

root@DietPi:/# dietpi-services status

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

[ INFO ] DietPi-Services | avahi-daemon         inactive (dead) since Sat 2021-10-09 09:39:07 CEST; 4min 17s ago
[ INFO ] DietPi-Services | proftpd              inactive (dead)
[ INFO ] DietPi-Services | nfs-kernel-server    inactive (dead) since Sat 2021-10-09 09:39:06 CEST; 4min 18s ago
[ INFO ] DietPi-Services | redis-server         inactive (dead)
[FAILED] DietPi-Services | ● mariadb.service - MariaDB 10.3.29 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-10-09 09:39:41 CEST; 3min 43s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 5637 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Process: 5638 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 5640 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 5696 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
 Main PID: 5696 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Oct 09 09:39:40 DietPi systemd[1]: Starting MariaDB 10.3.29 database server...
Oct 09 09:39:40 DietPi mysqld[5696]: 2021-10-09  9:39:40 0 [Note] /usr/sbin/mysqld (mysqld 10.3.29-MariaDB-0+deb10u1) starting as process 5696 ...
Oct 09 09:39:41 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 09 09:39:41 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 09 09:39:41 DietPi systemd[1]: Failed to start MariaDB 10.3.29 database server.
[ INFO ] DietPi-Services | php7.3-fpm           inactive (dead)
[ INFO ] DietPi-Services | lighttpd             inactive (dead)
[ INFO ] DietPi-Services | emby-server          inactive (dead)
[ INFO ] DietPi-Services | noip2                inactive (dead)
[ INFO ] DietPi-Services | cron                 inactive (dead)
[  OK  ] DietPi-Services | ssh                  active (running) since Sat 2021-10-09 09:35:14 CEST; 8min ago
[  OK  ] DietPi-Services | fail2ban             active (running) since Sat 2021-10-09 09:34:49 CEST; 8min ago
[ INFO ] DietPi-Services | dietpi-vpn           inactive (dead)
[  OK  ] DietPi-Services | dietpi-ramlog        active (exited) since Sat 2021-10-09 09:34:49 CEST; 8min ago
[  OK  ] DietPi-Services | dietpi-preboot       active (exited) since Sat 2021-10-09 09:34:49 CEST; 8min ago
[  OK  ] DietPi-Services | dietpi-boot          active (exited) since Sat 2021-10-09 09:35:14 CEST; 8min ago
[  OK  ] DietPi-Services | dietpi-postboot      active (exited) since Sat 2021-10-09 09:35:14 CEST; 8min ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor  inactive (dead)
User avatar
Joulinar
Posts: 5927
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd SSL failures after upgrade from Buster to Bullseye

Post by Joulinar »

You need to have a look to MariaDB error.log to see what the issue is
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply