Ad Widget

Collapse

Zabbix: failed to fetch repo.zabbix.com

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baweryasin
    Junior Member
    • Apr 2024
    • 7

    #1

    Zabbix: failed to fetch repo.zabbix.com

    Hello everyone, since i want to build a new zabbix server on our Ubuntu 22.04 x64 VM, I have the problem that when I want to upgrade the repositories I get following error.
    Click image for larger version  Name:	image.png Views:	3 Size:	240.3 KB ID:	482840
    When i want to install:
    Apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent i get following error. I can install all packages except zabbix-apache-conf and zabbix-sql-scripts.
    Does anyone of you had similiar problems?

    Click image for larger version  Name:	image.png Views:	2 Size:	72.6 KB ID:	482841
    Last edited by baweryasin; 22-04-2024, 15:00.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1784

    #2
    Yes, I bumped into this one as well. Let's see the server certificate:

    $ openssl s_client -connect repo.zabbix.com:443
    CONNECTED(00000003)
    depth=2 C = US, ST = Texas, L = Houston, O = SSL Corporation, CN = SSL.com Root Certification Authority RSA
    verify return:1
    depth=1 C = US, ST = Texas, L = Houston, O = SSL Corporation, CN = SSL.com RSA SSL subCA
    verify return:1
    depth=0 C = LV, L = Riga, O = Zabbix SIA, CN = *.zabbix.com
    verify return:1
    ---
    Certificate chain
    0 s:C = LV, L = Riga, O = Zabbix SIA, CN = *.zabbix.com
    i:C = US, ST = Texas, L = Houston, O = SSL Corporation, CN = SSL.com RSA SSL subCA
    a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256
    v:NotBefore: Apr 11 06:57:50 2024 GMT; NotAfter: May 12 06:57:50 2025 GMT
    1 s:C = US, ST = Texas, L = Houston, O = SSL Corporation, CN = SSL.com RSA SSL subCA
    i:C = US, ST = Texas, L = Houston, O = SSL Corporation, CN = SSL.com Root Certification Authority RSA
    a:PKEY: rsaEncryption, 4096 (bit); sigalg: RSA-SHA256
    v:NotBefore: Feb 12 18:48:52 2016 GMT; NotAfter: Feb 12 18:48:52 2031 GMT
    2 s:C = US, ST = Texas, L = Houston, O = SSL Corporation, CN = SSL.com Root Certification Authority RSA
    i:C = US, ST = Texas, L = Houston, O = SSL Corporation, CN = SSL.com Root Certification Authority RSA
    a:PKEY: rsaEncryption, 4096 (bit); sigalg: RSA-SHA256
    v:NotBefore: Feb 12 17:39:39 2016 GMT; NotAfter: Feb 12 17:39:39 2041 GMT


    So the server certificate was updated just recently, that's why this problem wasn't visible earlier.

    Then the CA: SSL.com Root Certification Authority RSA

    On the problem host there was:

    $ grep "SSL.com.*RSA" /etc/ca-certificates.conf
    !mozilla/SSL.com_EV_Root_Certification_Authority_RSA_R2.crt
    !mozilla/SSL.com_Root_Certification_Authority_RSA.crt
    $

    Note the exclamation marks: it means that the root CA for the Zabbix repo certificate was not enabled.

    I removed the exclamation marks and ran "sudo update-ca-certificates", and then Zabbix repo worked fine.

    I don't know why this CA was disabled on that host. This was on Debian 11 Bullseye, but my other Bullseyes (as well as Debian 12 Bookworm hosts) did have the CA enabled by default. I presume this has something to do with the fact that the problem host is very old (I mean like 10 years, a physical host) and has been upgraded gradually from Debian version to version.

    Markku

    Comment

    • baweryasin
      Junior Member
      • Apr 2024
      • 7

      #3
      When i run that one, these two certificatesdo not start with an exclamation mark..But thank you for your efforts...

      testserverubuntu@zabbix-ubuntu-test:/etc$ grep "SSL.com.*RSA" /etc/ca-certificates.conf
      mozilla/SSL.com_EV_Root_Certification_Authority_RSA_R2.crt
      mozilla/SSL.com_Root_Certification_Authority_RSA.crt

      Comment

      • baweryasin
        Junior Member
        • Apr 2024
        • 7

        #4
        Update:
        After installing the repository via https://repo.zabbix.com/zabbix/6.0/u...u22.04_all.deb the two packages zabbix-apache-conf and zabbix-sql-scripts are not installed.

        Click image for larger version

Name:	image.png
Views:	2926
Size:	9.1 KB
ID:	483008

        Comment

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

          #5
          Those "5.0.17-dfsg" packages are from Ubuntu's own repo, don't use them.

          My recommendation:

          sudo apt purge zabbix\*
          sudo dpkg -i zabbix-release_6.0-4+ubuntu22.04_all.deb
          sudo apt update
          sudo apt install zabbix-server-mysql ...


          But, since your problem is that "apt update" does not work, you need to resolve that first.

          First, run "sudo update-ca-certificates" and try "sudo apt update" again.

          If it still doesn't work, can you show the output of this command:

          openssl s_client -connect repo.zabbix.com:443

          (use Ctrl-C to get out of it when/if it stays waiting after the output)

          Markku

          Comment

          • baweryasin
            Junior Member
            • Apr 2024
            • 7

            #6
            I solved the issue:
            I had to download every package seperately...so I did not download the file which contains all important packages, i decided to download the zabbix-agent, zabbix-server-mysql ..... seperately, and it worked!!!!!


            sudo wget https://repo.zabbix.com/zabbix/6.0/u...ividualpackage

            here you can find the individual packages: Zabbix Official Repository

            Comment

            Working...