On Red Hat Satellite 6 Package upload to a repository using hammer command is failing with "pulp_rpm.plugins.importers.yum.upload:ERROR: PackageMetadataError" error ?

Solution Verified - Updated -

Issue

  • Package upload to Red Hat Satellite 6 is failing with the below error message:
# hammer repository upload-content --id 2455 --path /root/PyPAM-0.5.0-12.el6.x86_64.rpm
:
Feb 27 17:10:39 Satellite6 pulp: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._reserve_resource[b44f0d61-8750-4245-922e-6d4744db5462]
Feb 27 17:10:39 Satellite6 pulp: celery.worker.job:INFO: Task pulp.server.async.tasks._reserve_resource[b44f0d61-8750-4245-922e-6d4744db5462] succeeded in 0.0390880312771s: u'reserved_resource_worker-0@Satellite6.example.com
Feb 27 17:10:39 Satellite6 pulp: celery.worker.strategy:INFO: Received task: pulp.server.managers.content.upload.import_uploaded_unit[524577f0-abe1-43bf-94ac-23b70508ae3d]
Feb 27 17:10:39 Satellite6 pulp: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._queue_release_resource[fc11128e-fdc6-4263-b28e-bc98382ae5e1]
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: Error extracting RPM metadata for [/var/lib/pulp/uploads/6b4ac399-9877-479d-be85-f94ce5dc7771]
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: Traceback (most recent call last):
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 233, in _handle_package
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:     new_unit_key, new_unit_metadata = _generate_rpm_data(file_path, metadata)
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 327, in _generate_rpm_data
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:     headers = ts.hdrFromFdno(fd)
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:   File "/usr/lib64/python2.6/site-packages/rpm/transaction.py", line 154, in hdrFromFdno
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:     raise rpm.error("error reading package header")
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: error: error reading package header
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: metadata for the given package could not be extracted
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: Traceback (most recent call last):
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 85, in upload
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:     handlers[type_id](type_id, unit_key, metadata, file_path, conduit, config)
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 236, in _handle_package
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR:     raise PackageMetadataError()
Feb 27 17:10:39 Satellite6 pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: PackageMetadataError

Environment

  • Red Hat Satellite 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content