Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
Expand all | Collapse all

Yum on AIX failure - python?

  • 1.  Yum on AIX failure - python?

    Posted Fri March 02, 2018 09:54 AM

    Originally posted by: emwilson


    Hello - I have been fighting this for days, and I have found several other items with very similar or same problem, but don't see any specific resolution. I have tried this on two AIX 7.1 servers. One server was an almost new, clean installation, with only two installed rpms. The other server is a long-time management server with several other rpms installed. Same errors occurring on both servers. The installations overall seemed to go OK. My coworker built a local repository on Redhat Satellite server. He is able to connect and download the AIX repos. Right now, I have only those repositories in my yum.conf. When I enter "yum repolist" I get the errors below. I feel like it's a python or possibly even a library error, but have been unsuccessful in figuring it out. Can someone help me try to debug this? We have a couple hundred lpars that we would like to implement yum on to keep the rpms current.

    #yum repolist
    AIX_Toolbox_71                                              | 2.1 kB  00:00    
    AIX_Toolbox_71/primary                                      | 3.8 kB  00:00    
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "yummain.py", line 288, in user_main
      File "yummain.py", line 140, in main
      File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands
        return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
      File "/opt/freeware/share/yum-cli/yumcommands.py", line 864, in doCommand
        base.repos.populateSack()
      File "/opt/freeware/lib/python2.7/site-packages/yum/repos.py", line 294, in populateSack
        sack.populate(repo, mdtype, callback, cacheonly)
      File "/opt/freeware/lib/python2.7/site-packages/yum/yumRepo.py", line 186, in populate
        dobj = repo_cache_function(xml, csum)
      File "/opt/freeware/lib/python2.7/site-packages/sqlitecachec.py", line 46, in getPrimary
        self.repoid))
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found

    #

     


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 2.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 09:40 AM

    Originally posted by: emwilson


    Anyone have a direction or area for me to look in? I am not sure if this is supported via normal support channels, but am happy to go that route if it's more appropriate. Thanks in advance.


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 3.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 09:52 AM

    Originally posted by: AyappanP


    Seems to be an issue with python rpm. Share the following details.

    rpm -qa | grep python 

    rpm -qi python 


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 4.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 09:56 AM

    Originally posted by: emwilson


    Thanks very much for responding. Below is info requested:

    #which yum
    /usr/bin/yum

    #rpm -qa | grep python
    python-2.7.10-1.ppc
    python-iniparse-0.4-1.noarch
    python-urlgrabber-3.10.1-1.noarch
    python-devel-2.7.10-1.ppc
    python-pycurl-7.19.3-1.ppc
    python-tools-2.7.10-1.ppc

    #rpm -qi python
    Name        : python
    Version     : 2.7.10
    Release     : 1
    Architecture: ppc
    Install Date: Thu Mar  1 14:14:08 2018
    Group       : Development/Languages
    Size        : 89023915
    License     : Modified CNRI Open Source License
    Signature   : (none)
    Source RPM  : python-2.7.10-1.src.rpm
    Build Date  : Wed Jun 22 07:02:37 2016
    Build Host  : green52.in.ibm.com
    Relocations : /opt/freeware
    URL         : http://www.python.org
    Summary     : An interpreted, interactive, object-oriented programming language.
    Description :
    Python is an interpreted, interactive, object-oriented programming language.
    It incorporates modules, exceptions, dynamic typing, very high level dynamic
    data types, and classes.  Python combines remarkable power with very clear
    syntax.  It has interfaces to many system calls and libraries, as well as to
    various window systems, and is extensible in C or C++.  It is also usable as an
    extension language for applications that need a programmable interface.
    Finally, Python is portable: it runs on many brands of UNIX, on PCs under
    Windows, MS-DOS, and OS/2, and on the Mac.


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 5.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 10:35 AM

    Originally posted by: AyappanP


    Python looks to be good. Share the below details 

    rpm -qa | grep libxml2

    rpm -qi libxml2


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 6.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 10:59 AM

    Originally posted by: emwilson


    Ah, this may be an issue!

    #rpm -qa | grep libxml2

    #rpm -qi libxml2
    package libxml2 is not installed


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 7.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 11:29 AM

    Originally posted by: AyappanP


    You don't really require libxml2 rpm to present in the system for yum to work since a libxml2 library comes with bos.rte fileset also

    lslpp -f bos.rte.control | grep libxml2

                            /usr/ccs/lib/libxml2.a

                            /usr/lib/libxml2.a -> /usr/ccs/lib/libxml2.a

    From the error trace, this seems to be problem with libxml2. yum-metadata-parser is the one which is invoking libxml2.

    Share the output of below two commands.

    rpm -qi yum-metadata-parser

    ldd /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so

     

     


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 8.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 11:39 AM

    Originally posted by: emwilson


    #lslpp -f bos.rte.control | grep libxml2
                            /usr/ccs/lib/libxml2.a
                            /usr/lib/libxml2.a -> /usr/ccs/lib/libxml2.a

    #rpm -qi yum-metadata-parser
    Name        : yum-metadata-parser
    Version     : 1.1.4
    Release     : 2
    Architecture: ppc
    Install Date: Thu Mar  1 14:14:09 2018
    Group       : Development/Libraries
    Size        : 195736
    License     : GPL
    Signature   : (none)
    Source RPM  : yum-metadata-parser-1.1.4-2.src.rpm
    Build Date  : Fri Feb 24 13:51:50 2017
    Build Host  : green52.in.ibm.com
    Relocations : (not relocatable)
    URL         : http://devel.linux.duke.edu/cgi-bin/viewcvs.cgi/yum-metadata-parser/
    Summary     : A fast metadata parser for yum
    Description :
    Fast metadata parser for yum implemented in C.

    #ldd /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so
    /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so needs:
             /usr/lib/libglib-2.0.a(libglib-2.0.so.0)
             /usr/lib/libxml2.a(libxml2.so.2)
             /usr/lib/libsqlite3.a(libsqlite3.so.0)
             /usr/lib/libc.a(shr.o)
             /usr/lib/librtl.a(shr.o)
             /usr/lib/libintl.a(libintl.so.1)
             /usr/lib/libiconv.a(shr4.o)
             /usr/lib/libpthread.a(shr_xpg5.o)
             /unix
             /usr/lib/libcrypt.a(shr.o)
             /usr/lib/libpthreads.a(shr_comm.o)


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 9.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 11:51 AM

    Originally posted by: AyappanP


    Everything seems to be fine. Not sure what is the issue.

    Can you do "yum clean all" and then try "yum repolist" ?


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 10.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 12:13 PM

    Originally posted by: emwilson


    Thank you - I have really fought this and couldn't find anything. Below are results. As a note, the repositories are actually local repositories set up on a Redhat Satellite server. They do have the same names as the IBM repositories. I wouldn't think that would cause any issues, but just mentioning it.

    #yum clean all
    Cleaning repos: AIX_Toolbox_71 AIX_Toolbox_noarch
    Cleaning up Everything

    #yum repolist
    AIX_Toolbox_71                                              | 2.1 kB  00:00    
    AIX_Toolbox_71/primary                                      | 3.8 kB  00:00    
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "yummain.py", line 288, in user_main
      File "yummain.py", line 140, in main
      File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands
        return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, sel
    f.extcmds)
      File "/opt/freeware/share/yum-cli/yumcommands.py", line 864, in doCommand
        base.repos.populateSack()
      File "/opt/freeware/lib/python2.7/site-packages/yum/repos.py", line 294, in po
    pulateSack
        sack.populate(repo, mdtype, callback, cacheonly)
      File "/opt/freeware/lib/python2.7/site-packages/yum/yumRepo.py", line 186, in
    populate
        dobj = repo_cache_function(xml, csum)
      File "/opt/freeware/lib/python2.7/site-packages/sqlitecachec.py", line 46, in
    getPrimary
        self.repoid))
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found

     

     


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 11.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 12:17 PM

    Originally posted by: sangameshm


    I think better to install the libxml2 rpm package and run yum.

    If that doesn't work then try running yum as "LIBPATH=/opt/freeware/lib:/usr/lib yum" as a workaround.

    I think it is still could be issue with yum-metadata-parser.

     

    Thanks,

    Sangmaesh


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 12.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 12:39 PM

    Originally posted by: AyappanP


    It could be possible that your repoxml file primary.xm.gz is corrupted in the redhat satellite server. You can re-run the createrepo command to create fresh repodata. And then run yum clean all and yum repolist in the AIX machine.


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 13.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 12:41 PM

    Originally posted by: emwilson


    I installed libxml2, which also required xz-libs. Same results, so set LIBPATH - same results. I saw that there is a libxml2-python, do I need that as well? Also, I will ask my coworkers that maintain the Satellite server to check the repoxml and primary.xm.gz.

     

    /tmp/rpms>#rpm -ivh *.rpm
    Preparing...                ########################################### [100%]
       1:xz-libs                ########################################### [ 50%]
       2:libxml2                ########################################### [100%]

    /tmp/rpms>#cd

    >#yum clean all
    Cleaning repos: AIX_Toolbox_71 AIX_Toolbox_noarch
    Cleaning up Everything

    >#yum repolist
    AIX_Toolbox_71                                              | 2.1 kB  00:00    
    AIX_Toolbox_71/primary                                      | 3.8 kB  00:00    
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "yummain.py", line 288, in user_main
      File "yummain.py", line 140, in main
      File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands
        return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, sel
    f.extcmds)
      File "/opt/freeware/share/yum-cli/yumcommands.py", line 864, in doCommand
        base.repos.populateSack()
      File "/opt/freeware/lib/python2.7/site-packages/yum/repos.py", line 294, in po
    pulateSack
        sack.populate(repo, mdtype, callback, cacheonly)
      File "/opt/freeware/lib/python2.7/site-packages/yum/yumRepo.py", line 186, in
    populate
        dobj = repo_cache_function(xml, csum)
      File "/opt/freeware/lib/python2.7/site-packages/sqlitecachec.py", line 46, in
    getPrimary
        self.repoid))
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found

    >#LIBPATH=/opt/freeware/lib:/usr/lib   
    >#echo $LIBPATH
    /opt/freeware/lib:/usr/lib

    >#yum repolist
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "yummain.py", line 288, in user_main
      File "yummain.py", line 140, in main
      File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands
        return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, sel
    f.extcmds)
      File "/opt/freeware/share/yum-cli/yumcommands.py", line 864, in doCommand
        base.repos.populateSack()
      File "/opt/freeware/lib/python2.7/site-packages/yum/repos.py", line 294, in po
    pulateSack
        sack.populate(repo, mdtype, callback, cacheonly)
      File "/opt/freeware/lib/python2.7/site-packages/yum/yumRepo.py", line 186, in
    populate
        dobj = repo_cache_function(xml, csum)
      File "/opt/freeware/lib/python2.7/site-packages/sqlitecachec.py", line 46, in
    getPrimary
        self.repoid))
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found

    >#echo $LIBPATH
    /opt/freeware/lib:/usr/lib

     


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 14.  Re: Yum on AIX failure - python?

    Posted Tue March 06, 2018 03:36 PM

    Originally posted by: emwilson


    Update: my coworker checked the repo and xml and it's good.


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 15.  Re: Yum on AIX failure - python?

    Posted Wed March 14, 2018 03:46 PM

    Originally posted by: emwilson


    I wanted to update the item because it may (or may not!) help someone else. We fought this for a few more days and could not get it to work with the Redhat Satellite. My coworkers validated that the files were good from a Linux system. What I wound up doing was creating an AIX 7.1 lpar to use as a local yum repository for the AIX servers. This is working fine. I've installed yum and run through the updates on 2 other AIX lpars.


    #AIX-Open-Source-Software
    #AIXOpenSource