TrueSight Server Automation (TSSA):Error while add/update patch in depot: rpm : xxxx.x86_64.rpm, , Error: Failed to read the package file: Invalid RPM file format (Caused By: Invalid RPM file format)”

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    TrueSight Server Automation Suite


    COMPONENT:

    TrueSight Server Patch Management


    APPLIES TO:

    Version Neutral



    PROBLEM:

     

    Scenario 1:

    The Catalog update job for RHEL 6/7/8 is failing with an error message “Error while add/update patch in depot: rpm : xxxx.x86_64.rpm, , Error: Failed to read the package file: Invalid RPM file format (Caused By: Invalid RPM file format)
    The issue might still persist even after deleting the mentioned failed RPMs from the storage and then on re-running the job.

    User-added image

    Note :The rpm name mentioned in error can be different.


    Scenario 2:
    Error while add/update patch in depot: rpm : xxxxx.x86_64.rpm, ,Error: Failed to read the package file: Invalid RPM file format (Caused By: Invalid RPM file format)
    Worker 0: Error: Could not open local rpm file: /catalogue/redhat/catalog_xxx.part/RHEx86_64/xxxx.x86_64.rpm: RPM Error opening Package

     


    SOLUTION:

     

    Scenario 1:

    Check the size of one of the rpm with error in job run log by running below command on repo location:-

    du -sk <rpm> 

    If it comes out of 0 bytes than we should run another command on repository location to remove all the 0 byte rpm's:- 

    for i in ` du -sh *.rpm | grep "^0" | awk '{print $2}'`; do rm -f "$i"; done 

    and rerun the catalog update again. 

    Example:  
    User-added image

    Scenario 2:
    1.Follow the below steps to remove the entry of the failed RPM/RPMs 
      
    File not of type RPM 
    file *.rpm | grep -v RPM | tee list1.txt 

    Then remove them after doing a manual check of some the files in the list 
    cat list1.txt | cut -d: -f1 | xargs rm –f 

    Re-run catalog update job to re-download those rpm's 

     


    Article Number:

    000239017


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles