Ad Widget

Collapse

Upgrading from Zabbix 6.2.9 to 6.4.8 - Database mismatch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kevin10
    Junior Member
    • Nov 2023
    • 1

    #1

    Upgrading from Zabbix 6.2.9 to 6.4.8 - Database mismatch

    Hi All,

    I am trying to upgrade from Zabbix 6.2.9 to 6.4.8, the upgrade of Zabbix is successfully however it is not starting due to a database mismatch.

    Current database is 8.0.26 running on Centos 8 Stream.

    When I try to load with AllowUnsupportedDbVersions, Zabbix works and loads successfully however when it is disabled the below errors occurs (from logs). I also made sure that the necessary user has enough privileges whilst also log_bin_trust_function_creators = 1 is set.


    35080:20231120:103735.698 Zabbix Server stopped. Zabbix 6.4.8 (revision ecda9311a92).
    35085:20231120:103747.927 Starting Zabbix Server. Zabbix 6.4.8 (revision ecda9311a92).
    35085:20231120:103747.927 ****** Enabled features ******
    35085:20231120:103747.927 SNMP monitoring: YES
    35085:20231120:103747.927 IPMI monitoring: YES
    35085:20231120:103747.927 Web monitoring: YES
    35085:20231120:103747.928 VMware monitoring: YES
    35085:20231120:103747.928 SMTP authentication: YES
    35085:20231120:103747.928 ODBC: YES
    35085:20231120:103747.928 SSH support: YES
    35085:20231120:103747.928 IPv6 support: YES
    35085:20231120:103747.928 TLS support: YES
    35085:20231120:103747.928 ******************************
    35085:20231120:103747.928 using configuration file: /etc/zabbix/zabbix_server.conf
    35085:20231120:103747.942
    35085:20231120:103747.942 Unable to start Zabbix server due to unsupported MySQL database version (8.00.26).
    35085:20231120:103747.942 Must be at least (8.00.30).
    35085:20231120:103747.942 Use of supported database version is highly recommended.
    35085:20231120:103747.942 Override by setting AllowUnsupportedDBVersions=1 in Zabbix server configuration file at your own risk.
    35085:20231120:103747.942
    35085:20231120:103747.950 Zabbix Server stopped. Zabbix 6.4.8 (revision ecda9311a92).

    __________________________________________________ __________________________________________________ ___________________

    -- Unit zabbix-server.service has begun starting up.
    Nov 20 10:43:09 systemd[1]: zabbix-server.service: Can't open PID file /run/zabbix/zabbix_server.pid (yet?) after start: No such file or directory
    Nov 20 10:43:09 systemd[1]: zabbix-server.service: Failed with result 'protocol'.
    -- Subject: Unit failed
    -- Defined-By: systemd
    -- Support: https://access.redhat.com/support
    --
    -- The unit zabbix-server.service has entered the 'failed' state with result 'protocol'.
    Nov 20 10:43:09 systemd[1]: Failed to start Zabbix Server.
    -- Subject: Unit zabbix-server.service has failed
    -- Defined-By: systemd
    -- Support: https://access.redhat.com/support
    --
    -- Unit zabbix-server.service has failed.
    --
    -- The result is failed.



  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Well it is the very clear error.. running too low version...

    https://www.zabbix.com/documentation...n/requirements
    MySQL/Percona One of 8.0.30-8.1.X
    Either upgrade to required version or run it with "AllowUnsupportedDBVersions" ... Nothing else to do here... ​

    Comment


    • kevin10
      kevin10 commented
      Editing a comment
      I am aware that I am running an old DB version, however this is suppose to upgrade automatically when running the latest zabbix. It seems that it is not upgrading it automatically. Is there a way to upgrade the DB manually or the best steps to follow ?
  • MRedbourne
    Senior Member
    • Feb 2023
    • 103

    #3
    Zabbix doesn't control the MySQL version, your package manager does.

    Edit: Zabbix doesn't control the DB versions because a lot of people re-use DBs for other applications. If Zabbix were to force the upgrade, it may break other applications using the same DB host. Hence why Zabbix is responsible for Zabbix, and you're responsible for everything else.

    For CentOS 8 Stream use one of these commands:
    Update All Packages: dnf -y update
    Update MySQL Server specifically: dnf -y update mysql-server

    If you're not logged in as root, execute one of the above commands with sudo [command].

    Edit: I should say, if the bottom command doesn't work to upgrade MySQL specifically, you can find the installed package named by executing: rpm -qa | grep -i "mysql" | grep -vi "zabbix"

    Include the double quotes. It may return a few instances as grep is essentially running a "string contains input" here.
    Last edited by MRedbourne; 22-11-2023, 05:15.

    Comment


    • kevin10
      kevin10 commented
      Editing a comment
      Tried the above, packages updated however the mysql is still saying that there is no dependencies resolved therefore not updating to latest, although giving the latest package (tried even manually as below)

      dnf upgrade mysql80-community-release-el8-9.noarch
      Last metadata expiration check: 0:03:30 ago on Wed 22 Nov 2023 08:46:48 AM CET.
      Dependencies resolved.
      Nothing to do.
      Complete!

      mysql Ver 8.0.26 for Linux on x86_64 (Source distribution) (still running old version)

      sudo yum list installed | grep "^mysql"
      mysql.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql-common.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql-errmsg.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql-server.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql80-community-release.noarch el8-9 @mysql80-community
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #4
    Besides that, your DB can be in completetly different host.. How would you think this upgrade would work ..
    As said... first install prerequisities then run upgrade...

    Comment


    • kevin10
      kevin10 commented
      Editing a comment
      DB and server are on the same host, it is a basic setup. Dependencies also upgraded however it seems that mysql is not liking the latest version, however no errors.

      Tried installing manually but still not upgrading. (not sure if I am following the rights steps, I am still new to this things)

      nf upgrade mysql80-community-release-el8-9.noarch
      Last metadata expiration check: 0:03:30 ago on Wed 22 Nov 2023 08:46:48 AM CET.
      Dependencies resolved.
      Nothing to do.
      Complete!

      mysql Ver 8.0.26 for Linux on x86_64 (Source distribution) (still running old version)

      sudo yum list installed | grep "^mysql"
      mysql.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql-common.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql-errmsg.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql-server.x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream
      mysql80-community-release.noarch el8-9 @mysql80-community
  • MRedbourne
    Senior Member
    • Feb 2023
    • 103

    #5
    Cyber was just making my point a little more concise re: database management. I didn't go into that much detail as it wasn't really relevant to this request or associated information. We (my org) operate the DB on a managed MySQL cluster over the local DB for reliability purposes.

    The source of your issue is the MySQL Server not being fully upgraded (@appstream). The AppStream for CentOS 8 does not contains a later version of mysql-server. You'll need to pull it from the community instead (latest being: 8.0.35).

    Index of /232905/yum/mysql-8.0-community/el/8/x86_64 and MySQL :: Download MySQL Community Server (Archived Versions)

    If you have a dev server, try modifying your yum repo for "Appstream" to include this line:

    exclude=mysql*

    and try running the update command again.​​

    Comment


    • kevin10
      kevin10 commented
      Editing a comment
      I think yes you are right. There is something with the CentOS 8 AppStream.

      However I tried to add the exclude mysql in the AppStream Repos as per below. However still the same.

      [appstream]
      name=CentOS Stream $releasever - AppStream
      mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&inf ra=$infra
      #baseurl=http://mirror.centos.org/$contentdir/$stream/AppStream/$basearch/os/
      gpgcheck=1
      enabled=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
      exclude=mysql*


      Would be kind and let me know how to do it step by step maybe I am missing something. As I told you I started linux a couple of weeks ago
Working...