Free Server Performance Monitoring


 XORUX

Perl HTTPS support

If you get errors like
  • Missing LWP::Protocol::https
  • Connection reset by peer
  • SSL negotiation failed
  • Server version unavailable at 'https...
  • SOAP request error - possibly a protocol issue ...
then follow this docu, follow your platform where is running your LPAR2RRD server

AIX

  • These 2 packages are mandatory!
    # rpm -qa | egrep -i "Crypt-SSLeay|Net_SSLeay"
      perl-Crypt-SSLeay-0.57-2
      perl-Net_SSLeay.pm-1.55-3
    
  • Assure you use this PERL setting in /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg
    PERL=/opt/freeware/bin/perl
    
  • Assure that /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi and /opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi are included in PERL5LIB path like below (same possition, in front of /usr/opt/perl5/lib/site_perl/5.10.1/aix-thread-multi)
    . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg
    echo $PERL5LIB
      PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi:/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.8.8:/usr/opt/perl5/lib/site_perl/5.10.1/aix-thread-multi:/opt/freeware/lib/perl/5.8.8:/home/lpar2rrd/lpar2rrd/lib
    
  • In case of VMware usage, there must be /home/lpar2rrd/lpar2rrd/vmware-lib in PERL5LIB on the second possition right behind /home/lpar2rrd/lpar2rrd/bin
    . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg
    echo $PERL5LIB
      PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib:/opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi:/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.8.8:/usr/opt/perl5/lib/site_perl/5.10.1/aix-thread-multi:/opt/freeware/lib/perl/5.8.8:/home/lpar2rrd/lpar2rrd/lib
    
  • Verify it, it must show 6.x version.
    # su - lpar2rrd 
    . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg
    $PERL -MLWP -e 'use LWP::Protocol::https; print "LWP Version: $LWP::VERSION\n"'
      LWP Version: 6.06
    
  • Assure there it does not print any http/https module missing
    cd /home/lpar2rrd/lpar2rrd
    . etc/lpar2rrd.cfg
    $PERL bin/perl_modules_check.pl
    
  • VMware vCenter v6.7+
    When you use VMware and LWP still shows 5.x then you must upgrade VMware Perl SDK to 6.7.
    Download VMware Perl SDK 6.7.
    Place it into /tmp
    Then under lpar2rrd user
    cd /home/lpar2rrd/lpar2rrd
    rm -r vmware-lib
    ./bin/vmware_install.sh /tmp
    ...
    
    perl /home/lpar2rrd/lpar2rrd/vmware-lib/apps/connect.pl --version
      vSphere SDK for Perl version: 6.7.0
    
    . etc/lpar2rrd.cfg
    $PERL -MLWP -e 'use LWP::Protocol::https; print "LWP Version: $LWP::VERSION\n"'
      LWP Version: 6.06
    
    When you still get this error during connection testing:
    cd /home/lpar2rrd/lpar2rrd
    . etc/lpar2rrd.cfg
    $PERL vmware-lib/apps/connect.pl --server  --username "lpar2rrd@your_domain" --password "XXXXX"
      Server version unavailable at 'https://:443/sdk/vimService.wsdl' at /home/lpar2rrd/lpar2rrd/vmware-lib/apps/../VMware/VICommon.pm line 704.
    
    Remove OpenSSL package installed as RRDTool dependency, it is not needed,
    System OpenSSL still persits there (lslpp -L | grep -i openssl)

    Place proper version in below cmd, run it under root:
    rpm -qa | grep -i openssl
      openssl-1.0.1l-1
    rpm -e openssl-1.0.1l-1 --nodeps
    
    Then it will work, try this (place right vCenter name, user name and password)
    cd /home/lpar2rrd/lpar2rrd
    . etc/lpar2rrd.cfg
    $PERL vmware-lib/apps/connect.pl --server  --username "lpar2rrd@your_domain" --password "XXXXX"
      Connection Successful
      Server Time : 2016-02-25T16:28:44.086369Z
    

