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.
The oracle client is installedAll required perl modules are installedThe same dbcheck.ini file used on Ubuntu has been copied over to CentOSThe dbcheck task is runningORACLE_HOME and LD_LIBRARY_PATH has been setI can connect to all my monitored Oracle instances with: sqlplus64 xymonuser/xymonpassword at host/SID as the Xymon userThe 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
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 Johan.Grotherus at vattenfall.com <Johan.Grotherus at vattenfall.com> 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.
The oracle client is installedAll required perl modules are installedThe same dbcheck.ini file used on Ubuntu has been copied over to CentOSThe dbcheck task is runningORACLE_HOME and LD_LIBRARY_PATH has been setI can connect to all my monitored Oracle instances with: sqlplus64 xymonuser/xymonpassword at host/SID as the Xymon userThe 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
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 Johan.Grotherus at vattenfall.com <Johan.Grotherus at vattenfall.com> *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.
The oracle client is installedAll required perl modules are installedThe same dbcheck.ini file used on Ubuntu has been copied overto CentOS
The dbcheck task is runningORACLE_HOME and LD_LIBRARY_PATH has been setI can connect to all my monitored Oracle instances with:sqlplus64 xymonuser/xymonpassword at host/SID as the Xymon user
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.16OS Information
Linux hmon01 3.13.0-63-generic #103-Ubuntu SMP Fri Aug 1421:42:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Perl version is v5.18.2Module 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.025CentOS 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.16OS Information
Linux hxm01.ds.driss.se 3.18.17-13.el6.x86_64 #1 SMP Tue Jul 2117:17:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Perl version is v5.10.1Module 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.013So, 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
On 15 September 2015 at 16:59, <Johan.Grotherus at vattenfall.com> 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.
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
From: Jeremy Laidman [mailto:jlaidman at rebel-it.com.au] 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, <Johan.Grotherus at vattenfall.com<mailto:Johan.Grotherus at vattenfall.com>> 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.
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.
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Jeremy Laidman Sent: Wednesday, September 16, 2015 2:38 AM To: Johan.Grotherus at vattenfall.com Cc: xymon at xymon.com Subject: Re: [Xymon] Oracle monitoring with dbcheck fails
On 15 September 2015 at 16:59, <Johan.Grotherus at vattenfall.com<mailto:Johan.Grotherus at vattenfall.com>> 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.
participants (5)
-
abs@shadymint.com
-
jlaidman@rebel-it.com.au
-
Johan.Grotherus@vattenfall.com
-
Paul.Root@CenturyLink.com
-
Phil.Crooker@orix.com.au