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

Zabbix crashes when querying Oracle database via ODBC

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Workaround proposed
    • Icon: Trivial Trivial
    • 5.0.3
    • 5.0.2, 5.0.3
    • Server (S)
    • Sprint 68 (Sep 2020), Sprint 69 (Oct 2020)

      Steps to reproduce:

      1. Installed Unix ODBC: unixODBC-2.3.7-1.el8.x86_64, unixODBC-devel-2.3.7-1.el8.x86_64
      2. Installed Oracle client packages: oracle-instantclient11.2-odbc-11.2.0.4.0-1.x86_64, oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64, oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64, oracle-instantclient11.2-jdbc-11.2.0.4.0-1.x86_64, oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64
      3. Configured datasource and driver in /etc/odbc.ini 
        [$DATASOURCE]
        Driver=/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1
        DSN=$DBNAME
        ServerName=$HOST
        UserID=$USER
        Password=$PASS
      1. Configured oracle ODBC driver in /etc/odbcinst.ini 
        [Oracle 11g ODBC driver]
        Description     = Oracle ODBC driver for Oracle 11g
        Driver          = /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1 
      1. Configured connection string in /usr/lib/oracle/11.2/client64/network/admin/tnsnames.ora
        $HOST =
          (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = $host_ip)(Port = 1521))
            (CONNECT_DATA =
              (SID =$DBNAME)
            )
          )
        
      1. Configured environment for zabbix server in /etc/sysconfig/zabbix_server
        PATH=/sbin:/usr/sbin:/bin:/usr/bin ORACLE_HOME=/usr/lib/oracle/11.2/client64 PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib64:/usr/lib:$ORACLE_HOME/bin TNS_ADMIN=$ORACLE_HOME/network/admin
      1. Restarted zabbix-server
      2. Tested connection to the database with isql tool as zabbix server user. It works fine.
      3. Created an Item of type "Database monitor" in zabbix server host with key: "db.odbc.select[Blocked sessions count,\{$DSN}]" and Sql query: "select count(distinct sid) from v$session_blockers;"
      4. Pressed Get value in the item test form

      Result

      Zabbix server crashed


      See log file attached.

      Expected:
      The Item query should return the number of blocked sessions in a database. 

       

      P.S. Initially I received the error on zabbix server 5.0.2, then I updated the server to 5.0.3. Zabbix keeps crashing during odbc check.

            martins-v Martins Valkovskis
            back2base Sergey
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: