Some reinstalls of software after upgrade from Buster to Bullseye fail Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
fhals
Posts: 35
Joined: Mon Sep 07, 2020 10:00 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by fhals »

Thank you both, php reinstalled successfully.
Had to leave out the downgrade option ('--allow-downgrade is not understood in combination with the other options')

Feels like I'm close to final bullseye, but

mariadb fails to start.

Reinstallation went fine:

Code: Select all

 Step: Installing MariaDB: Persistent cached file-per-table database server

[ INFO ] DietPi-Software | Preparing database directory at: /mnt/dietpi_userdata/mysql
[ INFO ] DietPi-Software | /mnt/dietpi_userdata/mysql exists, will migrate containing databases
[  OK  ] DietPi-Software | rm -Rf /var/lib/mysql
[  OK  ] DietPi-Software | ln -s /mnt/dietpi_userdata/mysql /var/lib/mysql
[ INFO ] DietPi-Software | APT install for: mariadb-server, please wait...
[  OK  ] DietPi-Software | APT install for: mariadb-server
[ INFO ] DietPi-Software | Removing obsolete SysV mysql service
[  OK  ] DietPi-Software | update-rc.d mysql remove
Job for mariadb.service failed because a fatal signal was delivered to the control process.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

Not much details, journalctl shows:

Code: Select all

Sep 27 16:41:59 DietPi systemd[1]: Starting MariaDB 10.5.11 database server...
░░ Subject: A start job for unit mariadb.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit mariadb.service has begun execution.
░░
░░ The job identifier is 23352.
Sep 27 16:42:00 DietPi systemd[1]: mariadb.service: Main process exited, code=killed, status=4/ILL
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit mariadb.service has exited.
░░
░░ The process' exit code is 'killed' and its exit status is 4.
Sep 27 16:42:00 DietPi systemd[1]: mariadb.service: Failed with result 'signal'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit mariadb.service has entered the 'failed' state with result 'signal'.
Sep 27 16:42:00 DietPi systemd[1]: Failed to start MariaDB 10.5.11 database server.
░░ Subject: A start job for unit mariadb.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit mariadb.service has finished with a failure.
░░
░░ The job identifier is 23352 and the job result is failed.
systemctl:

Code: Select all

systemctl status mariadb.service
● mariadb.service - MariaDB 10.5.11 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: signal) since Mon 2021-09-27 16:47:05 CEST; 715ms ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 36577 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 36579 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 36582 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: 36644 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ILL)
   Main PID: 36644 (code=killed, signal=ILL)
My external HD is up and running, my pre-upgrade databases are still there. Symbolic link at /var/lib/mysql sends me there too.
I can't detect any hint in the failed status, do you?

Thanks & regards, Frans
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by Joulinar »

ok let's try the usual debug steps

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
fhals
Posts: 35
Joined: Mon Sep 07, 2020 10:00 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by fhals »

Sorry, nothing new here:

Code: Select all

systemctl restart mariadb.service
Job for mariadb.service failed because a fatal signal was delivered to the control process.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

Code: Select all

journalctl -u mariadb
Journal file /var/log/journal/fbd586f15aab42cdab084639a1d2b2cc/system.journal is truncated, ignoring file.
-- Journal begins at Tue 2021-09-28 08:39:39 CEST, ends at Tue 2021-09-28 08:41:05 CEST. --
Sep 28 08:39:44 DietPi systemd[1]: mariadb.service: Scheduled restart job, restart counter is at 8001.
Sep 28 08:39:44 DietPi systemd[1]: Stopped MariaDB 10.5.11 database server.
Sep 28 08:39:44 DietPi systemd[1]: Starting MariaDB 10.5.11 database server...
Sep 28 08:39:45 DietPi systemd[1]: mariadb.service: Main process exited, code=killed, status=4/ILL
Sep 28 08:39:45 DietPi systemd[1]: mariadb.service: Failed with result 'signal'.
Sep 28 08:39:45 DietPi systemd[1]: Failed to start MariaDB 10.5.11 database server.
Repeating from here with increasing counter
error.log is empty, while user mysql has write access. No more mysql.logs:

Code: Select all

cat /var/log/mysql/error.log
ls -la /var/log
drwxr-s---   2 mysql    adm                   60 Feb 17  2019 mysql
ls -la /var/log/mysql
-rw-rw----  1 mysql adm    0 Sep 24 11:29 error.log

Code: Select all

readlink /var/lib/mysql
/mnt/dietpi_userdata/mysql

readlink -f /var/lib/mysql
/mnt/usb_1/dietpi_userdata/mysql
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by Joulinar »

could you try to reboot and repeat the test?

Unfortunately no real error message present at the moment.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
fhals
Posts: 35
Joined: Mon Sep 07, 2020 10:00 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by fhals »

Did it again.
Exactly the same- no results.

When I compare /lib/systemd/system/mariadb.service with my last running backup version, both are nearly identical.

Small diff:

NEW:

Code: Select all

[Install]
WantedBy=multi-user.target

CapabilityBoundingSet=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
PrivateDevices=false
OLD:

Code: Select all

[Install]
WantedBy=multi-user.target
Alias=mysql.service
Alias=mysqld.service

CapabilityBoundingSet=CAP_IPC_LOCK
PrivateDevices=true
fhals
Posts: 35
Joined: Mon Sep 07, 2020 10:00 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by fhals »

Information on Mariadb failing to start without errors is barely to find.
Should I try to uninstall and install it again instead of reinstall (viewtopic.php?f=11&t=8729&start=10)?
I have a full backup of all databases, but would like to keep my nextcloud installation.
User avatar
MichaIng
Site Admin
Posts: 3357
Joined: Sat Nov 18, 2017 6:21 pm

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by MichaIng »

Can you try whether it shows more output when switching to console log:

Code: Select all

echo 'skip_log_error=1' > /etc/mysql/mariadb.conf.d/99-disable-file-logging.cnf
systemctl restart mariadb
sleep 5
journalctl -u mariadb
fhals
Posts: 35
Joined: Mon Sep 07, 2020 10:00 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by fhals »

Code: Select all

Sep 28 19:58:27 DietPi systemd[1]: Starting MariaDB 10.5.11 database server...
Sep 28 19:58:28 DietPi sh[48435]: error: Found option without preceding group in config file: /etc/mysql/mariadb.conf.d/99-disable-file-logging.cnf at line: 1
Sep 28 19:58:28 DietPi mariadbd[48493]: error: Found option without preceding group in config file: /etc/mysql/mariadb.conf.d/99-disable-file-logging.cnf at line: 1
Sep 28 19:58:28 DietPi systemd[1]: mariadb.service: Main process exited, code=killed, status=4/ILL
Sep 28 19:58:28 DietPi systemd[1]: mariadb.service: Failed with result 'signal'.
Sep 28 19:58:28 DietPi systemd[1]: Failed to start MariaDB 10.5.11 database server.
Edit:
Just added a '[mysqld]' prior the skip_log_error=1.
No shown errors, like before:

Code: Select all

Sep 28 20:01:15 DietPi systemd[1]: Starting MariaDB 10.5.11 database server...
Sep 28 20:01:15 DietPi systemd[1]: mariadb.service: Main process exited, code=killed, status=4/ILL
Sep 28 20:01:15 DietPi systemd[1]: mariadb.service: Failed with result 'signal'.
Sep 28 20:01:15 DietPi systemd[1]: Failed to start MariaDB 10.5.11 database server.
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by Joulinar »

quite strange that there is no output at all
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3357
Joined: Sat Nov 18, 2017 6:21 pm

Re: Some reinstalls of software after upgrade from Buster to Bullseye fail

Post by MichaIng »

Ah yes sorry, the config section was missing. Hmm, and if you start it manually from console:

Code: Select all

sudo -u mariadb /usr/sbin/mariadbd
Post Reply