Ad Widget

Collapse

Can't connect Zabbix Server with Oracle DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcelotada
    Member
    • Dec 2011
    • 31

    #1

    Can't connect Zabbix Server with Oracle DB

    Hello all,

    I have a problem here when I try to run the zabbix_server with oracle.

    The log:

    11074:20120321:162036.610 In DBconnect() flag:0
    11074:20120321:162036.631 [Z3001] connection to database '//rjux0091:1521/D07DB11' failed: [-1]
    11074:20120321:162036.631 Cannot connect to the database. Exiting...

    I'm trying to connect to a remote oracle. The configure of zabbix points to a full fresh install of oracle (not instantclient) and I can connect properly with sqlplus.

    The properties DBHost, DBName, DBUser and DBPassword was set on zabbix_server.conf file.

    Any ideas?

    Best regards.
  • justinc
    Junior Member
    • Aug 2011
    • 20

    #2
    Did you compile your server with Oracle support?

    Code:
    shell> ./configure --enable-server --with-oracle --with-net-snmp --with-libcurl

    Comment

    • marcelotada
      Member
      • Dec 2011
      • 31

      #3
      Yes. Here is the command used:

      ./configure --enable-server --enable-agent --with-oracle --with-net-snmp --with-jabber --with-libcurl --with-ldap

      Also, there is a ORACLE_HOME env variable pointing to location of oracle DB instalation.

      Now I tried to run again with a fresh installation of instantclient and we can't configure it once that new dir doesn't have the requered files/dir like "/rdbms/public". Take a look at the error:


      "checking for Oracle OCI headers in /tools/oracle/11.2.0/client/rdbms/public... not found
      checking if Oracle support is enabled... no
      configure: error: Oracle OCI library not found"

      So, the zabbix doesn't work properly with a full database install and instantclient neither.

      I'm been out of ideas...

      Regards

      Comment

      • rutlandn
        Junior Member
        • Jun 2012
        • 1

        #4
        Can't connect Zabbix Server with Oracle DB

        I ran into the same OCI headers problem. It seems no matter what you put in --with-oracle-include or --with-oracle-lib, it picks other directories.

        I just made a backup copy of configure (just in case) and then added the 2 line below at the top. And jump through configure with vi to make sure it didn't user $oracle_home_dir_include and replace with the real variables below.

        oracle_include_dir = /usr/include/oracle/11.2/client64
        oracle_lib_dir = /usr/lib/oracle/11.2/client/lib

        Run with --with-oracle=yes and it worked.

        I think most people use mySQL so these quirks don't get reported. I'll try to do this.

        Comment

        Working...