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

Zabbix don't connect Oracle Database with ODBC

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Critical Critical
    • None
    • 3.0.4, 3.0.5, 3.2.1
    • Frontend (F), Server (S)

      My zabbix-server of this production in 3.0.4 have multiple monitors on it among them the company's ERP which perform various consulda in oracle database, I have installed on the server Oracle client 11.2.0.4, everything worked perfect until I had to make a restart the server (systemctl restart zabbix-server), after it was unable to monitor more the oracle databases by ODBC, the log returns the following message:

      1462: 20,161,013: 110126,222 item "MOREIRA: db.odbc.select [database, {} $ DSN]" Became not supported: Can not connect to ODBC DSN: [SQL_ERROR]: [01000] [0] [[unixODBC] [Driver Manager ] Can not open lib '/usr/lib/oracle/11.2/client64/lib/libsqora.so': file not found] |
      

      But in linux via isql command connect the oracle normalemente, created in the directory /etc/profile.d a oracleenv.sh file where seto for all the server users the variables of Oracle environment.

      root@debian:~# isql -v  moreira
      +---------------------------------------+
      | Connected!                            |
      |                                       |
      | sql-statement                         |
      | help [tablename]                      |
      | quit                                  |
      |                                       |
      +---------------------------------------+
      SQL> select * from dual;
      +------+
      | DUMMY|
      +------+
      | X    |
      +------+
      SQLRowCount returns -1
      1 rows fetched
      SQL>
      
      # VARIABLE ORACLE
      export ORACLE_HOME = / usr / lib / oracle / 11.2 / client64
      export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ ORACLE_HOME / lib
      export TNS_ADMIN = / etc / oracle
      

      When I go on zabbix user the Oracle environment variables are set:

      root @ debian: ~ # su - zabbix
      In the directory, logging in with HOME = /
      root @ debian: ~ # vi / etc / passwd
      root @ debian: ~ # su - zabbix
      In the directory, logging in with HOME = /
      zabbix @ debian: / $ env
      XDG_SESSION_ID = 2
      SHELL = / bin / bash
      TERM = xterm
      USER = zabbix
      LD_LIBRARY_PATH = / usr / lib / oracle / 11.2 / client64 / lib
      TNS_ADMIN = / etc / oracle
      MAIL = / var / mail / zabbix
      PATH = / usr / local / bin: / usr / bin: / bin: / usr / local / games / usr / games
      PWD = /
      LANG = en_US.UTF-8
      SHLVL = 1
      HOME = /
      LANGUAGE = en_US: en
      LOGNAME = zabbix
      ORACLE_HOME = / usr / lib / oracle / 11.2 / client64
      _ = / Usr / bin / env
      
      zabbix @ debian: / $ ls -l /usr/lib/oracle/11.2/client64/lib/libsqora.so
      lrwxrwxrwx 1 root root 50 Oct 13 00:19 /usr/lib/oracle/11.2/client64/lib/libsqora.so -> /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1
      

      Can help me, all the tests that did not resolve the problems, installed to a new environment that the 3.0.5 version and the problem still occurs.

      I thank all the attention.

            Unassigned Unassigned
            lmoreira Leandro Moreira
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: