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 »

Sudo user should by 'mysql', not 'mariadb', right?

Code: Select all

sudo -u mariadb /usr/sbin/mariadbd
sudo: unknown user: mariadb
sudo: error initializing audit plugin sudoers_audit
Already tried this without sudo with the same result:

Code: Select all

sudo -u mysql /usr/sbin/mariadbd
Illegal instruction
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

Yes user is mysql

Hmm looks like the binary is broken :?

Maybe reinstall would be the way to go
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 »

Reinstalling is where the trouble started.
Now, when I reinstall mariadb only, it goes well, but starting the service fails. (lighttpd and ncc too).
When I use the combined reinstall as suggested in the bullseye upgrade hint (dietpi-software reinstall 38 40 47 48 56 83 84 85 88 89 93 114 143), the latter services startup fine, just mariadb fails.

Code: Select all

dietpi-software reinstall 88
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Automated reinstall

[  OK  ] DietPi-Software | Reinstalling MariaDB: Persistent cached file-per-table database server
[  OK  ] DietPi-Software | Free space check: path=/ | available=4179 MiB | required=500 MiB
[  OK  ] DietPi-Software | DietPi-Userdata validation: /mnt/usb_1/dietpi_userdata
[  OK  ] DietPi-Software | Checking network connectivity
[  OK  ] DietPi-Software | Checking DNS resolver
[  OK  ] Network time sync | Completed
[ SUB1 ] DietPi-Services > unmask
[  OK  ] DietPi-Services | unmask : nmbd
[  OK  ] DietPi-Services | unmask : smbd
[  OK  ] DietPi-Services | unmask : redis-server
[  OK  ] DietPi-Services | unmask : mariadb
[  OK  ] DietPi-Services | unmask : postgresql
[  OK  ] DietPi-Services | unmask : php7.4-fpm
[  OK  ] DietPi-Services | unmask : lighttpd
[  OK  ] DietPi-Services | unmask : jellyfin
[  OK  ] DietPi-Services | unmask : cron
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : jellyfin
[  OK  ] DietPi-Services | stop : lighttpd
[  OK  ] DietPi-Services | stop : php7.4-fpm
[  OK  ] DietPi-Services | stop : postgresql
[  OK  ] DietPi-Services | stop : mariadb
[  OK  ] DietPi-Services | stop : redis-server
[  OK  ] DietPi-Services | stop : smbd
[  OK  ] DietPi-Services | stop : nmbd
[  OK  ] DietPi-Software | mkdir -p /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads /var/www /opt /usr/local/bin
[  OK  ] DietPi-Software | chown dietpi:dietpi /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
[  OK  ] DietPi-Software | chmod 0775 /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
[ INFO ] DietPi-Software | APT update, please wait...
Hit:1 https://deb.debian.org/debian bullseye InRelease
Hit:2 https://dietpi.com/meveric all InRelease
Get:3 https://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Hit:4 https://dietpi.com/meveric bullseye InRelease
Hit:5 https://deb.debian.org/debian-security bullseye-security InRelease
Get:6 https://deb.debian.org/debian bullseye-backports InRelease [40.9 kB]
Get:7 https://repo.jellyfin.org/debian bullseye InRelease [6639 B]
Fetched 86.9 kB in 3s (29.1 kB/s)
Reading package lists...
[  OK  ] DietPi-Software | APT update

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for prerequisite software


 DietPi-Software
─────────────────────────────────────────────────────
 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 php7.4-mysql, please wait...
[  OK  ] DietPi-Software | APT install for: mariadb-server php7.4-mysql
[ INFO ] DietPi-Software | Removing obsolete SysV mysql service
[  OK  ] DietPi-Software | update-rc.d mysql remove
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : jellyfin
[  OK  ] DietPi-Services | stop : lighttpd
[  OK  ] DietPi-Services | stop : php7.4-fpm
[  OK  ] DietPi-Services | stop : postgresql
[  OK  ] DietPi-Services | stop : mariadb
[  OK  ] DietPi-Services | stop : redis-server
[  OK  ] DietPi-Services | stop : smbd
[  OK  ] DietPi-Services | stop : nmbd

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Finalising install

