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

Follow

Comments

8 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

    0
    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?

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request