Xymon Mailing List Archive search

Oracle monitoring with dbcheck fails

6 messages in this thread

list Johan Grotherus · Tue, 15 Sep 2015 06:59:27 +0000 ·
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
list Phil Crooker · Tue, 15 Sep 2015 08:06:41 +0000 ·
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.
quoted from Johan Grotherus


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
list Andy Smith · Tue, 15 Sep 2015 12:43:56 +0100 ·
quoted from Phil Crooker
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
list Jeremy Laidman · Wed, 16 Sep 2015 17:37:59 +1000 ·
quoted from Andy Smith
On 15 September 2015 at 16:59, <user-72b9c6c2ac3c@xymon.invalid> wrote:
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.

Try running the script through strace.
list Johan Grotherus · Wed, 16 Sep 2015 08:06:00 +0000 ·
Hi all,

There seems to be an issue with having comments in the dbcheck.ini file, using # after specific tests really messed up things. Now everything is working fine, thanks to both Jeremey and Phil for your suggestions.

/Johan
quoted from Jeremy Laidman

From: Jeremy Laidman [mailto:user-71895fb2e44c@xymon.invalid]
Sent: Wednesday, September 16, 2015 9:38 AM
To: Grotherus Johan (DS-XO)
Cc: xymon at xymon.com
Subject: Re: [Xymon] Oracle monitoring with dbcheck fails

On 15 September 2015 at 16:59, <user-72b9c6c2ac3c@xymon.invalid<mailto:user-72b9c6c2ac3c@xymon.invalid>> wrote:
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.

Try running the script through strace.
list Paul Root · Wed, 16 Sep 2015 14:12:04 +0000 ·
I took your script and ran it on my network. Obviously changing the host, SID, etc. Tcpdump confirmed that it connected to my oracle server.
quoted from Jeremy Laidman

From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Jeremy Laidman
Sent: Wednesday, September 16, 2015 2:38 AM
To: user-72b9c6c2ac3c@xymon.invalid
Cc: xymon at xymon.com
Subject: Re: [Xymon] Oracle monitoring with dbcheck fails

On 15 September 2015 at 16:59, <user-72b9c6c2ac3c@xymon.invalid<mailto:user-72b9c6c2ac3c@xymon.invalid>> wrote:
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.

Try running the script through strace.

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.