[ZBX-19400] MariaDB version detector doesn't work properly Created: 2021 May 18  Updated: 2024 Apr 10  Resolved: 2021 Jun 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 5.4.0
Fix Version/s: 5.4.1rc1, 6.0.0alpha1, 6.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Sergey Kolesnik Assignee: Artjoms Rimdjonoks
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic


Attachments: PNG File image-2021-06-09-15-37-02-394.png    
Issue Links:
Causes
caused by ZBXNEXT-6658 Server side changes to output unsuppo... Closed
Team: Team C
Sprint: Sprint 76 (May 2021), Sprint 77 (Jun 2021)
Story Points: 0.5

 Description   

During upgrade to 5.4.0 got following in logs

....

1306:20210518:124339.681 Zabbix Server stopped. Zabbix 5.2.6 (revision 798506596c).
6449:20210518:124339.784 Starting Zabbix Server. Zabbix 5.4.0 (revision 5059e20a75).
6449:20210518:124339.785 ****** Enabled features ******
6449:20210518:124339.785 SNMP monitoring: YES
6449:20210518:124339.785 IPMI monitoring: YES
6449:20210518:124339.785 Web monitoring: YES
6449:20210518:124339.785 VMware monitoring: YES
6449:20210518:124339.785 SMTP authentication: YES
6449:20210518:124339.785 ODBC: YES
6449:20210518:124339.785 SSH support: YES
6449:20210518:124339.785 IPv6 support: YES
6449:20210518:124339.785 TLS support: YES
6449:20210518:124339.785 ******************************
6449:20210518:124339.785 using configuration file: /etc/zabbix/zabbix_server.conf
6449:20210518:124339.802 Unsupported DB! MariaDB version is 50505 which is smaller than minimum of 100037
6449:20210518:124339.804 current database version (mandatory/optional): 05020000/05020000
6449:20210518:124339.804 required mandatory version: 05040000
6449:20210518:124339.804 starting automatic database upgrade
6449:20210518:124339.808 completed 0% of database upgrade
...

In fact I've MariaDB 10.5.10-MariaDB-1:10.5.10+maria~bionic version installed. Haven't noticed any other issues on my "beta" instance of zabbix.

Great work and thank you!



 Comments   
Comment by Sergey Kolesnik [ 2021 May 18 ]

here is the complete output for MariaDB version

# mysql -e 'SELECT VERSION();'
+----------------------------------------+
| VERSION() |
+----------------------------------------+
| 10.5.10-MariaDB-1:10.5.10+maria~bionic |
+----------------------------------------+
Comment by Sergey Kolesnik [ 2021 May 19 ]

same situation when installing zabbix from scratch and starting it for a first time:
21718:20210518:221938.929 Starting Zabbix Server. Zabbix 5.4.0 (revision 5059e20a75).
21718:20210518:221938.929 ****** Enabled features ******
21718:20210518:221938.929 SNMP monitoring: YES
21718:20210518:221938.929 IPMI monitoring: YES
21718:20210518:221938.929 Web monitoring: YES
21718:20210518:221938.929 VMware monitoring: YES
21718:20210518:221938.929 SMTP authentication: YES
21718:20210518:221938.929 ODBC: YES
21718:20210518:221938.929 SSH support: YES
21718:20210518:221938.929 IPv6 support: YES
21718:20210518:221938.929 TLS support: YES
21718:20210518:221938.929 ******************************
21718:20210518:221938.929 using configuration file: /etc/zabbix/zabbix_server.conf
21718:20210518:221938.936 Unsupported DB! MariaDB version is 50505 which is smaller than minimum of 100037
21718:20210518:221938.937 current database version (mandatory/optional): 05040000/05040000
21718:20210518:221938.937 required mandatory version: 05040000
21718:20210518:221938.959 server #0 started [main process]

Comment by Sergey Kolesnik [ 2021 May 19 ]

and also on every zabbix_server restart

Comment by Dmitry Krupornitsky [ 2021 May 19 ]

Its a very strange error as Zabbix detects wrong version 5*. Do you have any other MySQL/MariaDB instances on your server? Is this the only you're writing about? 

Comment by Sergey Kolesnik [ 2021 May 20 ]

@dkrupornitsky no. this is the only instance of MariaDB on this server, no MySQL as well.

Comment by Chris Kistner [ 2021 May 25 ]

I found out the long way that Zabbix is using the MySQL/MariaDB version reported in the banner when you connect to the MySQL/MariaDB server and not the one reported by the "SELECT VERSION();", because in our setup we're using ProxySQL to handle Aurora MySQL failovers.
Eg. our banner looks something like:

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 164982
Server version: 5.7.12 (ProxySQL)

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

So with ProxySQL we had to do like:

UPDATE global_variables SET variable_value='5.7.12' WHERE variable_name='mysql-server_version';
save mysql variables to disk;

and update "server_version" in the proxysql.cnf file
and then restart it when we do version upgrades on our Aurora MySQL cluster.

Comment by dimir [ 2021 May 26 ]

While fixing this, make sure marked as "Duplicated by" ZBX-19435 also gets fixed.

Comment by Artjoms Rimdjonoks [ 2021 Jun 04 ]

Available in versions:

Comment by Vadim Volodin [ 2021 Jun 09 ]

Hello.

 

I install new Zabbix server 5.4.1 (revision ecb5b3378c). (Ubuntu 20.04.2)

 
Zabbix repository zabbix-release_5.4-1+ubuntu20.04_all.deb

Need please help)

 

root@monitoring:/home/vadimv# mysql -u root
 Welcome to the MariaDB monitor. Commands end with ; or \g.
 Your MariaDB connection id is 1273
 Server version: 10.3.29-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

log cat /var/log/zabbix/zabbix_server.log

3383:20210609:112238.776 using configuration file: /etc/zabbix/zabbix_server.conf 
3383:20210609:112238.790 Unsupported DB! MariaDB version is 50505 which is smaller than minimum of 100037 
3383:20210609:112238.792 current database version (mandatory/optional): 05040000/05040000 
3383:20210609:112238.792 required mandatory version: 05040000

Full log: cat /var/log/zabbix/zabbix_server.log

 

1189:20210609:104327.879 item "Zabbix server:vfs.dev.read.await[cdrom]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.read.time.rate[cdrom])/(last(//vfs.dev.read.rate[cdrom])+(last(//vfs.dev.read.rate[cdrom])=0)))*1000*(last(//vfs.dev.read.rate[cdrom]) > 0)".
  1188:20210609:104328.881 item "Zabbix server:vfs.dev.read.await[dvd]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.read.time.rate[dvd])/(last(//vfs.dev.read.rate[dvd])+(last(//vfs.dev.read.rate[dvd])=0)))*1000*(last(//vfs.dev.read.rate[dvd]) > 0)".
  1186:20210609:104329.883 item "Zabbix server:vfs.dev.read.await[cdrw]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.read.time.rate[cdrw])/(last(//vfs.dev.read.rate[cdrw])+(last(//vfs.dev.read.rate[cdrw])=0)))*1000*(last(//vfs.dev.read.rate[cdrw]) > 0)".
  1189:20210609:104330.887 item "Zabbix server:vfs.dev.read.await[sda]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.read.time.rate[sda])/(last(//vfs.dev.read.rate[sda])+(last(//vfs.dev.read.rate[sda])=0)))*1000*(last(//vfs.dev.read.rate[sda]) > 0)".
  1188:20210609:104331.890 item "Zabbix server:vfs.dev.write.await[cdrom]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.write.time.rate[cdrom])/(last(//vfs.dev.write.rate[cdrom])+(last(//vfs.dev.write.rate[cdrom])=0)))*1000*(last(//vfs.dev.write.rate[cdrom]) > 0)".
  1186:20210609:104332.891 item "Zabbix server:vfs.dev.write.await[dvd]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.write.time.rate[dvd])/(last(//vfs.dev.write.rate[dvd])+(last(//vfs.dev.write.rate[dvd])=0)))*1000*(last(//vfs.dev.write.rate[dvd]) > 0)".
  1189:20210609:104333.896 item "Zabbix server:vfs.dev.write.await[cdrw]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.write.time.rate[cdrw])/(last(//vfs.dev.write.rate[cdrw])+(last(//vfs.dev.write.rate[cdrw])=0)))*1000*(last(//vfs.dev.write.rate[cdrw]) > 0)".
  1188:20210609:104334.899 item "Zabbix server:vfs.dev.write.await[sda]" became not supported: Cannot evaluate function: not enough data at "last(//vfs.dev.write.time.rate[sda])/(last(//vfs.dev.write.rate[sda])+(last(//vfs.dev.write.rate[sda])=0)))*1000*(last(//vfs.dev.write.rate[sda]) > 0)".
  1186:20210609:104335.899 item "Zabbix server:vfs.file.contents[/sys/block/cdrom/stat]" became not supported: Cannot open file: [2] No such file or directory
  1189:20210609:104342.914 item "Zabbix server:vfs.file.contents[/sys/block/dvd/stat]" became not supported: Cannot open file: [2] No such file or directory
  1188:20210609:104349.924 item "Zabbix server:vfs.file.contents[/sys/block/cdrw/stat]" became not supported: Cannot open file: [2] No such file or directory
  1188:20210609:104531.064 item "Zabbix server:vfs.dev.read.await[sda]" became supported
  1188:20210609:104535.071 item "Zabbix server:vfs.dev.write.await[sda]" became supported
  1182:20210609:110909.813 executing housekeeper
  1182:20210609:110909.837 housekeeper [deleted 0 hist/trends, 0 items/triggers, 0 events, 0 problems, 0 sessions, 0 alarms, 0 audit, 0 records in 0.021607 sec, idle for 1 hour(s)]
  1143:20210609:111427.913 Got signal [signal:15(SIGTERM),sender_pid:3139,sender_uid:0,reason:0]. Exiting ...
  1186:20210609:111427.914 syncing history data in progress... 
  1186:20210609:111427.914 syncing history data done
  1143:20210609:111428.146 syncing trend data...
  1143:20210609:111428.161 syncing trend data done
  1143:20210609:111428.161 Zabbix Server stopped. Zabbix 5.4.1 (revision ecb5b3378c).
  3383:20210609:112238.776 Starting Zabbix Server. Zabbix 5.4.1 (revision ecb5b3378c).
  3383:20210609:112238.776 ****** Enabled features ******
  3383:20210609:112238.776 SNMP monitoring:           YES
  3383:20210609:112238.776 IPMI monitoring:           YES
  3383:20210609:112238.776 Web monitoring:            YES
  3383:20210609:112238.776 VMware monitoring:         YES
  3383:20210609:112238.776 SMTP authentication:       YES
  3383:20210609:112238.776 ODBC:                      YES
  3383:20210609:112238.776 SSH support:               YES
  3383:20210609:112238.776 IPv6 support:              YES
  3383:20210609:112238.776 TLS support:               YES
  3383:20210609:112238.776 ******************************
  3383:20210609:112238.776 using configuration file: /etc/zabbix/zabbix_server.conf
  3383:20210609:112238.790 Unsupported DB! MariaDB version is 50505 which is smaller than minimum of 100037
  3383:20210609:112238.792 current database version (mandatory/optional): 05040000/05040000
  3383:20210609:112238.792 required mandatory version: 05040000
  3383:20210609:112238.811 server #0 started [main process]
  3384:20210609:112238.813 server #1 started [configuration syncer #1]
  3385:20210609:112238.916 server #2 started [housekeeper #1]
  3386:20210609:112238.916 server #3 started [timer #1]
  3387:20210609:112238.917 server #4 started [http poller #1]
  3389:20210609:112238.919 server #6 started [history syncer #1]
  3390:20210609:112238.920 server #7 started [history syncer #2]
  3391:20210609:112238.921 server #8 started [history syncer #3]
  3392:20210609:112238.921 server #9 started [history syncer #4]
  3393:20210609:112238.922 server #10 started [escalator #1]
  3388:20210609:112238.924 server #5 started [discoverer #1]
  3396:20210609:112238.924 server #13 started [task manager #1]
  3400:20210609:112238.927 server #17 started [poller #4]
  3401:20210609:112238.928 server #18 started [poller #5]
  3397:20210609:112238.929 server #14 started [poller #1]
  3398:20210609:112238.930 server #15 started [poller #2]
  3394:20210609:112238.931 server #11 started [proxy poller #1]
  3395:20210609:112238.932 server #12 started [self-monitoring #1]
  3399:20210609:112238.933 server #16 started [poller #3]
  3402:20210609:112238.934 server #19 started [unreachable poller #1]
  3403:20210609:112238.937 server #20 started [trapper #1]
  3404:20210609:112238.938 server #21 started [trapper #2]
  3407:20210609:112238.938 server #24 started [trapper #5]
  3406:20210609:112238.941 server #23 started [trapper #4]
  3405:20210609:112238.942 server #22 started [trapper #3]
  3408:20210609:112238.947 server #25 started [icmp pinger #1]
  3409:20210609:112238.948 server #26 started [alert manager #1]
  3411:20210609:112238.949 server #28 started [alerter #2]
  3410:20210609:112238.950 server #27 started [alerter #1]
  3412:20210609:112238.953 server #29 started [alerter #3]
  3413:20210609:112238.953 server #30 started [preprocessing manager #1]
  3419:20210609:112238.955 server #36 started [lld worker #2]
  3421:20210609:112238.957 server #38 started [history poller #1]
  3417:20210609:112238.957 server #34 started [lld manager #1]
  3418:20210609:112238.958 server #35 started [lld worker #1]
  3416:20210609:112238.958 server #33 started [preprocessing worker #3]
  3425:20210609:112238.961 server #42 started [history poller #5]
  3420:20210609:112238.961 server #37 started [alert syncer #1]
  3422:20210609:112238.961 server #39 started [history poller #2]
  3424:20210609:112238.963 server #41 started [history poller #4]
  3426:20210609:112238.963 server #43 started [availability manager #1]
  3423:20210609:112238.965 server #40 started [history poller #3]
  3414:20210609:112239.052 server #31 started [preprocessing worker #1]
  3415:20210609:112239.052 server #32 started [preprocessing worker #2]
  3385:20210609:115239.196 executing housekeeper
  3385:20210609:115239.205 housekeeper [deleted 0 hist/trends, 0 items/triggers, 0 events, 0 problems, 0 sessions, 0 alarms, 0 audit, 0 records in 0.007497 sec, idle for 1 hour(s)]

 

Comment by Artjoms Rimdjonoks [ 2021 Jun 09 ]

VaaadimV I just added the fix to the pre-5.4.2rc1 version (0b7f69cd99). (also note, that this warning is informative and should not affect the behavior).

Generated at Sat May 31 03:07:13 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.