How to perform dist-upgrade procedure on Linux server with Plesk?

Comments

16 comments

  • Avatar
    Ehud Ziegelman

    Hi Gabriel Aznarez,

     

    Please note, that I have run the update to Ubuntu 22.04 on linux, for a second time after I already had it, in order to fully update the server, and that fully broke the server mySql (even level 4/6 of restart mySql didn't work).

    I saw a Plesk KB article regarding such a problem on a Windows based server, however it occurs also on Linux based one. Possibly PHP version is related to the issue.

    I had to restore an AWS snapshot.

     

    # plesk -v
    Product version: Plesk Obsidian 18.0.51.1
         OS version: Ubuntu 22.04 x86_64
         Build date: 2023/04/04 10:00
         Revision: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


    # cat /etc/os-release
    PRETTY_NAME="Ubuntu 22.04.2 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04.2 LTS (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=jammy


    # mysql -V
    mysql  Ver 8.0.32-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu))

    # php -v
    PHP 8.2.4 (cli) (built: Mar 16 2023 14:34:48) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.2.4, Copyright (c) Zend Technologies
        with Zend OPcache v8.2.4, Copyright (c), by Zend Technologies

    # apache2 -v
    Server version: Apache/2.4.56 (Ubuntu)
    Server built:   2023-03-09T07:34:31

    # nginx -v
    nginx version: nginx/1.20.2

    # hostnamectl
    Static hostname: example.com
           Icon name: computer-vm
             Chassis: vm
        Machine ID: xxxxxxxxxxxxxxxxxxxxx
           Boot ID: xxxxxxxxxxxxxxxxxxxxx
      Virtualization: xen
    Operating System: Ubuntu 22.04.2 LTS
              Kernel: Linux 5.19.0-1022-aws
        Architecture: x86-64
     Hardware Vendor: Xen
      Hardware Model: HVM domU


    # uname -r
    5.19.0-1022-aws

    # uname -mrs
    Linux 5.19.0-1022-aws x86_64

    AWS
    8 GB RAM2 vCPUs160 GB SSD
    0
  • Avatar
    Ehud Ziegelman

    Hi  Gabriel Aznarez,

     

     

    I'm pretty sure, the adaptation of step regarding mySql appearing for Ubuntu 18.04 upgrade to version 20.04, are missing on the guidance for upgrade from version 20.04 to version 22.04, possibly leading to server failure.

    Can you please give your take?

     

     

    1. Update MariaDB to the next major version provided by the vendor:

      apt-get install mariadb-server-10.3

      In case MySQL installed, update it to the next major version provided by the vendor

      apt-get install mysql-server-5.7

      Warning: MariaDB/MySQL will not start until the next reboot is performed.

    2. In the mariadb config file /etc/mysql/mariadb.conf.d/50-server.cnf remove the string innodb_fast_shutdown=0 in the [mysqld] section, added at the beginning of this process. In case MySQL is installed, remove the string from /etc/mysql/my.cnf in the [mysqld] section.

    3. Install udev package:

      apt-get install udev

      Warning: The udev package installation may fail on Ubuntu systems which may be needed to be solved manually. If that is the case, the following should be checked and applied:

      1. At line 26 in the /lib/systemd/system/systemd-udevd.service file, the following string should be changed:
      2. From:

        ExecReload=udevadm control --reload --timeout 0
      3. To:

        ExecReload=/bin/udevadm control --reload --timeout 0
      4. And execute the following command:

        apt-get -f install

     

    0
  • Avatar
    Gabriel Aznarez

    Hi Ehud Ziegelman,

    Thank you for your comment.

    Note that the processes for each version may differ, I have just tried myself the Dist Upgrade from Ubuntu 20 to Ubuntu 22 using the steps from this article and had no issue with the process as currently is. The upgrade succeeded and Plesk as well as the sites continue to operate correctly.

    Mind that as mentioned on the article suggested actions, if a process is in doubt it is recommended to first try this on a testing environment before applying it to the production one.

    Feel free to share the results if you encounter any issues yourself.

    Sincerely.

    0
  • Avatar
    Artur J (Edited )

    Hello,

    In my case Dist-upgrade from Debian 10 to Debian 11 take +/- 2h. I go step by step with instruction from Plesk and everything goes well. After all steps, final reboot, I meet only one inconvenience - that firewall (Fail2Ban) ban my IP due to too many connection attempts to mail service made by my phone that was on the same network. On root level everything was fine, and to figure it out it take me like 30 min :) so ... maybe one advice before start upgrading is to whitelist your current IP. 

    Regards

    1
  • Avatar
    Fle Fle

    Could anyone help me with the following:
    - updated everything, removed Watchdog also via suggested command
    - after running : $ ./ubuntu18to20 --start

    Required pre-conversion condition checking if Plesk watchdog extension is not installed not met:
        The Plesk Watchdog extension is installed. Unfortunately the extension is unsupported on Ubuntu 20 and later.
        Please remove the extension be calling: plesk installer remove --components watchdog

     

    Any idea how to remove the "watchdog" entry? Is this the issue or maybe another issue?

    0
  • Avatar
    hifer

    When upgrading from Ubuntu 18.04 to 20.04, I had issues restarting mysql service as I had "NO_AUTO_CREATE_USER" parameter in /etc/mysql/my.cnf  file. Make sure you remove this as it's no longer supported in mysql 8.0.

    0
  • Avatar
    hifer

    Note when upgrading from Ubuntu 20.04 to 22.04 and if you are using MySQL, you may get an error restarting the mySQL DB with the following error message:

    [ERROR] [MY-010187] [Server] Could not open file '/var/log/mysql/error.log' for error logging: No such file or >

    You can workaround this by running the following:

    sudo mkdir /var/log/mysql (if the mysql folder doesn't exist)
    sudo touch /var/log/mysql/error.log
    sudo chown mysql:mysql /var/log/mysql/error.log
    sudo chcon system_u:object_r:mysqld_log_t:s0 /var/log/mysql/error.log

     

    0
  • Avatar
    Florian Cheno

    Hello,

    the   following line appaears in the manual update process:

    "aptitude install base-files linux-image-amd64 libc6 python3 mariadb-server-10.5"

    But Debian 12 provides MariaDB 10.11. Is this an error?

    1
  • Avatar
    Stephanie Kerchof (Edited )

    Hello, 

    I just went through the manual upgrade from Debian 11 to Debian 12. I would like to mention that there are steps missing related to mariadb. Mariadb 10.5 is not supported in Debian 12. It needs to be upgraded to an newer version. Here is what I did:

    After step 14 (giving warning related to mariadb 10.5), I edited panel.ini using plesk conf panel.ini command to add the following lines:

    [databaseManagement]
    features.canBeUpgraded = 1

    I wen to plesk web UI and ask for an automatic upgrade of the mariadb packages (Tools & Settings -> Database Servers). 

    Then I continued the procedure.

    0
  • Avatar
    Guido Bender (Edited )

    Be careful. Plesk encouraged us to upgrade to MariaDB 10.11 previous Debian 11. I was on Debian 10 doing this:
    https://support.plesk.com/hc/en-us/articles/12388091703703-How-to-upgrade-MySQL-5-5-to-5-6-5-7-or-MariaDB-5-5-to-10-x-on-Linux

    Now this dist-upgrade broke my installation because of step 13
    aptitude install mariadb-server-10.5
    I got a new folder /var/lib/mysql and my old database in /var/lib/mysql-10.11

    It took me a long time to get the dist-upgrade complete while repairing the database, but in the end this could do the upgrade on the tables again:
    https://support.plesk.com/hc/en-us/articles/12388091703703-How-to-upgrade-MySQL-5-5-to-5-6-5-7-or-MariaDB-5-5-to-10-x-on-Linux

    After upgrading by that instruction from 10.5 to 10.11 the tables were "in engine" again and fully working. 

    1
  • Avatar
    WNC Cloud

    When I get to step 14 on trying to upgrade from 22.04 to 24.04, I get the following:

     

    root@plesk1:/home/wnccloud# aptitude install base-files linux-generic libc6 python3 mariadb-server

    The following NEW packages will be installed:

      gcc-14-base{a} linux-image-6.8.0-49-generic{a} linux-modules-6.8.0-49-generic{a} linux-modules-extra-6.8.0-49-generic{a} 

      mariadb-plugin-provider-bzip2{a} mariadb-plugin-provider-lz4{a} mariadb-plugin-provider-lzma{a} mariadb-plugin-provider-lzo{a} 

      mariadb-plugin-provider-snappy{a} pv{a} python3-cssselect{a} ubuntu-kernel-accessories{a} 

    The following packages will be REMOVED:

      libnsl-dev{u} libpython3-stdlib{u} libtirpc-dev{u} linux-headers-generic{u} mariadb-server-10.6{a} python3-distutils{a} python3-lib2to3{u} 

      python3-minimal{u} 

    The following packages will be upgraded:

      base-files libc-bin libc-dev-bin libc6 libc6-dev libnewt0.52 libsnappy1v5 libstdc++6 linux-generic{b} linux-image-generic locales locales-all 

      mariadb-common mariadb-server{b} python3{b} python3-cffi-backend python3-lxml python3-markupsafe python3-netifaces python3-newt 

      python3-pyrsistent python3-systemd python3-yaml python3-zope.interface 

    The following packages are RECOMMENDED but will NOT be installed:

      libc-devtools libc-devtools:i386 manpages-dev 

    24 packages upgraded, 12 newly installed, 8 to remove and 792 not upgraded.

    Need to get 195 MB of archives. After unpacking 157 MB will be used.

    The following packages have unmet dependencies:

     python3-gi : Depends: python3 (< 3.11) but 3.12.3-0ubuntu2 is to be installed

     mariadb-server : Depends: mariadb-client (>= 1:10.11.8-0ubuntu0.24.04.1) but it is not going to be installed

                      Depends: mariadb-server-core (>= 1:10.11.8-0ubuntu0.24.04.1) but it is not going to be installed

                      Depends: libssl3t64 (>= 3.0.0) but it is not going to be installed

     python3 : PreDepends: python3-minimal (= 3.12.3-0ubuntu2) but it is not going to be installed

               Depends: python3.12 (>= 3.12.3-0~) but it is not installable

               Depends: libpython3-stdlib (= 3.12.3-0ubuntu2) but it is not going to be installed

     plesk-service-node-utilities : Depends: python3-distutils but it is not going to be installed

     linux-generic : Depends: linux-headers-generic (= 6.8.0-49.49) but it is not going to be installed

     python3-wheel : Depends: python3-distutils but it is not going to be installed

     python3-gdbm : Depends: python3 (< 3.12) but 3.12.3-0ubuntu2 is to be installed

     plesk-core-utilities : Depends: python3-distutils but it is not going to be installed

     python3-apt : Depends: python3 (< 3.11) but 3.12.3-0ubuntu2 is to be installed

     python3-dev : Depends: python3 (= 3.10.6-1~22.04.1) but 3.12.3-0ubuntu2 is to be installed

                   Depends: python3-distutils (>= 3.10.6-1~) but it is not going to be installed

     python3-pip : Depends: python3-distutils but it is not going to be installed

     python3-setuptools : Depends: python3-distutils but it is not going to be installed

     python3-dbus : Depends: python3 (< 3.11) but 3.12.3-0ubuntu2 is to be installed

     shim-signed : Depends: grub-efi-amd64-signed (>= 1.191~) but 1.187.6+2.06-2ubuntu14.4 is installed and it is kept back or

                            grub-efi-arm64-signed (>= 1.191~) which is a virtual package and is not provided by any available package

     or

                            base-files (< 12.3) but 13ubuntu10.1 is to be installed

    open: 8722; closed: 11519; defer: 81; conflict: 91                                                                                                   oNo solution found within the allotted time.  Try harder? [Y/n]

    1
  • Avatar
    UES

    When the Ubuntu 22 → 24 automated upgrade will be available?

    2
  • Avatar
    King555

    I had an error message after running the automated 18 to 20 upgrade and I want to tell you about it, maybe someone needs this information one day.

    After about 50 % of the process I got the message "Failed: upgrade GRUB from new repositories." and the upgrade stopped.

    I googled it and tried "dpkg --audit" to see "half-configured" packages. There could have been a package with "grub" in the name, but instead there was a package called "cloud-init" which was the error.

    When I tried to fix this package I always got "installed cloud-init package post-installation script subprocess returned error".

    So I just removed the package with "apt remove --purge cloud-init" and restarted the upgrade process with "./ubuntu18to20 --resume" and now it worked.

    If you need "cloud-init" you can reinstall it later (if it works then).

    0
  • Avatar
    eCom Seller

    Will an automated installer be coming out for Ubuntu 22 to 24 migrations?

    0
  • Avatar
    filmotheklown

    WNC Cloud Did you find a solution to this? I'm getting the exact same error.

    0
  • Avatar
    Sec Hosting

    Hi Gabriel Aznarez ,

    thanks for that How To Guide. We did tests (Ubuntu 22.04 > 24.04) about a month ago in our LAB. Today we performed upgrades in our prod environment based on Plesk Obsidian 18.0.67 Update 2 also from Ubuntu 22.04 > 24.04.

    Everything worked like great and without any issues. Except one thing: during tests in our LAB we noticed that it's better to remove Grafana Extension and Monitoring Add-On. Because with both installed Step 20 failed on two LAB tests:

    plesk bin extension -l | egrep '(panel-migrator|site-import|docker|grafana)'| awk {'print $1'} | xargs -i plesk bin extension -i {}

    [2025-01-06 07:38:20.920] 43652:677b87840c931 ERR [extension/grafana] The execution of post-install.php has failed with the following message:

    [2025-01-06 07:38:20.904] 43818:677b881dcac43 ERR [extension/grafana] Grafana service failed to start

    The execution of post-install.php has failed with the following message:

    [2025-01-06 07:38:20.904] 43818:677b881dcac43 ERR [extension/grafana] Grafana service failed to start

    exit status 1

    In our prod environment we removed both (Grafana and Monitoring extension) on all machines before we started with the steps above and with that, we didn't run into any issues on Step 20. So not any issue for us at the moment - but wanted to let you know that this happened twice in our LAB to us and what was our “workaround”. And sorry I do not have any more logs for you because this LAB environment is already destroyed. 

    However all machines are on Ubuntu 24.04 :)

    Cheers
    Norman

    0

Please sign in to leave a comment.

Have more questions? Submit a request