You are here

downgrade perl Net::HTTP (read esx/vSphere values)

3 posts / 0 new
Last post
pru's picture
downgrade perl Net::HTTP (read esx/vSphere values)

Suggestion for bugfix:

Deploy Version 6.03 of perl module Net-HTTP with your product.


original message from "How Do I ...?" forum

long intro, press PageDown to skip (question at the end of the post)



i would like to read some values from a esx host.

when i exexcute this on the console

 /usr/local/nagios/libexec/ -H -N "SULFUR" -u "monitoring" -p "mypassword" -l cpu -s wait --no-certificate-checking



i takes about boring 3-4 minutes until the answer reachs me. The answer includes an error as well:

CHECK_VMWARE_API.PL CRITICAL - SOAP request error - possibly a protocol issue

this issue is long discussed in the net and the usual solution is to downgrade the perl module Net-HTTP and somtimes the libwww-perl as well.


when i tried to downgrade, i made the mistake to use the root user to start the console

perl -MCPAN -e shell

and install with
install GAAS/Net-HTTP-6.03.tar.gz
install GAAS/libwww-perl-6.03.tar.gz

(or even lower versions)

now i figured out i have to do this with the nagios user, but then i have maybe not enough rights?

cpan[1]> i /libwww-perl/
CPAN: Storable loaded ok (v2.35)
Reading '/var/log/nagios/.cpan/Metadata'
  Database was generated on Thu, 14 Nov 2013 09:29:02 GMT
Distribution    GAAS/libwww-perl-5.837.tar.gz
Distribution    GAAS/libwww-perl-6.01.tar.gz
Distribution    GAAS/libwww-perl-6.05.tar.gz
Author          LWWWP ("The libwww-perl mailing list" <>)
4 items found

cpan[2]> install GAAS/libwww-perl-5.837.tar.gz

Cannot create directory /root/.cpan/prefs



how can i update the perl modules, used by nagios user and opsview?

pru's picture
Re: downgrade perl Net::HTTP (read esx/vSphere values)

i solved the problem with deleting the original opsview modules and symlink to the perl modules in /usr/local/share/perl/5.10.1/


see solution from rvdigital (17 April 2013)


here is what i did (on the preinstalled opsview vmware applicance)

installed modules as root (see prev post) and symlinked to them:


#install zip (for non tar.gz robots)
apt-get zip

#backup originals
root@opsview-appliance:/opt/opsview/perl/lib/perl5# zip -r ./LWP
root@opsview-appliance:/opt/opsview/perl/lib/perl5/Net# zip -r ./HTTP

#delete originals
rm .rf HTTP
rm -rf LWP
and so on

# create sym
root@opsview-appliance:/opt/opsview/perl/lib/perl5# ln -s /usr/local/share/perl/5.10.1/
root@opsview-appliance:/opt/opsview/perl/lib/perl5/Net# ln -s /usr/local/share/perl/5.10.1/Net/ ./
root@opsview-appliance:/opt/opsview/perl/lib/perl5/Net# ln -s /usr/local/share/perl/5.10.1/Net/HTTP ./HTTP



now, when i check the version (as nagios user), i have the correct 6.03

nagios@opsview-appliance:/opt/opsview/perl/lib/perl5$ cpan -D Net::HTTP
CPAN: Storable loaded ok (v2.35)
Reading '/var/log/nagios/.cpan/Metadata'
  Database was generated on Thu, 14 Nov 2013 09:29:02 GMT
        (no description)
        Installed: 6.03
        CPAN:      6.06  Not up to date
        Gisle Aas (GAAS)

so i takes now 1 seconds instead of 3-4 minutes to run  CHECK_VMWARE_API.PL and i get the OK now!


--> opsview please deploy Version 6.03 with your product!


tvoon's picture
Re: downgrade perl Net::HTTP (read esx/vSphere values)


Thanks for the reports.

We will look into this. I'm not keen on downgrading core perl plugins so we need to see if there is a different solution.