Linux

  • Install
    # yum install perl-LWP-Protocol-https 
    
  • Check:
    # rpm -qa | egrep "perl-LWP-Protocol-https|perl-Mozilla-CA|perl-Crypt-SSLeay"
      perl-Mozilla-CA-20130114-5.el7.noarch
      perl-LWP-Protocol-https-6.04-4.el7.noarch
      perl-Crypt-SSLeay-0.64-5.el7.x86_64
    
  • RHEL6/CentOS6:
    The perl-LWP-Protocol-https package is only provided in RHEL 7, but the same name module /usr/share/perl5/vendor_perl/LWP/Protocol/https.pm is provided by perl-libwww-perl package which is available in RHEL 6
    # yum install perl-libwww-perl
    
  • In case of VMware usage, there must be /home/lpar2rrd/lpar2rrd/vmware-lib in PERL5LIB on the second possition right behind /home/lpar2rrd/lpar2rrd/bin
    . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg
    echo $PERL5LIB
      PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib:/usr/share/perl5/vendor_perl:/usr/lib64/perl5/vendor_perl:/usr/share/perl5:/home/lpar2rrd/lpar2rrd/lib
    
  • Verify it, it must show 6.x version.
    # su - lpar2rrd
    . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg
    $PERL -MLWP -e 'use LWP::Protocol::https; print "LWP Version: $LWP::VERSION\n"'
      LWP Version: 6.06
    
    VMware: if you have installed older VMware Perl SDK 6.5 or 6.0, then LWP version cmd above shows "LWP Version: 5.837" or even 5.805.
    It is also fine.

  • VMware vCenter 6.7+
    When you use VMware and LWP still shows 5.x then you must upgrade VMware Perl SDK to 6.7.
    Download VMware Perl SDK 6.7.
    Place it into /tmp
    Then under lpar2rrd user
    cd /home/lpar2rrd/lpar2rrd
    rm -r vmware-lib
    ./bin/vmware_install.sh /tmp
    ...
    
    perl /home/lpar2rrd/lpar2rrd/vmware-lib/apps/connect.pl --version
      vSphere SDK for Perl version: 6.7.0
    
    . etc/lpar2rrd.cfg
    $PERL -MLWP -e 'use LWP::Protocol::https; print "LWP Version: $LWP::VERSION\n"'
      LWP Version: 6.06
    
    Test connection manually:
    cd /home/lpar2rrd/lpar2rrd
    . etc/lpar2rrd.cfg
    $PERL vmware-lib/apps/connect.pl --server  --username "lpar2rrd@your_domain" --password "XXXXX"
      Connection Successful
      Server Time : 2016-02-25T16:28:44.086369Z
    
  • Assure there it does not print any http/https module missing
    cd /home/lpar2rrd/lpar2rrd
    . etc/lpar2rrd.cfg
    $PERL bin/perl_modules_check.pl
    

Linux Debian (Ubuntu, Mint), Docker

  • Install
    Note that liblwp-protocol-https-perl must be exactly at version 6.04-2!
    Other available versions like actually default stable 6.06-2, or 6.02-1 and 6.07-2 have a bug which prevents working it with the latest HMC (9+) and vCenter (6.7+) versions.
    Only Debian based Linux distributions are affected.
    # apt-get install liblwp-protocol-https-perl=6.04-2 libcrypt-ssleay-perl libio-socket-ssl-perl libmozilla-ldap-perl
    
    If you do not have access to the internet then get it from liblwp-protocol-https-perl 6.04-2

  • Check:
    # dpkg --list liblwp-protocol-https-perl libcrypt-ssleay-perl libio-socket-ssl-perl libmozilla-ldap-perl
      ||/ Name                       Version        Architecture Description
      +++-==========================-==============-======-================================================================
      ii  liblwp-protocol-https-perl 6.04-2         all    HTTPS driver for LWP::UserAgent
      ii  libcrypt-ssleay-perl       0.58-1build1   amd64  OpenSSL support for LWP
      ii  libio-socket-ssl-perl      1.965-1ubuntu1 all    Perl module implementing object oriented interface to SSL sockets
      ii  libmozilla-ldap-perl       1.5.3-1build1  amd64  LDAP Perl module for the OpenLDAP C SDK
    
  • Prevent updating it in operating system
    # apt-mark hold liblwp-protocol-https-perl
      liblwp-protocol-https-perl set on hold.
    
  • Verify it, it must show 6.04-2 version.
    # su - stor2rrd (lpar2rrd if you are on the appliance)
    . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg
    $PERL -MLWP -e 'use LWP::Protocol::https; print "LWP Version: $LWP::VERSION\n"'
      LWP Version: 6.04-2
    
    VMware: if you have installed older VMware Perl SDK 6.5 or 6.0, then LWP version cmd above shows "LWP Version: 5.837" or even 5.805.
    It is also fine.

  • Assure there it does not print any http/https module missing
    cd /home/lpar2rrd/lpar2rrd
    . etc/lpar2rrd.cfg
    $PERL bin/perl_modules_check.pl