Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-15964

ODBC item causes Zabbix Server to crash

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
      mariadb-server-10.3
      Zabbix Server 3.4
      mariadb-connector-odbc v3.0.1-1
      odbcinst, odbcinst1debian2:amd64 and unixodbc: v2.3.4-1

      Description

      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:

      [MariaDB]
      Driver =/usr/local/lib/libmaodbc.so
      Description =MariaDB ODBC Connector
      

      And my /etc/odbc.ini:

      [test] 
      Description=Zabbix Server
      Driver=MariaDB
      Server=127.0.0.1
      User=***
      Password=***
      Port=3306
      Database=zabbix
      

      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]:[28000][1045][[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:

      [MariaDB]
      Driver =/usr/local/lib/libmaodbc.so
      Setup =/usr/local/lib/libmyodbc5a.so (5a,5w,5S,8a,8w,8S)
      Description =MariaDB ODBC Connector
      

      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!

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              edgar.akhmetshin Edgar Akhmetshin
              Reporter:
              jcruz Jhonatan Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: