Ad Widget

Collapse

1.4.4 Solaris 10 And ORACLE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rama
    Junior Member
    • Jan 2008
    • 2

    #1

    1.4.4 Solaris 10 And ORACLE

    Hi,

    I'm trying to set up zabbix on Solaris 10 with a remote Oracle Backend but can't have it running.
    Compilation went ok but it seems that the config file is broken.
    As zabbix seems to take the "DBNAME" as the hostname example:

    Code:
    DBHost=172.16.4.40
    
    DBName=THE-DBNAME
    # Database user
    DBUser=THE-USER
    # Database password
    # Comment this line if no password used
    DBPassword=THE-PASSWD
    Snooping while launching the server:

    Code:
    mewen.hosts.groupertl.net -> dns.vsrv.dcenter.groupertl.net DNS C THE-DBNAME.vsrv.dcenter.groupertl.net. Internet Addr ?
    should be THE-HOSTNAME instead of THE-DBNAME.vsrv.dcenter.groupertl.net

    logs:

    Code:
    /opt/zabbix/sbin/zabbix_server [12040]: Warning: ZABBIX semaphores already exist, trying to recreate.
     12040:20080110:121945 Starting zabbix_server. ZABBIX 1.4.4.
     12040:20080110:121945 **** Enabled features ****
     12040:20080110:121945 SNMP monitoring:       YES
     12040:20080110:121945 WEB monitoring:        YES
     12040:20080110:121945 Jabber notifications:   NO
     12040:20080110:121945 IPv6 support:           NO
     12040:20080110:121945 **************************
     12040:20080110:121945 Cannot login with THE-USER/THE-PASSWD@THE-DBNAME
    Cannot login with THE-USER/THE-PASSWD@THE-DBNAME
    if I do the same test but changing THE-DBNAME with the IP address I see some trafic while snooping:

    Code:
    mewen.hosts.groupertl.net -> racbay.vsrv.dcenter.groupertl.net TCP D=1521 S=32973 Syn Seq=766180810 Len=0 Win=32850 Options=<mss 1460,nop,nop,tstamp 966363136 0,nop,wscale 1,nop,nop,sackOK>
    172.16.244.69, mewen.hosts.groupertl.net is 0:e:7f:69:37:10
    racbay.vsrv.dcenter.groupertl.net -> mewen.hosts.groupertl.net TCP D=32973 S=1521 Syn Ack=766180811 Seq=1202288067 Len=0 Win=33304 Options=<nop,nop,tstamp 309158365 966363136,mss 1460,nop,wscale 1,nop,nop,sackOK>
    mewen.hosts.groupertl.net -> racbay.vsrv.dcenter.groupertl.net TCP D=1521 S=32973 Ack=1202288068 Seq=766180811 Len=0 Win=33304 Options=<nop,nop,tstamp 966363136 309158365>
    mewen.hosts.groupertl.net -> racbay.vsrv.dcenter.groupertl.net TCP D=1521 S=32973 Push Ack=1202288068 Seq=766180811 Len=226 Win=33304 Options=<nop,nop,tstamp 966363136 309158365>
    racbay.vsrv.dcenter.groupertl.net -> mewen.hosts.groupertl.net TCP D=32973 S=1521 Ack=766181037 Seq=1202288068 Len=0 Win=33191 Options=<nop,nop,tstamp 309158365 966363136>
    racbay.vsrv.dcenter.groupertl.net -> mewen.hosts.groupertl.net TCP D=32973 S=1521 Push Ack=766181037 Seq=1202288068 Len=103 Win=33304 Options=<nop,nop,tstamp 309158366 966363136>
    racbay.vsrv.dcenter.groupertl.net -> mewen.hosts.groupertl.net TCP D=32973 S=1521 Fin Ack=766181037 Seq=1202288171 Len=0 Win=33304 Options=<nop,nop,tstamp 309158366 966363136>
    mewen.hosts.groupertl.net -> racbay.vsrv.dcenter.groupertl.net TCP D=1521 S=32973 Ack=1202288171 Seq=766181037 Len=0 Win=33304 Options=<nop,nop,tstamp 966363137 309158366>
    mewen.hosts.groupertl.net -> racbay.vsrv.dcenter.groupertl.net TCP D=1521 S=32973 Ack=1202288172 Seq=766181037 Len=0 Win=33304 Options=<nop,nop,tstamp 966363137 309158366>
    mewen.hosts.groupertl.net -> racbay.vsrv.dcenter.groupertl.net TCP D=1521 S=32973 Fin Ack=1202288172 Seq=766181037 Len=0 Win=33304 Options=<nop,nop,tstamp 966363137 309158366>
    racbay.vsrv.dcenter.groupertl.net -> mewen.hosts.groupertl.net TCP D=32973 S=1521 Ack=766181038 Seq=1202288172 Len=0 Win=33304 Options=<nop,nop,tstamp 309158366 966363137>
    ####### did try using the Web Interface but have so trouble with and can't figure out how to fix it:

    Code:
    ocilogon() [function.ocilogon]: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor[/opt/apache/htdocs/zabbix/include/db.inc.php:84]
    line 84 beeing:
    $DB = ocilogon($DB_USER, $DB_PASSWORD, "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$DB_SER VER)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=$DB_DA TABASE)))");

    If I comment it and comment out the other line I got this message:

    Code:
    ocilogon() [function.ocilogon]: ORA-12154: TNS:could not resolve the connect identifier specified[/opt/apache/htdocs/zabbix/include/db.inc.php:83]
    having in both case set up this at the begining of the db.inc.php file:

    Code:
    putenv("ORACLE_HOME=/home/rama/oracle/product/10.2.0/db_1");
    $DB = null;
    $DB_TYPE = "ORACLE";
    $DB_SERVER = "172.16.4.40";
    $DB_PORT = "1521";
    $DB_DATABASE = "xxxxx";
    $DB_USER = "xxxxx";
    $DB_PASSWORD = "xxxxx";
    Any idea ??

    Thanks
  • phru
    Junior Member
    • Dec 2007
    • 15

    #2
    Hello,

    i have a similar problem with my Oracle backend but i am using RHEL 4. I also receive the

    Cannot login with THE-USER/THE-PASSWD@THE-DBNAME

    error message when i try to start the zabbix_server. I think that i have already tried everything and now it drive me nuts and i have no mor ideas what to do.

    In my php config i have used the database name not the listener name.

    Comment

    • rama
      Junior Member
      • Jan 2008
      • 2

      #3
      No one at Zabbix has a clue for this king of problem ?

      Thanks

      Comment

      • Zapnix
        Junior Member
        • Apr 2006
        • 13

        #4
        Similar Problem here - Gentoo Linux & remote Oracle DB.

        First I had to install libsqlora8-2.3* (currently 2.3.3), but don't remember if it's the pure instant client or if I had to hack around with Oracle first.

        When you use

        $DB_SERVER = "172.16.4.40";
        $DB_PORT = "1521";
        $DB_DATABASE = "TNSNAME";
        $DB_USER = "USER";
        $DB_PASSWORD = "PASS";

        Zabbix tries to connect as USER/PASS@TNSNAME - so far it works (same values in /etc/zabbix/zabbix_server.conf). For the DB_SERVER and DB_PORT parts I used defaults (localhost and 0 - means default port) and the IP and 1521 with success.

        The bad news is that it doesn't seem to work either.

        One thing I found is that when libsqlora8 is initialized with sqlo_init(SQLO_OFF, 1, 100) in zabbix-1.4.4/src/libs/zbxdb/db.c:161, it only allows 1 connection and the master process is dying - so I changed the 2nd arg to 10 and have at least a good process tree.

        Looking around in zabbix-1.4.4/src/libs/zbxdb/db.c it seems to me that the Oracle part (HAVE_ORACLE) is rather un- or less supported. I'd be willing to help when my time (and the time of our Oracle admin ) allows, but I fear I will need a bit more information to do so... are there people here, who are a bit closer involved in Zabbix's development and willing to share their secrets with us?

        Kind regards!
        E.

        Comment

        • phru
          Junior Member
          • Dec 2007
          • 15

          #5
          Hello,

          now my zabbix server is running.

          I changed the following lines in src/libs/zbxdb/db.c and after that the daemon was able to connect to the database.

          160: sqlo_init(SQLO_OFF, 100, 100)
          585: //if(!result) return NULL;

          Comment

          Working...