dropbear to openSSH kills mariadb Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
afghdue
Posts: 3
Joined: Thu Sep 10, 2020 8:29 pm

dropbear to openSSH kills mariadb

Post by afghdue »

hey there,

I have a basic instance running with only mariadb.
Changed dropbear to openSSH using dietpi-software, reboots and mariadb fails to start.

Turns out mysql.service now exists and is being started prior to mariadb.service.

I have resolved issue by disabling mysql.service, reboot and mariadb.service starts fine.

I tried this on a fresh dietpi image in virtualbox and it does exact same thing.

I know mariadb is forked from mysql, but do i now have more unneeded crud installed?
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: dropbear to openSSH kills mariadb

Post by Joulinar »

Hi,

many thanks for your report. I tried to replicate your issue but without success.
  1. basically I used a fresh installation
  2. installed MariaDB from dietpi-software
  3. rebooted
  4. checked the available services
    1. mariadb.service > active (running)
    2. mysql.service could not be found
  5. switched from Dropbear to OpenSSH Server using dietpi-software
  6. rebooted
  7. checked the available services
    1. mariadb.service > active (running)
    2. mysql.service could not be found
  8. everything is working as expected
During installation of MariaDB, services for MySQL should have been removed.

Code: Select all

[  OK  ] DietPi-Software | APT install for: mariadb-server
[ INFO ] DietPi-Software | Switching from /etc/init.d/mysql to mariadb.service
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable mysql
Removed /etc/systemd/system/mysqld.service.
Removed /etc/systemd/system/mysql.service.
Pls can you let me know steps you did, to be able to reproduce the issue.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
afghdue
Posts: 3
Joined: Thu Sep 10, 2020 8:29 pm

Re: dropbear to openSSH kills mariadb

Post by afghdue »

I have got it to fail again, please see my steps below.

Used the following virtual box image

==================================================
Filename : DietPi_VirtualBox-x86_64-Buster.ova
MD5 : 4ba0a77f5143139f1c4d981073858bde
SHA1 : d045468341792e237bad711c01425aa0d949d296
CRC32 : e5234733
SHA-256 : 9974c9c2f708e8e28b55c0702225a5d51592cd8d63eb1cd829030f52ff5f8a0b
SHA-512 : 1a0dffcc7369c2e30e860c88ca9200e217428b265270569f5ef7bb7b17f91cd169e38753d95ab9214cacbc1f7de449e069bb5833595b0f16dced3f3d239e3af8
SHA-384 : 624aa36d6007c559aed4cb01c5cfc203f8fceed543c16678c685e2a83bca371e741dff0e1db7368d31412bd43f5ed925
Modified Time : 31.07.2020 00:29:52
Created Time : 31.07.2020 00:29:13
Entry Modified Time: 31.07.2020 00:29:52
File Size : 201.613.312
Extension : ova
File Attributes : A
==================================================

Import and run initial setup. Dietpi banner says it is version 6.32.2

I then ran sudo apt-get install mariadb-server (not from dietpi-software)
MariaDb installs, reboots everything is fine.

Then from Dietpi-software I change DropBear to OpenSSH, reboots and MariaDB fails to start.

Image

I am not to worried as I have fixed issue, just thought I would mention it in case it affects other software :)
Attachments
dietpi.PNG
dietpi.PNG (8.01 KiB) Viewed 191 times
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: dropbear to openSSH kills mariadb

Post by Joulinar »

Is there are a particular reason why not using MariaDB from dietpi-sofware catalogue? Because exactly this could have been avoided as DietPi is doing some aftercare once MariaDB was installed ;)

DietPi source code

Code: Select all

systemctl disable --now mysql
rm /etc/init.d/mysql
update-rc.d -f mysql remove
Basically similar to what you have done now. :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
afghdue
Posts: 3
Joined: Thu Sep 10, 2020 8:29 pm

Re: dropbear to openSSH kills mariadb

Post by afghdue »

Was just habit typing it into cli, will use Dietpi-Software next time :)
Post Reply