• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Troubles with DB Mysql/MariaDB after Ubuntu upgrade

masaro

New Pleskian
Hello people,

i am running Plesk Obsidian 18.0.30.1 and yesterday afternoon i have performed a dist-upgrade to Ubuntu 20.04 through SSH.
During the upgrade a mysql-server-8.0 package has been installed and after having fixed some configuration issues given by the strict mode i have succesfully managed to bring my website back online (and plesk application of course).

However tonight something happened because when i opened my website there were db issues again. Apparently either mariadb has been automatically installed by some cron job or just the service started (i don't really know) but in anycase the mariadb-server was running and was giving troubles with

InnoDB: Invalid flags 0x4000 in ./ibdata1

because of that i have tried to remove mariadb and go back to mysql-server-8.0 package but something went wrong and i am now stuck in a dependency deadlock:

-plesk-mysql-server needs either mysql or mariadb

-I can't install maria-db because it will automatically try to remove mysql-server, but apparently that is not possible
Code:
dpkg: error processing package mysql-server-8.0 (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal

-Then i try to install mysql-server but
Code:
mysql-server-8.0 is already the newest version (8.0.21-0ubuntu0.20.04.4).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 dbconfig-mysql : Depends: default-mysql-client or
                           virtual-mysql-client
 mariadb-server : Depends: mariadb-server-10.4 (>= 1:10.4.14+maria~focal) but it is not going to be installed
 mysql-server-8.0 : Depends: mysql-client-8.0 (>= 8.0.21-0ubuntu0.20.04.4) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

-So i try to fix the broken install
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libevent-core-2.1-7 libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libmariadb3 mariadb-client-10.4 mariadb-client-core-10.4 mariadb-server-10.4
  mariadb-server-core-10.4
Suggested packages:
  mariadb-test tinyca
The following packages will be REMOVED:
  mysql-server-8.0 mysql-server-core-8.0
The following NEW packages will be installed:
  libmariadb3 mariadb-client-10.4 mariadb-client-core-10.4 mariadb-server-10.4
  mariadb-server-core-10.4
0 upgraded, 5 newly installed, 2 to remove and 5 not upgraded.
4 not fully installed or removed.
Need to get 0 B/13.0 MB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: mysql-server-8.0: dependency problems, but removing anyway as you requeste
d:
 plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:
  Package mariadb-server is not configured yet.
  Package virtual-mysql-server is not installed.
  Package mysql-server-8.0 which provides virtual-mysql-server is to be removed.
  Package mysql-server-5.7 which provides virtual-mysql-server is not installed.
  Package mariadb-server-10.3 which provides virtual-mysql-server is not install
ed.
 plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:
  Package mariadb-server is not configured yet.
  Package virtual-mysql-server is not installed.
  Package mysql-server-8.0 which provides virtual-mysql-server is to be removed.
  Package mysql-server-5.7 which provides virtual-mysql-server is not installed.
  Package mariadb-server-10.3 which provides virtual-mysql-server is not install
ed.
 plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:
  Package mariadb-server is not configured yet.
  Package virtual-mysql-server is not installed.
  Package mysql-server-8.0 which provides virtual-mysql-server is to be removed.
  Package mysql-server-5.7 which provides virtual-mysql-server is not installed.
  Package mariadb-server-10.3 which provides virtual-mysql-server is not install
ed.
 plesk-mysql-server depends on mariadb-server | virtual-mysql-server; however:
  Package mariadb-server is not configured yet.
  Package virtual-mysql-server is not installed.
  Package mysql-server-8.0 which provides virtual-mysql-server is to be removed.
  Package mysql-server-5.7 which provides virtual-mysql-server is not installed.
  Package mariadb-server-10.3 which provides virtual-mysql-server is not install
ed.

dpkg: error processing package mysql-server-8.0 (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
dpkg: too many errors, stopping
Errors were encountered while processing:
 mysql-server-8.0
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

And we are back to square one. What can i do?
 
...i am running Plesk Obsidian 18.0.30.1 and yesterday afternoon i have performed a dist-upgrade to Ubuntu 20.04 through SSH
Database issues aside for a moment @masaro but how did you manage the dist-upgrade whilst using Plesk? On your own? Via Plesk support?

Any Ubuntu dist-upgrade from 16.04 / 18.04 to 20.04 whilst already using Plesk, is not suported by Plesk - yet. Hence the above question.

Have a good read of all of THIS Plesk Page including all of the comments. It's not a love story!

Then have a read of all of THIS Plesk Suggestion Page again, including all of the comments. This is not a love story either!
 
I have been notified through e-mail by a cron-job

Code:
/etc/cron.weekly/update-notifier-common:
New release '20.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

and at that moment i didn't realize it wasn't supported, so the upgrade was made through ssh.
 
@masaro Ahh I see. You have no forum signature to look at and it's not mentioned in your posts, but were you on 18.04 LTS prior to that dist-upgrade? It's only very recenty, that you could actually run do-release-upgrade and not do-release-upgrade -d in order to go from 18.04 LTS to 22.04.1 LTS due to several additional tests by Ubuntu. Maybe that's why it has only just appeared in your cron notifier? Still, If you took a full server snapshot prior to that dist-upgrade, you can recover back to that, everything will run as per your previous setup (prior to the dist-upgrade )and you can then have a think about what to do next?
 
Yes the previous version was 18.04.
Unless a snapshot hasn't been taken automatically (which i doubt), then i didn't make one before upgrading (i know it wasn't wise but i would have not imagined all these troubles).
Anyway i had managed to remove mariadb and leave mysql-server-8.0 only, that didn't want to start because went in frozen mode to avoid creating issues with the system). So i decided to try mariadb again and i am now stuck with the same problem that made me think of removing it

InnoDB: Invalid flags 0x4000 in ./ibdata1

Maybe is easier to fix this problem? I still have the /var/lib/mysql folder fine and with all dbs
 
@masaro To be fair, even when, you sort those specific database problems out (btw there are lots of 'fixes' online when the issue is the one that you've posted i.e. "InnoDB: Invalid flags 0x4000 in ./ibdata1") because, you now have a Plesk unsupported dist-upgrade Ubuntu 18.04 LTS > 20.04 LTS, there probably going to be other problems that you haven't had the chance to see - yet. Via THIS Plesk Suggestion Page (the link posted earlier) have a read of people's experience when they run a dist-upgrade themselves behind Plesk. The post by user Patrick Simms on 20/08/20 might be a good one to start with for you.

If you've checked now and you definitely don't have, a pre-upgrade server snapshot to fall back on, then there's probably, going to be plenty of work ahead, sadly. Having said that, if you're lucky, it might be, that the 20.04.1 release, is less toublesome working with Plesk Obsidian than the initial 20.04 release was.

If all else fails, then the best action now, would surely be to place a support ticket with Plesk? They can't perform miracles, but they can usually fix most things!
 
Last edited:
I would have loved to do it since yesterday already, but the license i have has been bought through a third party, and when i fill the form it tells me to ask them about issues (too bad they didn't answer after almost 24 hours)
 
I would have loved to do it since yesterday already, but the license i have has been bought through a third party, and when i fill the form it tells me to ask them about issues (too bad they didn't answer after almost 24 hours)
Many people are in your position too i.e a poor response by a hosting provider ;) But, there's an alternative: Read THIS page for a solution that wil help you.
Note, because it's an unsuported upgrade path (behind Plesk) that you have used to get to 20.04, you might be refered to THIS page instead, but start at the 1st one ^^ to check in advance
 
Last edited:
Note, because it's an unsuported OS behind Plesk now, you might be refered to THIS page instead, but start at the 1st one ^^ to check in advance
The OS as such is supported, just the upgrade path isn't.

/etc/apt/sources.list.d/ should be checked for repositories still pointing to 18.04 so plesk doesn't do anything stupid in the nightly cronjobs.
 
What do you mean exactly?

By the way i have managed to temporarily fix the issue bringing mysql-server-8.0 back online but i will create a dump of everything and try with mariadb again because it's supported by Plesk and i would like to avoid future troubles.

For those who are interested, i have looked for all mariadb packages

Code:
sudo dpkg -l | grep mariadb

got rid of each one of them with

Code:
sudo dpkg --force-all -P <packagename>

then reinstalled mysql-server-8.0

Code:
sudo apt-get --reinstall install mysql-server-8.0  // --reinstall for a fresh one

then removed /etc/mysql/FROZEN and fix a few configuration issues through /etc/mysql/my.cnf

Code:
[mysql]
default-character-set=utf8

[mysqld]
sql-mode=""
collation-server = utf8_unicode_ci
character-set-server = utf8
default-authentication-plugin=mysql_native_password

and finally

Code:
sudo service mysql start
 
The OS as such is supported, just the upgrade path isn't.
That's a correct statement. Almost ;)

Yes, Ubuntu 20.04 as a fresh install, has been fully supported by Plesk since Obsidian 18.0.29 and yes again, if you want to upgrade to 20.04 via a dist-upgrade from a previous Ubuntu release (as in the case of this thread) behind Plesk, then that upgrade path & all the challenges of it are not supported by Plesk.

However, as many others have found previously, if you've gone ahead with an unsupported dist-upgrade behind Plesk (as in the case of this thread) then there are quite a lot of other 'fixes' required to make it run properly and Plesk, can (and occasionally have) pointed out that their support is for OS fresh installs not dist-upgrades behind Plesk, so Professional Services NOT Support will be required. The explanation wasn't quite right in that previous post, so it's been edited / corrected.
 
@masaro Once you've tested everything re; MySQL 8 and it's all good/as you expected (because as per THIS post in another thread, MySQL 8 isn't yet supported by Plesk either...) and you've then tested everything else and/or had any fixes applied by either Plesk or Professional Services it would be great if you could say, change this thread to 'resolved' and,assuming you have enough time, post everything involved to achieve your success as a separate thread, detailing your 18.04 > 20.04 dist-upgrade behind Obsidian notes, because, there's people still keen to do the same, if, they are aware in advance, of any 'challenges' :D

Edit: You may have already read it, but THIS thread in the Ubuntu Server Forum might be of further assistance for you @masaro
 
Last edited:
Back
Top