Satellite sync is failing with "integrityError('null value in column "package_id" violates not-null constraint\n',)"

Solution Unverified - Updated -

Environment

  • Red Hat Satellite 5.x
  • Satellite-sync

Issue

  • Satellite-sync is failing with following error:
[root@Satellite ~]# # satellite-sync -c <cahnnel-label>
15:11:57 Red Hat Satellite - live synchronization
15:11:57    url: https://satellite.rhn.redhat.com
15:11:57    debug/output level: 1
15:11:57    db:  rhnuser/<password>@rhnschema
15:11:57
:
:
15:13:08 Importing channel errata
15:13:22    Importing *relevant* errata: rhel-x86_64-server-optional-6 (1214)
            ________________________________________
Downloading:+++ sending log as an email +++

SYNC ERROR: unhandled exception occurred:

(Check logs/email for potentially more detail)

IntegrityError('null value in column "package_id" violates not-null constraint\n',)
null value in column "package_id" violates not-null constraint

Resolution

  • Clear the satellite-sync cache and re-sync the satellite server:
  # rm -rf /var/cache/rhn/satsync/*
  # satellite-sync -c <cahnnel-label>

Root Cause

  • Corrupted Satellite Channel Cache was the root cause of this error message.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.