Type: Incident report
Resolution: Won't fix
Affects Version/s: None
Fix Version/s: None
Environment:Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
Zabbix Server 3.4
odbcinst, odbcinst1debian2:amd64 and unixodbc: v2.3.4-1
This zabbix server has been up for a long time, and just now I needed to monitor some databases. So I tried to reproduce the configuration of another zabbix server of mine, that runs and monitors DBs just fine. But this server is a Debian 8 with an older version of Zabbix Server, so it didn't work.
My current /etc/odbcinst.ini:
And my /etc/odbc.ini:
I see this is a well known bug so I'll try to describe the path I went through to see if I can get any kind of assistance in my current specific scenario. I ask for your patience trying to get it together.
- I tried to reproduce the configs from the other server; right away, the package 'libmyodbc:amd64' providing the MySQL driver was discontinued on Debian Stretch.
- First, I manually downloaded and tested multiple versions of the MySQL connector from https://dev.mysql.com/downloads/connector/odbc/. None of them could get me to connect via the isql utility.
- I then tried the same process with the MariaDB drivers from https://bit.ly/2U9LR3z. This time I stumbled in lib dependencies as discribed here: https://bit.ly/2OZxUnR.
- I found this article (https://bit.ly/2UJonq2) and then compiled the MariaDB connector from source, and this time succesfully connected via isql; both localhost and remote databases.
- Finally I created an item on my Zabbix FrontEnd, to test the connector. Soon as the zabbix server tries to collect that item, I get this message: Cannot connect to ODBC DSN:[SQL_ERROR]:[[unixODBC][ma-3.0.1]Access denied for user 'zabbix'@'localhost' (using password: NO)]|. Which is weird already, once the user that I'm trying to connect to is not 'zabbix', and yes I use password, both on my /etc/odbc.ini file and in the front end fields (also tried leaving it blank).
- I was thinking that maybe zabbix server was not capable of reading the /etc/odbc.ini file, but if this file does not exist, or the information is wrong, I get a 'data source not found' message, so it looks like zabbix-server can read the file but "ignores" it.
- This is where I get this message 'Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x70]. Crashing' and then my zabbix-server crashes and restarts; every time I tries to collect that item.
I also tried adding multiple versions of the ODBC connector for MySQL as the 'Setup' part of the /etc/odbcinst.ini file:
I know there are a few issues closed related to this crash, but I got nothing from them and was hoping that providing some details of my scenario might assist you guys in giving me some advice.
Thank you in advance!