[  OK  ] DietPi-Software | systemctl daemon-reload
[ SUB1 ] DietPi-Services > dietpi_controlled
[  OK  ] DietPi-Services | dietpi_controlled : nmbd
[  OK  ] DietPi-Services | dietpi_controlled : smbd
[  OK  ] DietPi-Services | dietpi_controlled : redis-server
[  OK  ] DietPi-Services | dietpi_controlled : mariadb
[  OK  ] DietPi-Services | dietpi_controlled : postgresql
[  OK  ] DietPi-Services | dietpi_controlled : php7.4-fpm
[  OK  ] DietPi-Services | dietpi_controlled : lighttpd
[  OK  ] DietPi-Services | dietpi_controlled : jellyfin
[  OK  ] DietPi-Services | dietpi_controlled : cron

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Install completed

[  OK  ] DietPi-Survey | Purging survey data
[ SUB1 ] DietPi-Services > restart
[  OK  ] DietPi-Services | restart : nmbd
[  OK  ] DietPi-Services | restart : smbd
[  OK  ] DietPi-Services | restart : redis-server
[FAILED] DietPi-Services | restart : mariadb
[  OK  ] DietPi-Services | restart : postgresql
[  OK  ] DietPi-Services | restart : php7.4-fpm
[FAILED] DietPi-Services | restart : lighttpd
[  OK  ] DietPi-Services | restart : jellyfin
[  OK  ] DietPi-Services | restart : cron
[FAILED] DietPi-Services | ncc maintenance:mode --off
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

You have a database backup available right?

I guess you would need to force a reinstallation using

Code: Select all

apt install --reinstall mariadb-server
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 »

Wish it would help:

Code: Select all

# apt install --reinstall mariadb-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 34.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://deb.debian.org/debian bullseye/main arm64 mariadb-server all 1:10.5.11-1 [34.8 kB]
Fetched 34.8 kB in 0s (98.0 kB/s)
(Reading database ... 35151 files and directories currently installed.)
Preparing to unpack .../mariadb-server_1%3a10.5.11-1_all.deb ...
Unpacking mariadb-server (1:10.5.11-1) over (1:10.5.11-1) ...
Setting up mariadb-server (1:10.5.11-1) ...
At the end, I can't restart mariadb.service. Like before, without any useful error message.
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

Hmm in this case we might need to purge and remove everything related to mariadb otherwise I'm not sure how to fix but definitely you need a backup from before.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
nigelf
Posts: 10
Joined: Wed Sep 29, 2021 1:33 pm

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

Post by nigelf »

simply to echo what fhals has been experiencing.

I have tried reinstalls both of entire LEMP package & Mariadb on its own. I have renamed & recreated all configuration folders but still have no luck. DietPi v7.6.2 (beta) with all upgrades done. I have no useful information to add - similar messages & lack of error.log.
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 »

I made a full dump of all databases prior upgrade to bullseye, so I'll be happy to volunteer.
What would be the best way to purge/delete/install without killing my nextcloud from being restored?
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

Basically this should fully remove everything related to MariaDB

viewtopic.php?p=32301&sid=08849092ffcad ... dd7#p32301

Afterwards a reinstall of Nextcloud would be needed to setup database again. If SQL dump is present, it should be imported automatically.

Usually Nextcloud files should stay untouched. But let's wait for @MichaIng to confirm best way.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
nigelf
Posts: 10
Joined: Wed Sep 29, 2021 1:33 pm

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

Post by nigelf »

I did:

G_AGP mariadb-server
G_AGA
sed -i '/aSOFTWARE_INSTALL_STATE\[88\]/c\aSOFTWARE_INSTALL_STATE\[88\]=0' /boot/dietpi/.installed
rm -Rf /{mnt/dietpi_userdata,var/lib,var/log,etc}/mysql
mkdir /mnt/dietpi_userdata/mysql
ln -s /mnt/dietpi_userdata/mysql /var/lib/mysql
apt install mariadb-server
systemctl status mariadb

...but no change:

'Job for mariadb.service failed because a fatal signal was delivered to the control process'
Post Reply