Ad Widget

Collapse

rc2.4.4rc1 oracle install issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ik_zelf
    Member
    • Feb 2015
    • 60

    #1

    rc2.4.4rc1 oracle install issues

    Because I ran into this issue <Compilation of server fails for 2.4.3 with Oracle support with zabbix 2.4.3 I tried 2.4.4rc1, as was suggested in the article.

    Linux OL6.5
    Oracle 12.1.0.2

    1) for oracle and db2 the schema.sql is not generated
    2) the webinterface does not get me past setup.php
    3) almost forgot to mention: in oracle nvarchar2 length limit is 2000 characters, not 2048.

    The webinterface has an issue with case sensitivity in DB[TYPE] ORACLE. If using Oracle it shows the db config screen, If using ORACLE it just complains about not being able to connect. Looks like some inconsistency.

    I can not find logs, access_log and error_log don't have any error messages related to the database connection.

    zabbix_server is running without problems.
    Also installed the images.

    With the config in /var/www/html/zabbix/conf/zabbix.conf.php I can choose between the following error message:

    <?php
    // Zabbix GUI configuration file.
    global $DB;

    $DB["TYPE"] = 'ORACLE';
    $DB["SERVER"] = 'localhost';
    $DB["PORT"] = '1521';
    $DB["DATABASE"] = 'orcl';
    $DB["USER"] = 'zabbix';
    $DB["PASSWORD"] = 'zabbix';
    // Schema name. Used for IBM DB2 and PostgreSQL.
    $DB["SCHEMA"] = 'zabbix';
    $ZBX_SERVER = 'localhost';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = '';
    $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
    ?>

    I get:
    Zabbix 2.4.4rc1
    Database error
    Error connecting to database:


    and with
    <?php
    // Zabbix GUI configuration file.
    global $DB;

    $DB["TYPE"] = 'Oracle';
    $DB["SERVER"] = 'localhost';
    $DB["PORT"] = '1521';
    $DB["DATABASE"] = 'orcl';
    $DB["USER"] = 'zabbix';
    $DB["PASSWORD"] = 'zabbix';
    // Schema name. Used for IBM DB2 and PostgreSQL.
    $DB["SCHEMA"] = 'zabbix';
    $ZBX_SERVER = 'localhost';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = '';
    $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
    ?>

    I get:
    Zabbix 2.4.4rc1
    Configuration file error
    DB type has wrong value. Possible values MYSQL, POSTGRESQL, ORACLE, IBM_DB2, SQLITE3

    It's a pity that I can not find a more descriptive error message.
    Last edited by ik_zelf; 19-02-2015, 17:47. Reason: added zabbix.conf.php and error messages, added 2.4.3 problem
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome to Zabbix forums!

    There are two tings you could check for a start.

    1. When installing Zabbix server did you compile it with --with-oracle options?


    2. Were you able to create the database with scripts as described here?
    https://www.zabbix.com/documentation...l/db_scripts?s[]=oracle

    Best Regards,
    Ingus

    Comment

    • ik_zelf
      Member
      • Feb 2015
      • 60

      #3
      Hi Ingus,

      thanks for the reply.
      1) yes, --with-oracle options (zabbix_server is running)
      2) yes, tables created, data inserted. I did not load the images. The tables I created using schema.sql I got from the 2.4.3 installation and edited that to have nvarchar2 max length of 2000 instead of 2048.

      Ronald.

      Comment

      • ik_zelf
        Member
        • Feb 2015
        • 60

        #4
        If there is anything I can do to give more info: please tell me what to do and I can get it. If there is anything new to test: I will be happy to test it.

        Comment

        • ingus.vilnis
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Mar 2014
          • 908

          #5
          Hi,


          The only thing I can ask is whether you tried with the latest stable 2.4.3? Maybe there is an issue with RC in particular.

          Best Regards,
          Ingus
          Last edited by ingus.vilnis; 20-02-2015, 09:50.

          Comment

          • ik_zelf
            Member
            • Feb 2015
            • 60

            #6
            Yes, I tried with 2.4.3 and ran into this Compilation of server fails for 2.4.3 with Oracle support where I seem to be stuck now.

            Comment

            • ik_zelf
              Member
              • Feb 2015
              • 60

              #7
              Given the fact that this:
              /* $DB['DB'] = @oci_connect($DB['USER'], $DB['PASSWORD'], $connect); */
              $DB['DB'] = @oci_connect('zabbix', 'zabbix', '127.0.0.1:1521/orcl');
              if ($DB['DB']) {
              DBexecute('ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.zbx_dbstr('. '));
              }
              else {
              $ociError = oci_error();
              $error = 'Error boe connecting to database: '.$ociError['message'];
              $result = false;
              }

              does not show any error info, I guess the problem is the oci_connect itself. I see not a single request in the oracle listener log file. I do see my 'boe' marker in the browser.
              How can I debug this php -> oci_connect issue?
              How can I check that this oci_connect can load the client libraries correctly?
              Where/should I set the LD_LIBRARY_PATH for php ?

              Comment

              • ik_zelf
                Member
                • Feb 2015
                • 60

                #8
                I just wrote my first php script:
                <?php
                $db=OCILogon("zabbix", "zabbix","localhost/orcl");

                ?>

                from the commandline: php hello.php
                does create a database connection without any problems so I guess I am missing the LD_LIBRARY_PATH pointing to the client's lib dir.
                How can I set that for php?

                thanks,

                Comment

                • ik_zelf
                  Member
                  • Feb 2015
                  • 60

                  #9
                  I also added phpinfo, which tells the following for oci:
                  oci8
                  OCI8 Support enabled
                  OCI8 DTrace Support disabled
                  OCI8 Version 2.0.8
                  Revision $Id: f04114d4d67cffea4cdc2ed3b7f0229c2caa5016 $
                  Oracle Run-time Client Library Version 12.1.0.2.0
                  Oracle Compile-time Version 12.1
                  Compile-time ORACLE_HOME /u01/app/oracle/12.1.0.2/home1
                  Libraries Used -Wl,-rpath,/u01/app/oracle/12.1.0.2/home1/lib -L/u01/app/oracle/12.1.0.2/home1/lib -lclntsh

                  not bad at all but still, it fails.

                  Comment

                  • ik_zelf
                    Member
                    • Feb 2015
                    • 60

                    #10
                    After downloading and installing 2.4.4 the compilation went OK but the web frontend still did not connect me to the database. The cause of this was:

                    /etc/sysconfig/httpd that should contain an export for ORACLE_HOME.
                    export

                    /etc/sysconfig/httpd:
                    ORACLE_HOME=/your/oracle/home
                    export ORACLE_HOME
                    ----------------------------------------
                    Don't forget the export

                    Comment

                    • inhayn
                      Junior Member
                      • Sep 2004
                      • 13

                      #11
                      Hello!

                      I found the same problem with the version 2.4.4 and your solution works great!

                      Thank you!

                      Comment

                      • vardhasu
                        Junior Member
                        • Oct 2015
                        • 17

                        #12
                        Oracle install issues

                        Originally posted by ik_zelf
                        After downloading and installing 2.4.4 the compilation went OK but the web frontend still did not connect me to the database. The cause of this was:

                        /etc/sysconfig/httpd that should contain an export for ORACLE_HOME.
                        export

                        /etc/sysconfig/httpd:
                        ORACLE_HOME=/your/oracle/home
                        export ORACLE_HOME
                        ----------------------------------------
                        Don't forget the export
                        What needs to be done for setup to recognize oracle, if Oracle resides on a different node?

                        Comment

                        • ik_zelf
                          Member
                          • Feb 2015
                          • 60

                          #13
                          You do need an Oracle Client installation on you zabbix server. That can connect to a remote database. This is a very common setup. So first you need to install the Oracle Client. You can use this article as a simple guide for the client installation.

                          Comment

                          • vardhasu
                            Junior Member
                            • Oct 2015
                            • 17

                            #14
                            Originally posted by ik_zelf
                            You do need an Oracle Client installation on you zabbix server. That can connect to a remote database. This is a very common setup. So first you need to install the Oracle Client. You can use this article as a simple guide for the client installation.
                            Hi

                            Thanks for reply. Already did that.

                            Regards

                            Vardhan

                            Comment

                            • hihoss
                              Junior Member
                              • Sep 2016
                              • 7

                              #15
                              Oracle config. PHP issue

                              I am trying to config zabbix to se oracel for the backend DB. I had postGresql running. I downloaded the source and rebuild the server for oracle. copied it in place and started. the log shows it connected to oracle. I can not get the web setup to allow oracel config. I only shows PostgreSQL. I copied the php files from the source kit to the http dir. but no luck. I also have edited the zabbix php config. still nothing. I am using 3.2

                              Comment

                              Working...