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

Follow

Comments

11 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • 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
    Comment actions Permalink
  • Avatar
    Lexy19 Re

    This post was a great read. Very informative and interesting. URL

    -1
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request