Ad Widget

Collapse

Zabbix upgrade procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sweedcorn
    Junior Member
    • Jul 2021
    • 13

    #1

    Zabbix upgrade procedure

    Hi, i want to ask for some help regarding the upgrade of zabbix.

    Currently, i have two instances of zabbix with external DB servers for each server.

    Today I installed the second instance and in the version of zabbix i see 5.4.2 which is strange because when i do apt update on my first instance i can't see any new updates but the version is 5.4.1.

    Can you explain how this happened? I installed both instances the same way using the same repo (i checked it)






    zabbix_server --version
    zabbix_server (Zabbix) 5.4.1
    Revision ecb5b3378c 7 June 2021, compilation time: May 28 2021 10:41:12

    zabbix_server --version
    zabbix_server (Zabbix) 5.4.2
    Revision 4c8f9aabe1 28 June 2021, compilation time: Jun 11 2021 14:01:39

    Thanks for all comments !!!


  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Hi, did you also do "apt upgrade" after "apt update"?

    Markku

    Comment


    • sweedcorn
      sweedcorn commented
      Editing a comment
      yes ofc sorry for not mentioning it
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #3
    Can you show us the output of "sudo apt update; apt list --upgradable; apt list zabbix\*" command on both servers?

    Markku

    Comment

    • sweedcorn
      Junior Member
      • Jul 2021
      • 13

      #4
      Here it is, i even tried again install using:

      wget https://repo.zabbix.com/zabbix/5.4/u...u20.04_all.deb
      sudo dpkg -i zabbix-release_5.4-1+ubuntu20.04_all.deb
      sudo apt update
      sudo apt install zabbix-server-pgsql zabbix-frontend-php php7.4-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent


      Zabbix server with 5.4.1

      altepro@zabbix-cust:~$ sudo apt update; apt list --upgradable; apt list zabbix\*
      Hit:1 http://cz.archive.ubuntu.com/ubuntu focal InRelease
      Get:2 http://cz.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
      Get:3 http://cz.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
      Get:4 http://cz.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
      Fetched 328 kB in 1s (314 kB/s)
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      All packages are up to date.
      Listing... Done
      Listing... Done
      zabbix-agent/now 1:5.4.1-1+ubuntu20.04 amd64 [installed,local]
      zabbix-apache-conf/now 1:5.4.1-1+ubuntu20.04 all [installed,local]
      zabbix-frontend-php/now 1:5.4.1-1+ubuntu20.04 all [installed,local]
      zabbix-java-gateway/focal 1:4.0.17+dfsg-1 all
      zabbix-proxy-mysql/focal 1:4.0.17+dfsg-1 amd64
      zabbix-proxy-pgsql/focal 1:4.0.17+dfsg-1 amd64
      zabbix-proxy-sqlite3/focal 1:4.0.17+dfsg-1 amd64
      zabbix-release/now 1:5.4-1+ubuntu20.04 all [installed,local]
      zabbix-server-mysql/focal 1:4.0.17+dfsg-1 amd64
      zabbix-server-pgsql/now 1:5.4.1-1+ubuntu20.04 amd64 [installed,local]
      zabbix-sql-scripts/now 1:5.4.1-1+ubuntu20.04 all [installed,local]



      zabbix server with 5.4.2

      altepro@zabbix-int:~$ sudo apt update; apt list --upgradable; apt list zabbix\*
      Hit:1 http://cz.archive.ubuntu.com/ubuntu focal InRelease
      Hit:2 http://cz.archive.ubuntu.com/ubuntu focal-updates InRelease
      Hit:3 http://cz.archive.ubuntu.com/ubuntu focal-backports InRelease
      Hit:4 http://cz.archive.ubuntu.com/ubuntu focal-security InRelease
      Hit:5 https://repo.zabbix.com/zabbix/5.4/ubuntu focal InRelease
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      All packages are up to date.
      Listing... Done
      Listing... Done
      zabbix-agent2/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-agent/unknown,now 1:5.4.2-1+ubuntu20.04 amd64 [installed]
      zabbix-apache-conf/unknown,now 1:5.4.2-1+ubuntu20.04 all [installed]
      zabbix-frontend-php/unknown,now 1:5.4.2-1+ubuntu20.04 all [installed]
      zabbix-get/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-java-gateway/unknown 1:5.4.2-1+ubuntu20.04 all
      zabbix-js/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-nginx-conf/unknown 1:5.4.2-1+ubuntu20.04 all
      zabbix-proxy-mysql/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-proxy-pgsql/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-proxy-sqlite3/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-release/unknown,now 1:5.4-1+ubuntu20.04 all [installed]
      zabbix-sender/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-server-mysql/unknown 1:5.4.2-1+ubuntu20.04 amd64
      zabbix-server-pgsql/unknown,now 1:5.4.2-1+ubuntu20.04 amd64 [installed]
      zabbix-sql-scripts/unknown,now 1:5.4.2-1+ubuntu20.04 all [installed]
      zabbix-web-service/unknown 1:5.4.2-1+ubuntu20.04 amd64


      i seen strange /unknown lines so maybe that's the problem ?
      And I see there is no zabbix repo for the first server ...

      Thanks for the help
      Last edited by sweedcorn; 19-07-2021, 13:54.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #5
        Yeah, there is no Zabbix's own repo there in the first server, so you need to download and install the zabbix-release dpkg file, then apt update and install the desired components.

        Markku

        Comment


        • sweedcorn
          sweedcorn commented
          Editing a comment
          Yea well i did that ... still no luck it seems that I cannot add the repo using the official writeup, it is not working

          So can I just manually add the repo deb https://repo.zabbix.com/zabbix/5.4/ubuntu focal main to the sources list ?

          and what about the source deb - deb-src https://repo.zabbix.com/zabbix/5.4/ubuntu focal main ? do i need that too ?

          Thanks

          altepro@zabbix-cust:~$ wget https://repo.zabbix.com/zabbix/5.4/u...u20.04_all.deb
          --2021-07-19 14:18:19-- https://repo.zabbix.com/zabbix/5.4/u...u20.04_all.deb
          Resolving repo.zabbix.com (repo.zabbix.com)... 178.128.6.101, 2604:a880:2:d0::2062:d001
          Connecting to repo.zabbix.com (repo.zabbix.com)|178.128.6.101|:443... connected.
          HTTP request sent, awaiting response... 200 OK
          Length: 3468 (3.4K) [application/octet-stream]
          Saving to: ‘zabbix-release_5.4-1+ubuntu20.04_all.deb’

          zabbix-release_5.4-1+ubuntu20.04_all. 100%[================================================== ======================>] 3.39K --.-KB/s in 0s

          2021-07-19 14:18:20 (432 MB/s) - ‘zabbix-release_5.4-1+ubuntu20.04_all.deb’ saved [3468/3468]

          altepro@zabbix-cust:~$ sudo dpkg -i zabbix-release_5.4-1+ubuntu20.04_all.deb
          (Reading database ... 111784 files and directories currently installed.)
          Preparing to unpack zabbix-release_5.4-1+ubuntu20.04_all.deb ...
          Unpacking zabbix-release (1:5.4-1+ubuntu20.04) over (1:5.4-1+ubuntu20.04) ...
          Setting up zabbix-release (1:5.4-1+ubuntu20.04) ...
          altepro@zabbix-cust:~$ sudo apt update
          Hit:1 http://cz.archive.ubuntu.com/ubuntu focal InRelease
          Get:2 http://cz.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
          Get:3 http://cz.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
          Get:4 http://cz.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
          Fetched 328 kB in 1s (400 kB/s)
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          All packages are up to date.

          altepro@zabbix-cust:~$ sudo apt install zabbix-server-pgsql zabbix-frontend-php php7.4-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          php7.4-pgsql is already the newest version (7.4.3-4ubuntu2.5).
          zabbix-agent is already the newest version (1:5.4.1-1+ubuntu20.04).
          zabbix-apache-conf is already the newest version (1:5.4.1-1+ubuntu20.04).
          zabbix-frontend-php is already the newest version (1:5.4.1-1+ubuntu20.04).
          zabbix-server-pgsql is already the newest version (1:5.4.1-1+ubuntu20.04).
          zabbix-sql-scripts is already the newest version (1:5.4.1-1+ubuntu20.04).
          0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #6
        What you are showing here is that you install the zabbix-release package correctly, run apt update, but the system is still not actually using the repo correctly. What kind of manual apt sources configurations (or similar) there has been made on that server? I mean, it looks really strange and looks like a result of some manual misconfiguration somewhere.

        Markku

        Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #7
        Based on searching for "apt installed,local" it looks like you have installed the zabbix packages from .deb files and not from the repo.

        https://unix.stackexchange.com/quest...itory-in-etc-a

        Markku

        Comment


        • sweedcorn
          sweedcorn commented
          Editing a comment
          seems you are right

          altepro@zabbix-cust:~$ apt list --installed | grep installed,local

          WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

          zabbix-agent/now 1:5.4.1-1+ubuntu20.04 amd64 [installed,local]
          zabbix-apache-conf/now 1:5.4.1-1+ubuntu20.04 all [installed,local]
          zabbix-frontend-php/now 1:5.4.1-1+ubuntu20.04 all [installed,local]
          zabbix-release/now 1:5.4-1+ubuntu20.04 all [installed,local]
          zabbix-server-pgsql/now 1:5.4.1-1+ubuntu20.04 amd64 [installed,local]
          zabbix-sql-scripts/now 1:5.4.1-1+ubuntu20.04 all [installed,local]


          altepro@zabbix-int:~$ apt list --installed | grep installed,local

          WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

          zabbix-agent/now 1:5.4.2-1+ubuntu20.04 amd64 [installed,local]
          zabbix-apache-conf/now 1:5.4.2-1+ubuntu20.04 all [installed,local]
          zabbix-frontend-php/now 1:5.4.2-1+ubuntu20.04 all [installed,local]
          zabbix-release/now 1:5.4-1+ubuntu20.04 all [installed,local]
          zabbix-server-pgsql/now 1:5.4.2-1+ubuntu20.04 amd64 [installed,local]
          zabbix-sql-scripts/now 1:5.4.2-1+ubuntu20.04 all [installed,local]



          so what to do now ? how can I force the server to download it from zabbix repo ?

          Thanks

        • sweedcorn
          sweedcorn commented
          Editing a comment
          I manually added the repo and now it seems it works, I upgraded successfully:

          altepro@zabbix-cust:~$ cat /etc/apt/sources.list.d/zabbix.list
          deb https://repo.zabbix.com/zabbix/5.4/ubuntu focal main
          deb-src https://repo.zabbix.com/zabbix/5.4/ubuntu focal main

          altepro@zabbix-cust:~$ zabbix_server --version
          zabbix_server (Zabbix) 5.4.2
          Revision 4c8f9aabe1 28 June 2021, compilation time: Jun 11 2021 14:01:39

          altepro@zabbix-cust:~$ apt list --installed | grep installed,local
          WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
          altepro@zabbix-cust:~$


          Thanks for the help Markku, appreciate it
      Working...