check_esx3-0.5.pl ... undefined symbol error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dstone
Posts: 6
Joined: Fri Apr 27, 2012 12:18 pm
Location: lost in Mississippi

check_esx3-0.5.pl ... undefined symbol error

Post by dstone »

getting the below "undefined symbol error" on newly upgraded OS/PERL (see below for revs)... runs fine on old OS/PERL (see below for revs)... any suggestions? .... i removed the IP and user/password info for this post............ thanks, don


### ERROR MESSAGE ###
root@nagios:/usr/local/nagios/libexec# ./check_esx3-0.5.pl -D <ip address> -u 'testuser\nagios' -p 'password' -H <ip address -l cpu -s usage -w 80 -c 90
/usr/bin/perl: symbol lookup error: /usr/lib/perl/5.14/auto/Crypt/SSLeay/SSLeay.so: undefined symbol: Perl_Gthr_key_ptr
root@nagios:/usr/local/nagios/libexec#


### NEW OS and PERL ###
root@nagios:/usr/local/nagios/libexec# uname -a
Linux nagios 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

root@nagios:/usr/local/nagios/libexec# perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi


### OLD OS and PERL ###
root@oldnagios:/usr/local/nagios/libexec# uname -a
Linux oldnagios 2.6.32-32-server #62-Ubuntu SMP Wed Apr 20 22:07:43 UTC 2011 x86_64 GNU/Linux

root@oldnagios:/usr/local/nagios/libexec# perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: check_esx3-0.5.pl ... undefined symbol error

Post by jsmurphy »

You are either missing the perl package Crypt::SSLeay package on your new server or you have a different incompatible version of it: http://search.cpan.org/~nanis/Crypt-SSL ... /SSLeay.pm

As long as it has internet access you can run the following to download and install it if it is missing: cpan Crypt::SSLeay

You can use the following one-liner to determine what version of the package you have on each:

Code: Select all

 perl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' | grep Crypt
It's also possible you are messing an OS dependency package... I can't remember what it's called exactly, something like libcrypt-devel.
dstone
Posts: 6
Joined: Fri Apr 27, 2012 12:18 pm
Location: lost in Mississippi

Re: check_esx3-0.5.pl ... undefined symbol error

Post by dstone »

ok, you nailed it, thank you so much....... fyi, after i got passed that, i got another error (below), but found a blog about inserting a line in the perl script, which fixed it.....so all is well, thanks again.


ERROR MSG
root@nagios:/usr/local/nagios/libexec# ./check_esx3-0.5.pl -D <ip address> -u 'testuser\nagios' -p 'password' -H <ip address> -l cpu -s usage -w 80 -c 90
CHECK_ESX.PL CRITICAL - Server version unavailable at 'https://172.18.18.120:443/sdk/vimService.wsdl' at /usr/share/perl/5.14/VMware/VICommon.pm line 545.


NEW LINE ADDED IN PERL SCRIPT
use Nagios::Plugin;
use File::Basename;
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; <<<-------------- MUST BE AFTER "use File::Basename;"
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: check_esx3-0.5.pl ... undefined symbol error

Post by jsmurphy »

Glad you found the solution :D... I ran into the exact same error (having to set that environment variable) with the VMware plugin.
Locked