1 2 Previous Next 19 Replies Latest reply on Oct 23, 2009 2:08 PM by Vinnie Lima

    Linux Patch Analysis - XML::Parser not found

    Vinnie Lima

      Trying to track down why is the nsh-ran linuxpc.pl perl script can't find XML::Parser. This is the default job setup when you load VPC.


      The required module is installed (emda-nbp-uea21 is the app server):


      emda-nbp-uea21% nexec -e which perl


      I wrote a quick perl script that uses the first few lines of the linuxpc.pl perl script used by the job, and I don't get the error:



      # copyright 2006 BladeLogic, Inc. All rights reserved.


      use strict;
      use Time::localtime;
      use FileHandle;
      use Getopt::Std;
      use Cwd;
      use XML::Parser;


      use Data::Dumper;


      print "BLAH\n" ;



      And the execution:


      emda-nbp-uea21% nexec -e perl test.pl


      emda-nbp-uea21% nexec -e ./test.pl



      I'm lost why the following errors occur:


      Can't locate XML/Parser.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /opt/bmc/bcas/tmp/application_server/scripts/job__e29b5c7d-e0db-4a03-a4e7-f493ca1609b7/script_DBKey-SJobKey-3-4__c8e136d6-2eac-48a4-8d09-f8b4d53281ae.1.1_linuxpc.pl line 11.


      BEGIN failed--compilation aborted at /opt/bmc/bcas/tmp/application_server/scripts/job__0845cd7e-728d-4c4f-a8a6-6bb71cc2c7ed/script_DBKey-SJobKey-3-4__6a8f172e-47e5-46ad-a86b-cf2174fb0f99.1.1_linuxpc.pl line 11.

        • 1. Re: Linux Patch Analysis - XML::Parser not found

          The nsh path may be missing the path to the perl libraries. Compare PATH in bash to nsh



          Adam Bowen



          • 2. Re: Linux Patch Analysis - XML::Parser not found
            Bill Robinson

            Also, for your application server(s) is the perl config setup correctly (in blasadmin) ?

            • 3. Re: Linux Patch Analysis - XML::Parser not found
              Vinnie Lima

              I haven't tinkered with blsadmin to manipulate the path for perl.  I would expect any perl script ran via nsh (through nexec -e) would leverage the perl binary identified in the beginning of the script e.g.  /usr/bin/perl


              That perl binary is compiled to always search in specific locations, which contains the perl module.  When I run the script natively in the app server, it works.  When I run it from an NSH session on the app server via nexec -e, it works.


              Also - can't find any documentation indicating that when installing VPC, you need to tinker with blsadmin.  Did I miss it?


              Let me know what I need to modify and I can test.



              • 4. Re: Linux Patch Analysis - XML::Parser not found
                Bill Robinson

                I don't think it does if its setup as a nsh/perl script in the gui

                • 6. Re: Linux Patch Analysis - XML::Parser not found
                  Bill Robinson

                  What does 'blasadmin -a show perl all' show?

                  • 7. Re: Linux Patch Analysis - XML::Parser not found
                    Vinnie Lima

                    [root@emda-nbp-uea21 bin]# ./blasadmin -a show perl all
                    [root@emda-nbp-uea21 bin]#
                    [root@emda-nbp-uea21 bin]# /usr/bin/perl -v


                    This is perl, v5.8.8 built for x86_64-linux-thread-multi

                    • 8. Re: Linux Patch Analysis - XML::Parser not found

                      What has support said about this?



                      Adam Bowen

                      • 9. Re: Linux Patch Analysis - XML::Parser not found
                        Vinnie Lima

                        Nothing yet - was looking if anyone had a quick fix on this one before I opened a ticket.


                        Bill - when you first installed this for us in august, you must have run into this issue?



                        • 10. Re: Linux Patch Analysis - XML::Parser not found
                          Bill Robinson

                          can you do an ' rpm -qi | grep XML '


                          I'm wondering if you have the 32 and the 64 bit version of the module installed, and which perl you are running when you run it from the command line.  from the output of the job it looks like it's looking for a 64bit version of the module.


                          I didn't run into this when I was there, though the VPC had already been installed.

                          • 11. Re: Linux Patch Analysis - XML::Parser not found
                            Vinnie Lima

                            The syntax you have above doesnt work.  Is this what you are after?



                            [root@emda-nbp-uea21 ~]# rpm -qa | grep XML


                            [root@emda-nbp-uea21 ~]# rpm -qi perl-XML-Parser-2.34-5
                            Name        : perl-XML-Parser              Relocations: (not relocatable)
                            Version     : 2.34                              Vendor: Red Hat, Inc.
                            Release     : 5                             Build Date: Sun 08 Aug 2004 06:32:52                                                                              PM EDT
                            Install Date: Wed 09 Sep 2009 04:07:54 PM EDT      Build Host: dolly.build.redha                                                                             t.com
                            Group       : Applications/CPAN             Source RPM: perl-XML-Parser-2.34-5.s                                                                             rc.rpm
                            Size        : 456782                           License: distributable
                            Signature   : DSA/SHA1, Wed 05 Jan 2005 06:33:01 PM EST, Key ID 219180cddb42a60e
                            Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
                            URL         : http://search.cpan.org/search?query=XML%3A%3AParser
                            Summary     : A low level Perl module for parsing XML either via trees or stream                                                                             ing
                            Description :
                            This module provides ways to parse XML documents. It is built on top
                            of XML::Parser::Expat, which is a lower level interface to James
                            Clark's expat library. Each call to one of the parsing methods creates
                            a new instance of XML::Parser::Expat which is then used to parse the
                            document. Expat options may be provided when the XML::Parser object is
                            created. These options are then passed on to the Expat object on each
                            parse call. They can also be given as extra arguments to the parse
                            methods, in which case they override options given at XML::Parser
                            creation time.

                            • 12. Re: Linux Patch Analysis - XML::Parser not found
                              Vinnie Lima

                              In addition, the following is the rpm installed:




                              • 13. Re: Linux Patch Analysis - XML::Parser not found
                                Vinnie Lima

                                Perl -V output:



                                [root@emda-nbp-uea21 ~]# perl -V
                                Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
                                    osname=linux, osvers=2.6.9-55.0.9.elsmp, archname=x86_64-linux-thread-multi
                                    uname='linux hs20-bc1-7.build.redhat.com 2.6.9-55.0.9.elsmp #1 smp tue sep 25 02:16:15 edt 2007 x86_64 x86_64 x86_64 gnulinux '
                                    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.8 -Dsitelib=/usr/lib/perl5/site_perl/5.8.8 -Dvendorlib=/usr/lib/perl5/vendor_perl/5.8.8 -Darchlib=/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi -Dsitearch=/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi -Darchname=x86_64-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 -Dscriptdir=/usr/bin'
                                    hint=recommended, useposix=true, d_sigaction=define
                                    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
                                    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
                                    use64bitint=define use64bitall=define uselongdouble=undef
                                    usemymalloc=n, bincompat5005=undef
                                    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
                                    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic',
                                    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm'
                                    ccversion='', gccversion='4.1.1 20070105 (Red Hat 4.1.1-52)', gccosandvers=''
                                    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
                                    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
                                    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
                                    alignbytes=8, prototype=define
                                  Linker and Libraries:
                                    ld='gcc', ldflags =''
                                    libpth=/usr/local/lib64 /lib64 /usr/lib64
                                    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
                                    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
                                    libc=, so=so, useshrplib=true, libperl=libperl.so
                                  Dynamic Linking:
                                    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE'
                                    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'


                                Characteristics of this binary (from libperl):
                                  Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
                                                        PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT
                                                        USE_ITHREADS USE_LARGE_FILES USE_PERLIO
                                  Built under linux
                                  Compiled at Oct 23 2007 12:21:53

                                • 14. Re: Linux Patch Analysis - XML::Parser not found
                                  Bill Robinson

                                  Sorry, i meant 'qa' in the last one.  I thought that would show architecture.


                                  try this one:


                                  rpm -q --qf "%{n}-%{v}-%{r}.%{arch}\n"  perl-XML-Parser

                                  1 2 Previous Next