在使用ODBC时只要一创建数据库监控类型的监控项,进行测试时都会导致zabbix重启。
这次问题排查耗费了很长时间,换过好几个版本的驱动都会产生同样的问题,最终在一篇英文文章中找到了原因。
https://support.zabbix.com/browse/ZBX-7665
下面这是zabbix-server日志的信息:
41295:20211211:112208.881 ================================
41295:20211211:112208.882 Please consider attaching a disassembly listing to your bug report.
41295:20211211:112208.882 This listing can be produced with, e.g., objdump -DSswx zabbix_server.
41295:20211211:112208.882 ================================
41258:20211211:112208.884 One child process died (PID:41295,exitcode/signal:1). Exiting ...
zabbix_server [41258]: Error waiting for process with PID 41295: [10] No child processes
41258:20211211:112208.909 syncing history data...
41258:20211211:112208.910 syncing history data... 100.000000%
41258:20211211:112208.911 syncing history data done
41258:20211211:112208.911 syncing trend data...
41258:20211211:112208.921 syncing trend data done
41258:20211211:112208.922 Zabbix Server stopped. Zabbix 5.0.14 (revision 892ce506db).
10940:20211211:112219.128 Starting Zabbix Server. Zabbix 5.0.14 (revision 892ce506db).
10940:20211211:112219.129 ****** Enabled features ******
10940:20211211:112219.129 SNMP monitoring: YES
10940:20211211:112219.129 IPMI monitoring: YES
10940:20211211:112219.129 Web monitoring: YES
10940:20211211:112219.129 VMware monitoring: YES
10940:20211211:112219.130 SMTP authentication: YES
10940:20211211:112219.130 ODBC: YES
10940:20211211:112219.130 SSH support: YES
10940:20211211:112219.130 IPv6 support: YES
10940:20211211:112219.130 TLS support: YES
10940:20211211:112219.130 ******************************
10940:20211211:112219.131 using configuration file: /etc/zabbix/zabbix_server.conf
10940:20211211:112219.134 current database version (mandatory/optional): 05000000/05000004
10940:20211211:112219.135 required mandatory version: 05000000
10940:20211211:112219.143 server #0 started [main process]
10942:20211211:112219.143 server #1 started [configuration syncer #1]
10943:20211211:112219.245 server #2 started [alert manager #1]
10944:20211211:112219.245 server #3 started [alerter #1]
10945:20211211:112219.245 server #4 started [alerter #2]
10946:20211211:112219.246 server #5 started [alerter #3]
10947:20211211:112219.246 server #6 started [preprocessing manager #1]
目前只有一个版本的驱动可以正常使用:https://repo.mysql.com/yum/mysql-connectors-community/el/7/x86_64/mysql-connector-odbc-5.2.7-1.el7.x86_64.rpm
其他的版本试过了好几个,最终使用5.2.7才成功。