Xymon Mailing List Archive search

[Possible Spam] Re: Oracle monitoring with dbcheck fails

list Andy Smith
Tue, 15 Sep 2015 12:43:56 +0100
Message-Id: <user-e51329ed71b8@xymon.invalid>

Phil Crooker wrote:
Haven't used DBI myself but on the surface it does look like the DBI perl modules aren't working. You might try loading them from CPAN to get later versions.


*From:* Xymon <xymon-bounces at xymon.com> on behalf of user-72b9c6c2ac3c@xymon.invalid <user-72b9c6c2ac3c@xymon.invalid>
*Sent:* Tuesday, 15 September 2015 4:29 PM
*To:* xymon at xymon.com
*Subject:* [Xymon] Oracle monitoring with dbcheck fails
 **

Hi all,

 
I am currently under way migrating from my current Xymon server running on Ubuntu to redundant Xymon servers running on CentOS. I am having Oracle monitoring enabled with dbcheck on my Ubuntu server and it is working fine, but the same setup does not work on CentOS.

 
1.       The oracle client is installed

2.       All required perl modules are installed

3.       The same dbcheck.ini file used on Ubuntu has been copied over to CentOS

4.       The dbcheck task is running

5.       ORACLE_HOME and LD_LIBRARY_PATH has been set

6.       I can connect to all my monitored Oracle instances with: sqlplus64 xymonuser/xymonpassword at host/SID as the Xymon user

7.       The following perl script gives no error output

 
#!/usr/bin/perl

 
use DBI;

 
$ENV{'ORACLE_HOME'}="/usr/lib/oracle/11.2/client64/";

 
$dbhost="hostname";

$port=1521;

$sid="SID";

$user="xymonuser";

$pw="xymonpassword";

$data_source="DBI:Oracle:host=$dbhost;port=$port;sid=$sid";

 
$dbh = DBI->connect($data_source,$user,$pw ,{ RaiseError => 1,

PrintError  =>1});  $dbh->disconnect;

 
exit 0;

 
However, the only thing I get in the dbfast.log is: Timeout connecting to DBI:Oracle:host=hostname;port=1521;sid=SID!

 
This is weird, and it got even more weird when I realized that dbcheck does not even try to communicate with the Oracle instances, it simply logs the error message and exits. I ran tcpdump to verify this and there is no connection attempt being made by dbcheck.

 
The only thing that really differs between the Ubuntu machine and the CentOS machine are the version numbers for certain per modules:

 
Ubuntu looks like this:

 
2015-09-15 08:56:42 Using default environment file /usr/lib/xymon/client/etc/xymonserver.cfg

Program Information

        dbcheck.pl version 1.09

        Hobbit_fd_lib.pm version 1.16

 
OS Information

        Linux hmon01 3.13.0-63-generic #103-Ubuntu SMP Fri Aug 14 21:42:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

        Perl version is v5.18.2

 
Module Information

        FindBin 1.51

        POSIX 1.32

        Text::Wrap 2012.0818

        Time::Local 1.2300

        Sys::SigAction 0.20

        Config::IniFiles 2.82

        DBI 1.63

        DBD::DBM 0.08

        DBD::ExampleP 12.014311

        DBD::File 0.42

        DBD::Gofer 0.015327

        DBD::ODBC 1.45

        DBD::Oracle 1.74

        DBD::Sponge 12.010003

        DBD::mysql 4.025

 
CentOS looks like this:

 
2015-09-15 08:55:28.619868 Using default environment file /home/xymon/server/etc/xymonserver.cfg

Program Information

        dbcheck.pl version 1.09

        Hobbit_fd_lib.pm version 1.16

 
OS Information

        Linux hxm01.ds.driss.se 3.18.17-13.el6.x86_64 #1 SMP Tue Jul 21 17:17:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

        Perl version is v5.10.1

 
Module Information

        FindBin 1.50

        POSIX 1.17

        Text::Wrap 2009.0305

        Time::Local 1.1901

        Sys::SigAction 0.11

        Config::IniFiles 2.56

        DBI 1.609

        DBD::DBM 0.03

        DBD::ExampleP 12.010007

        DBD::File 0.37

        DBD::Gofer 0.011565

        DBD::Oracle 1.74

        DBD::Sponge 12.010002

        DBD::mysql 4.013

 
So, I must be missing something, but I have not found what that is, any ideas?

 
/Johan
If tcpdump shows no network activity then surely this must be an SELINUX issue ?
-- 
Andy