AIX Open Source

 View Only
Expand all | Collapse all

lpar2rrd not working after updating rrdtool and Perl

  • 1.  lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Wed September 07, 2022 02:11 AM
    Dear Team,

    yesterday I've updated to the newest toolbox rpms for perl and rrdtool. Since then lpar2rrd is not working anymore.
    Using /usr/bin/perl I get following error:

     ./load.sh 2>&1 | tee logs/load.out-initial
    Can't load '/usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: Could not load module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so.
            Dependent module libexpat.a(libexpat.so.1) could not be loaded.
    Could not load module libexpat.a(libexpat.so.1).
    System error: No such file or directory
    Could not load module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so.
            Dependent module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so could not be loaded. at /usr/opt/perl5/lib/5.28.1/aix-thread-multi/DynaLoader.pm line 193.
     at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 18.
    Compilation failed in require at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 18.
    BEGIN failed--compilation aborted at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 22.
    Compilation failed in require.
    BEGIN failed--compilation aborted.​

    Using /opt/freeware/bin/perl looks like this:

    ./load.sh 2>&1 | tee logs/load.out-initial
    Expat.c: loadable library and perl binaries are mismatched (got handshake key 8700080, needed 9600080)
    VMware         : not identified, no credentials
    jobs -l vmware :
    installing WWW : install-html.sh vmware
    Host identif   : AIX
    timestamp      : Wed Sep  7 08:09:16 CEST 2022
    Updating       : start updating rrdfiles with vcenter data in background
    Menu           : no menu refresh for vmware
    date end all VM: Wed Sep  7 08:09:16 CEST 2022
    SSLeay.c: loadable library and perl binaries are mismatched (got handshake key 8700080, needed 9600080)
    SSLeay.c: loadable library and perl binaries are mismatched (got handshake key 8700080, needed 9600080)
    SSLeay.c: loadable library and perl binaries are mismatched (got handshake key 8700080, needed 9600080)
    ​


    It seems that there is no XML/Parser.pl for the new version...

    Any clue what I can do?

    best regards,

    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------


  • 2.  RE: lpar2rrd not working after updating rrdtool and Perl

    Posted Wed September 07, 2022 09:56 AM
    install the required perl modules for the new perl version? this is is what i have to do after perl upgrade to make lpar2rrd work again.

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 3.  RE: lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Wed September 07, 2022 10:07 AM

    Hi C- -T,

    sounds good... but what modules and where do I get it from? I'm not familiar  with perl...

    This is install at my system:

    svrsrrd-1:/root#rpm -qa | grep perl
    perl-Crypt-SSLeay-0.57-2.ppc
    rrdtool-perl-1.7.2-2.ppc
    mod_perl-2.0.11-3.ppc
    perl-Net_SSLeay.pm-1.55-3.ppc
    perl-5.34.1-1.ppc

    best regards,

    Jörg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 4.  RE: lpar2rrd not working after updating rrdtool and Perl

    Posted Wed September 07, 2022 11:20 AM
    i would recommend using cpanminus to install perl modules, easy as could be. cpanminus needs to be isntalled first of course.

    curl -L https://cpanmin.us | /opt/freeware/bin/perl - --sudo App::cpanminus​


    on to modules install:

    /opt/freeware/bin/cpanm  --notest --reinstall  TimeDate XML::Simple XML::Parser URI XML::SAX XML::LibXML XML::SAX::Base XML::NamespaceSupport \
                                                   Crypt::SSLeay Net::SSLeay PDF::API2 Compress::Raw::Zlib​


    then check with lpar2rrd module check script

    "run the following as the lpar2rdd user in the lpar2rrd install dir"
    . etc/lpar2rrd.cfg; $PERL bin/perl_modules_check.pl
    


    this whole stuff needs internet access!

    help on lpar2rrd configuration is available on their homepage via premium support...insert coins!



    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 5.  RE: lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Thu September 08, 2022 04:51 AM
    Hi C- -T,

    thanks for the commands...
    Unfortunately it's not working:

    Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7046.tar.gz
    -> OK
    Unpacking App-cpanminus-1.7046.tar.gz
    Entering App-cpanminus-1.7046
    Checking configure dependencies from META.json
    Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.62)
    Configuring App-cpanminus-1.7046
    Running Makefile.PL
    Checking if your kit is complete...
    Looks good
    Generating a Unix-style Makefile
    Writing Makefile for App::cpanminus
    Writing MYMETA.yml and MYMETA.json
    -> OK
    Checking dependencies from MYMETA.json ...
    Checking if you have Test::More 0 ... Yes (1.302183)
    Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.62)
    Building and testing App-cpanminus-1.7046
    cp lib/App/cpanminus.pm blib/lib/App/cpanminus.pm
    cp lib/App/cpanminus/fatscript.pm blib/lib/App/cpanminus/fatscript.pm
            cp bin/cpanm blib/script/cpanm
            "/opt/freeware/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/cpanm
    Manifying 1 pod document
    Manifying 2 pod documents
            PERL_DL_NONLAZY=1 "/opt/freeware/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    # App::cpanminus/1.7046
    t/happy_cpantesters.t .. ok
    All tests successful.
    Files=1, Tests=1,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.02 cusr  0.00 csys =  0.03 CPU)
    Result: PASS
    true: not found
    
    make: The error code from the last command is 1.
    
    
    Stop.
    -> FAIL Installing App::cpanminus failed. See /root/.cpanm/work/1662626818.20578742/build.log for details. Retry with --force to force install it.​


    Maybe you have a solution for that too...???

    Many thanks in advance.

    best regards,

    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 6.  RE: lpar2rrd not working after updating rrdtool and Perl

    Posted Thu September 08, 2022 04:59 AM
    See /root/.cpanm/work/1662626818.20578742/build.log for details.​


    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 7.  RE: lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Thu September 08, 2022 07:33 AM

    not really more information there... :-)

    All tests successful.
    Files=1, Tests=1,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.02 cusr  0.00 csys =  0.03 CPU)
    Result: PASS
    true: not found
    
    make: The error code from the last command is 1.
    
    
    Stop.
    -> FAIL Installing App::cpanminus failed. See /root/.cpanm/work/1662636700.18481636/build.log for details. Retry with --force to force install it.
    



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 8.  RE: lpar2rrd not working after updating rrdtool and Perl

    Posted Thu September 08, 2022 03:15 AM
    Edited by Stephan Dietl Thu September 08, 2022 03:17 AM

    Hello @Joerg Kauke !

    Regarding the "Expat.so" error:

    Do you have expat from the AIX Toolbox installed? Your output only showed RPMs with "perl" grepped.

    My system shows:

    # find /usr -name "*Expat.so*"
    /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so
    /usr/opt/perl5/lib64/site_perl/5.28.1/aix-thread-multi-64all/auto/XML/Parser/Expat/Expat.so

    # lslpp -w /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so
    File Fileset Type
    ----------------------------------------------------------------------------
    /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so
    perl.rte File

    # lslpp -w /usr/opt/perl5/lib64/site_perl/5.28.1/aix-thread-multi-64all/auto/XML/Parser/Expat/Expat.so
    File Fileset Type
    ----------------------------------------------------------------------------
    /usr/opt/perl5/lib64/site_perl/5.28.1/aix-thread-multi-64all/auto/XML/Parser/Expat/Expat.so
    perl.rte File

    # lslpp -L perl.rte
    Fileset Level State Type Description (Uninstaller)
    ----------------------------------------------------------------------------
    perl.rte 5.28.1.4 C F Perl Version 5 Runtime Environment

    # rpm -qa|grep -i expat
    expat-2.4.6-1.ppc

    # rpm -ql expat
    /opt/freeware/bin/xmlwf
    /opt/freeware/bin/xmlwf_32
    /opt/freeware/bin/xmlwf_64
    /opt/freeware/doc/expat-2.4.6
    /opt/freeware/doc/expat-2.4.6/COPYING
    /opt/freeware/lib/libexpat.a
    /opt/freeware/lib64/libexpat.a
    /opt/freeware/share/man/man1/xmlwf.1

    # ar -t /opt/freeware/lib64/libexpat.a

    # ar -t /opt/freeware/lib/libexpat.a
    libexpat.so.1
    libexpat.so.0

    HTH,

    Ciao,

    Steve



    ------------------------------
    Stephan Dietl
    ------------------------------



  • 9.  RE: lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Thu September 08, 2022 04:34 AM
    Hello Steve,

    thanks for pointing out...
    Yes expat is installed from the toolbox:

    svrsrrd-1:/root#rpm -qa | grep expat
    expat-devel-2.4.6-1.ppc
    expat-2.4.6-1.ppc​

    And its also available from the lpp source:

    svrsrrd-1:/root#lslpp -w /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so
      File                                        Fileset               Type
      ----------------------------------------------------------------------------
      /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so
                                                        perl.rte        File​


    Unfortunately for backward compatibility I need to use the 32-bit versions of rrd and perl.

    regards,

    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 10.  RE: lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Thu September 08, 2022 10:47 AM
    Edited by Martin Boban Thu September 08, 2022 10:49 AM
    Hi Joerg,

    can you grep and list here variable PERL5LIB from /install_dir/lpar2rrd/etc/lpar2rrd.cfg and content of /opt/freeware/lib/perl5/ ? I except you will have more than one perl and you need to use latest one in lpar2rrd.cfg.

    I believe when you updated rpms, newer version of perl was installed and you need to reflect that in lpar2rrd.cfg variable PERL5LIB. This is how it looks in my config

    PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib:/home/lpar2rrd/lpar2rrd/lib:/opt/freeware/lib/perl5/5.34/vendor_perl:/opt/freeware/lib64/perl5/5.34/vendor_perl

    Hope that helps. 

    Martin

    ------------------------------
    Martin Boban
    ------------------------------



  • 11.  RE: lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Fri September 09, 2022 03:17 AM

    Hi Martin,
    yes, there are two verions of Perl. First I tried to use the Toolbox version, but that didn't work at all.
    LPAR2RRD is working now with following settings (setting the LIBPATH variable was the solution here), but still shows a lot of errors... 

    LPAR2RRD Support is working on it, I don't know if there is a solution for that.

    # Path to RRDTool binary
      RRDTOOL=/opt/freeware/bin/rrdtool_32

    # Perl binary
      PERL=/usr/bin/perl

    # Lib path
      LIBPATH=/opt/freeware/lib

    # Perl path for searching modules, it must containg path to RRDp.pm module, usually it is all discovered automatically
    PERL5LIB=/opt/lpar2rrd/lpar2rrd/bin:/opt/lpar2rrd/lpar2rrd/vmware-lib:/usr/opt/perl5/lib/site_perl/5.28.1:/usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi:/usr/opt/perl5/lib/5.28.1:/usr/opt/perl5/lib/5.28.1/aix-thread-multi:/opt/lpar2rrd/lpar2rrd/lib:/opt/freeware/lib/perl5/5.34/vendor_perl


    Many thanks for your help...



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 12.  RE: lpar2rrd not working after updating rrdtool and Perl

    Posted Mon September 12, 2022 09:20 AM
    Joerg,

    I recently did a perl conversion from the original LPAR2RRD version of perl to the AIX Toolbox version of perl. Here are the steps I ended up taking to make it work:

    1. Stop LPAR2RRD (./load.sh daemon_stop) and comment out the load and health checks in the LPAR2RRD crontab.
    2. Uninstall (yum erase) the following:
    • perl.ppc                                   5.8.8-2           @/perl-5.8.8-2.aix5.1.ppc
    • perl-Compress-Raw-Zlib.ppc                 2.020-1           @/perl-Compress-Raw-Zlib-2.020-1.aix5.1.ppc
    • perl-DBI.ppc                               1.623-1           @/perl-DBI-1.623-1.aix5.1.ppc
    • perl-TimeDate.noarch                       1.20-1            @/perl-TimeDate-1.20-1.aix5.1.noarch
    • perl-URI.noarch                            1.58-1            @/perl-URI-1.58-1.aix5.1.noarch
    • perl-XML-LibXML.ppc                        2.0012-1          @/perl-XML-LibXML-2.0012-1.aix5.1.ppc
    • perl-XML-NamespaceSupport.noarch           1.11-1            @/perl-XML-NamespaceSupport-1.11-1.aix5.1.noarch
    • perl-XML-Parser.ppc                        2.41-1            @/perl-XML-Parser-2.41-1.aix5.1.ppc
    • perl-XML-SAX.noarch                        0.99-1            @/perl-XML-SAX-0.99-1.aix5.1.noarch
    • perl-XML-SAX-Base.noarch                   1.08-1            @/perl-XML-SAX-Base-1.08-1.aix5.1.noarch
    • perl-XML-Simple.noarch                     2.18-1            @/perl-XML-Simple-2.18-1.aix5.1.noarch
    1. Install the following from the AIX Toolbox
    • perl.ppc                                   1:5.30.3-2        @AIX_Toolbox
    1. Update the PERL5LIB and PERL statements in the lpar2rrd.cfg file to (you can get these from the lpar2rrd.cfg file on entlrrdd01):
    • PERL=/opt/freeware/bin/perl_32
    • PERL5LIB=/var/lpar2rrd/lpar2rrd/bin:/var/lpar2rrd/lpar2rrd/vmware-lib:/opt/freeware/lib/perl5/vendor_perl/5.30:/usr/opt/perl5/lib/site_perl/5.30:/usr/opt/perl5/lib/site_perl/5.30/aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.30/aix-thread-multi:/usr/opt/perl5/lib/5.30:/usr/opt/perl5/lib/5.30/aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.30:/opt/freeware/lib/perl5/5.30/vendor_perl:/var/lpar2rrd/lpar2rrd/lib:/opt/freeware/lib/perl5/site_perl/5.22.0/ppc-aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.28.1:/usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML
    1. Uninstall (yum erase) the libpng package. This will also erase rrdtool, rrdtool_perl, cairo, and pango. This is necessary because the version installed has an epoch number that doesn't allow for yum or rpm updates.
    2. Load the latest libpng package (1.6.27-3) from the AIX Toolbox
    3. Reinstall the cairo and pango packages from the AIX Toolbox
    4. Install the latest version of rrdtool (1.7.0.8) and rrdtool_perl (1.7.0.8) from the AIX Toolbox.
    5. Update the freetype2 package to the latest level (2.10.4-1)
    6. Change the RRDTOOL entry in the lpar2rrd.cfg file to the following:
    • RRDTOOL=/opt/freeware/bin/rrdtool_32
    1. Run the ./load.sh and check for errors.
    2. If no errors are found, run the following commands as the lpar2rrd user to assure that all the LPAR2RRD components, including the OS agent data processing , are using the the 32bit resources:
    • ./load.sh daemon_stop
    • ./load.sh daemon_start
    1. Re-enable the lpar2rrd crontab entries that do the hourly loads and periodic health checks.
    2. Monitor web interface over the next several hours to make sure that the graphs are updating properly.

     

    This process will allow for the following packages to be updated to the latest level:

    • perl.ppc 1.5.30.3-2
    • rrdtool 1.7.0-8
    • rrdtool_perl 1.7.0-8
    • libpng 1.6.27-3
    • freetype2 2.10.4-1

     

    The root cause for the rrdtool packages causing lpar2rrd not to work was that starting in rrdtool 1.7.0-6, rrdtool began to run as 64bit as its default setting. LPAR2RRD is built to run as 32bit, so both the PERL and RRDTOOL configurations in the lpar2rrd.cfg file must be manually set to run as 32bit. Additionally, the daemons have to be bounced after the conversion is complete to force the OS agent data pointers to use the 32bit configuration so that that data can be graphed.

    Also, when you update perl, you need to change all the references in the lpar2rrd.cfg file.

    I hope this helps.



    ------------------------------
    Keith Barth
    ------------------------------



  • 13.  RE: lpar2rrd not working after updating rrdtool and Perl

    IBM Champion
    Posted Mon September 12, 2022 09:41 AM
    Hello Keith,

    many thanks for your detailed instruction. I will definitely try it out...

    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 14.  RE: lpar2rrd not working after updating rrdtool and Perl

    Posted Tue September 13, 2022 01:09 AM
    Hi Jorg,

    from some reason it requires: export LIBPATH=/opt/freeware/lib to prefere /opt/freeware/lib/libexpat.a library, no other way

    put it into $LPAR2RRD_HOME/etc/.magic to persists lpar2rrd upgrades, it should resolve it, we have tested it at su and even with someone sle

    etc/lpar2rrd.cfg:
    PERL=/usr/bin/perl


    both below works, use one of them, depends on your perl version
    PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/lib:/usr/opt/perl5/lib/site_perl/5.20.1:/usr/opt/perl5/lib/site_perl/5.20.1/aix-thread-multi:/usr/opt/perl5/lib/site_perl//5.20.1:/usr/opt/perl5/lib
    /site_perl//5.20.1/aix-thread-multi:/usr/opt/perl5/lib/5.20.1:/usr/opt/perl5/lib/5.20.1/aix-thread-multi:/opt/freeware/lib/perl5/5.30/vendor_perl

    PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib:/usr/opt/perl5/lib/5.28.1:/usr/opt/perl5/lib/5.28.1/aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.28.1:/opt/freeware/lib/perl5/vendor_perl/5.8.8:/usr/opt/perl5/lib/site_perl/5.20.1:/home/lpar2rrd/lpar2rrd/lib:/opt/freeware/lib/perl5/site_perl/5.28.1/ppc-aix-thread-multi:/opt/freeware/lib/perl5/site_perl/5.22.0/ppc-aix-thread-multi:/opt/freeware/lib/perl5/5.34/vendor_perl:/home/lpar2rrd/lpar2rrd/lib


    Contact us directly as you usually do, this is not our official support channel.

    Pavel
    LPAR2RRD support






    ------------------------------
    Pavel Hampl
    ------------------------------