Ad Widget

Collapse

Update to Ubuntu 21.04 Hirsute fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • c1support
    Member
    • Apr 2020
    • 47

    #1

    Update to Ubuntu 21.04 Hirsute fails

    Dear friends

    [Edit 2021-03-03: moved from https://www.zabbix.com/forum/zabbix-...-hirsute-fails]

    Recently, I tried to update from a Zabbix appliance (Ubuntu 16.04 LTS / Zabbix 4.4) to Ubuntu 21.04 / Zabbix 5.0.
    Due to security zones, I have to do this using a self hosted apt-mirror (maybe this is part of the reason).

    I did this in several steps, updating from 16.04 to 18.04, then from 18.04 to 20.04, then from 20.04 to 21.04:
    Code:
    [user]@[hostname]:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Hirsute Hippo (development branch) Release: 21.04 Codename: hirsute
    In my /etc/apt/sources.list, I have not yet uncommented the zabbix repo:
    Code:
    [user]@[hostname]:~$ sudo apt update Err:1 http://repo.zabbix.com/zabbix/4.4/ubuntu focal InRelease Temporary failure resolving 'repo.zabbix.com' Hit:2 http://[apt-mirror]/ubuntu hirsute InRelease Hit:3 http://[apt-mirror]/ubuntu hirsute-updates InRelease Hit:4 http://[apt-mirror]/ubuntu hirsute-security InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 32 packages can be upgraded. Run 'apt list --upgradable' to see them. W: Failed to fetch http://repo.zabbix.com/zabbix/4.4/ubuntu/dists/focal/InRelease Temporary failure resolving 'repo.zabbix.com' W: Some index files failed to download. They have been ignored, or old ones used instead.
    Currently, Zabbix (v4.4) is still up and running on the machine, but apt upgrade results in an error:
    Code:
    [user]@[hostname]:~$ sudo apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: bsdmainutils fdisk gcc-8-base libapparmor-perl libasprintf0v5 libblas-common libdbus-glib-1-2 libdns-export1100 libdns-export1109 libffi7 libgdbm3 libhogweed5 libicu55 libicu60 libicu66 libip4tc0 libip6tc0 libiptc0 libisc-export169 libjson-c3 libjson-c4 liblinear3 liblua5.1-0 liblvm2app2.2 liblvm2cmd2.02 liblzo2-2 libnettle7 libonig2 libonig4 libplymouth4 libprocps6 libpython3.6-minimal libpython3.6-stdlib libpython3.8-minimal libpython3.8-stdlib libreadline5 libvpx3 linux-headers-4.15.0-136 linux-headers-4.15.0-136-generic linux-headers-4.4.0-203 linux-headers-4.4.0-203-generic linux-image-4.15.0-136-generic linux-image-4.4.0-203-generic linux-modules-4.15.0-136-generic linux-modules-4.4.0-203-generic linux-modules-extra-4.15.0-136-generic linux-modules-extra-4.4.0-203-generic ncal nplan php7.0-mysql php7.2-mysql python3.6 python3.6-minimal python3.8 python3.8-minimal ttf-ubuntu-font-family usb.ids Use 'sudo apt autoremove' to remove them. The following packages have been kept back: apache2 apache2-bin apache2-data apache2-utils dash dh-python dpkg gcc-10-base libapache2-mod-php libapparmor-perl liblocale-gettext-perl libsmbclient libsnmp-base libsnmp-perl libtext-charwidth-perl libtext-iconv-perl libwbclient0 mysql-server perl perl-base php-common samba-common samba-libs smbclient snmp snmpd snmptrapd ubuntu-minimal zabbix-frontend-php zabbix-proxy-mysql zabbix-server-mysql The following packages will be upgraded: zabbix-agent 1 upgraded, 0 newly installed, 0 to remove and 31 not upgraded. Need to get 0 B/255 kB of archives. After this operation, 178 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 175474 files and directories currently installed.) Preparing to unpack .../zabbix-agent_1%3a5.0.7+dfsg-1build1_amd64.deb ... Unpacking zabbix-agent (1:5.0.7+dfsg-1build1) over (1:4.4.8-1+xenial) ... dpkg: error processing archive /var/cache/apt/archives/zabbix-agent_1%3a5.0.7+dfsg-1build1_amd64.deb (--unpack): trying to overwrite '/usr/bin/zabbix_sender', which is also in package zabbix-sender 1:4.4.8-1+xenial dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) /usr/lib/tmpfiles.d/zabbix-agent.conf:1: Line references path below legacy directory /var/run/, updating /var/run/zabbix → /run/zabbix; please update the tmpfiles.d/ drop-in file accordingly. Errors were encountered while processing: /var/cache/apt/archives/zabbix-agent_1%3a5.0.7+dfsg-1build1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
    I am not a Linux pro, so as implied above I suspect there might be missing some packages on my apt-mirror.

    => What kind of information can I provide to get further?

    Thanks a lot in advance!
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Ubuntu 21.04 is still in beta so I wouldn't be trying to upgrade anything production to it yet.

    It's difficult to read the part in the code blocks, it appears that newlines didn't get processed correctly, but the part that I would be concerned about is the part that says:

    Code:
    The following packages have been kept back: apache2 apache2-bin apache2-data apache2-utils dash dh-python dpkg gcc-10-base libapache2-mod-php libapparmor-perl liblocale-gettext-perl libsmbclient libsnmp-base libsnmp-perl libtext-charwidth-perl libtext-iconv-perl libwbclient0 mysql-server perl perl-base php-common samba-common samba-libs smbclient snmp snmpd snmptrapd ubuntu-minimal zabbix-frontend-php zabbix-proxy-mysql zabbix-server-mysql
    
    The following packages will be upgraded: zabbix-agent
    1 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
    Several Zabbix packages are being "kept back", meaning not upgraded, but one of them is being upgraded. That's likely a problem.

    Is this machine a Zabbix server? It's implying that both the 'zabbix-proxy-mysql' and 'zabbix-server-mysql' packages are installed, but typically on a server you wouldn't have the 'zabbix-proxy-mysql' installed. If it were a proxy, I wouldn't expect the 'zabbix-frontend-php' to be there.

    When it tries to update just zabbix-agent, it also encounters a couple of problems:

    Code:
    Unpacking zabbix-agent (1:5.0.7+dfsg-1build1) over (1:4.4.8-1+xenial) ... dpkg: error processing archive /var/cache/apt/archives/zabbix-agent_1%3a5.0.7+dfsg-1build1_amd64.deb (--unpack): trying to overwrite '/usr/bin/zabbix_sender', which is also in package zabbix-sender 1:4.4.8-1+xenial dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    /usr/lib/tmpfiles.d/zabbix-agent.conf:1: Line references path below legacy directory /var/run/, updating /var/run/zabbix → /run/zabbix; please update the tmpfiles.d/ drop-in file accordingly.
    The first line seems to be saying something I wasn't expecting: it can't upgrade zabbix-agent because the 5.0.7 version of the package contains /usr/bin/zabbix_sender (that's the part I wasn't expecting), but that path is in a different package (zabbix-sender) in the 4.4.8 package you have installed.

    If you wanted to try again, I would this:
    1. uninstall your current zabbix-sender-4.4.8 package. It may be causing problems during your upgrade and that's one that you can just install the 5.0.7 from scratch after you have the other components upgraded.
    2. using a text editor, modify /usr/lib/tmpfiles.d/zabbix-agent.conf. The file likely only has one line in it, and one of the fields says "/var/run/zabbix". That field should be changed to say just "/run/zabbix" (without the quotes. It appears that Ubuntu 21.04 has become more picky about how you reference systemd's "run" directory, and it now wants packages to use systemd's preferred path of "/run", rather than the backward-compatible "/var/run". Making this change before re-attempting the upgrade should get rid of the 2nd line about "Line references path below legacy directory" from dpkg. Note that even if the upgrade fails again, it's safe to keep this change in place. /run is the same place as /var/run, so it won't do any harm even if you have to say with zabbix-agent 4.4.8 for a while.
    3. re-attempt the upgrade. I suspect there will be other problems, because of all the server-related packages that are being "kept back".
    Once you have a successful upgrade of both zabbix-agent and zabbix-server, you can then re-install 'zabbix-sender'. You may not even need it; it depends on what items you have, but it doesn't need to be present during the upgrade process itself. It would only need to be present before you start up zabbix-server and zabbix-agent.

    I think you have bigger problems because of the server-related stuff that's not eligible to be upgraded, but the steps I've outlined may get you farther with the agent.

    Comment

    Working...