Ad Widget

Collapse

Oracle backend

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phork
    Member
    • Nov 2006
    • 38

    #1

    Oracle backend

    I'm trying to switch zabbix to use an oracle backend and while everything compiled properly, it is not even attempting to connect. Zabbix compiled with oracle support no problems, but when I attempt to start the server it doesn't even try to connect out. And all the logs mention is "Cannot login with username/secret@databasename." Is there some other configuration I need to add to the serber conf, or elsewhere?
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    These are connection details on our test system from zabbix_server.conf:

    DBName=ZABBIX
    DBUser=scott
    DBPassword=tiger
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • phork
      Member
      • Nov 2006
      • 38

      #3
      My DB settings do appear to be fine, the problem is that zabbix never even attempts to connect out to the oracle database. In addition to the settings you mentioned I have a DBHost since the oracle DB doesn't not reside on the local host. When I strace the starting of the daemon it seems to find all the respective oracle libraries, but forks off a different process prior to making the actual connection (so I can't see any related errors in the trace). If I run tcpdump at the same time, I do see ANY attempt at an outbound connection to the host in question. Ideas?

      Comment

      • phork
        Member
        • Nov 2006
        • 38

        #4
        I believe I may have figured it out... zabbix appears to be looking up the DBName field and trying to use that as the DBHost. When I set the DBName to a valid FQDN you can see the children resolve and try to connect to said host. When I actually make it the DBName (which is not a valid DNS entry) you can see the bad DNS packets go out, and of course it never gets resolved. Can someone try to replicate this? 1.1.4 with oracle enabled.

        Comment

        • phru
          Junior Member
          • Dec 2007
          • 15

          #5
          Hello,

          i know that the thread is out of date but i have the same problem.

          Did you find a solution for this problem?

          cheers

          Comment

          • max
            Member
            • Jan 2008
            • 36

            #6
            Originally posted by phru
            Hello,

            i know that the thread is out of date but i have the same problem.

            Did you find a solution for this problem?

            cheers
            I'm interested too by this problem : who already succeed in installing a oracle backend with zabbix ?

            Comment

            • phru
              Junior Member
              • Dec 2007
              • 15

              #7
              Hello,

              I was able to configure and run the server.

              Here you can find the solution

              Comment

              • max
                Member
                • Jan 2008
                • 36

                #8
                Thanks ! That will be usefull for the future steps.
                For now, I have to solve install oci8 library for PHP :
                http://tof.canardplus.com/show/16042...c9563b37c.html

                Comment

                • phru
                  Junior Member
                  • Dec 2007
                  • 15

                  #9
                  You have to edit some entries in the db config.

                  Should I send you the files?

                  Comment

                  • max
                    Member
                    • Jan 2008
                    • 36

                    #10
                    Yep ! I'm quite interested by these files. Thanks for the proposal.

                    Comment

                    • phru
                      Junior Member
                      • Dec 2007
                      • 15

                      #11
                      Hello,

                      that's my php configure string

                      ./configure --with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib/ --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --enable-sigchild --with-config-file-path=/usr/local/httpd/conf/ --with-gd=/usr/local/gd/ --enable-bcmath --with-png-dir=/usr/local/gd/

                      What version of php do you use?

                      Comment

                      • max
                        Member
                        • Jan 2008
                        • 36

                        #12
                        PHP version 4.3.9

                        But I've got a problem with the configuration of OCI8 for php, I'm going to reinstall apache+php

                        For those who hae the same problem, see this step-by-step note from Oracle in order to install OCI8 for PHP :

                        Comment

                        • phru
                          Junior Member
                          • Dec 2007
                          • 15

                          #13
                          Strange. What's the problem. You only have to install it and recompile php?!

                          Comment

                          • max
                            Member
                            • Jan 2008
                            • 36

                            #14
                            Hi,


                            I had this error and spent nearly a complete day trying to understand why


                            Code:
                            error:  Failed dependencies:
                                      libclntsh.so.10.1 is needed by  php-oci8-4.3.9-2.2.el4.i386


                            And after seeing the step-by-step from Oracle to install OCI, I found that I had missing files in my php install folder (no ext/oci8/...).

                            Comment

                            • max
                              Member
                              • Jan 2008
                              • 36

                              #15
                              During the zabbix web install :
                              Code:
                              ocilogon(): _oci_open_server: ORA-12154: TNS:could not resolve the connect identifier specified [/u02/zabbix/web/include/db.inc.php:76]
                              Did someone encounter the same problem ?
                              What environment variable do I need to make this work ?

                              I tried a dummy code to test the connection :
                              Code:
                              <?php
                                // adding the env var TNS_ADMIN
                                putenv("TNS_ADMIN=/u02/oracle/product/10.2.0/network/admin");
                                // verifying some environment variables... 
                                echo 'PATH='.getenv('PATH').'<br>';
                                echo 'ORACLE_HOME='.getenv('ORACLE_HOME').'<br>';
                                echo 'TNS_ADMIN='.getenv('ORACLE_HOME').'<br>';
                              
                                $connect = OCILogon('#USER#','#PASS#','#IP#:#PORT#/#DBNAME#');
                                if ($connect) echo 'great !';
                                else echo 'ouch !';
                              ?>
                              ...and it doesn't work too :
                              Code:
                              Warning:  ocilogon(): _oci_open_server: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor  in /u02/zabbix/web/test_oci.php on line 6

                              Comment

                              Working...