How can I solve this problem `IntegrityError: duplicate key value violates unique constraint rhn_channel_family_name_uq` in Satellite server ?

Solution Unverified - Updated -


  • Satellite 5: satellite-sync fails with error "IntegrityError: duplicate key value violates unique constraint "rhn_channel_family_name_uq" when sync'ing "Oracle Java for RHEL (v. 6) Server EUS" channels

  • Running satellite-sync on "Oracle Java for RHEL (v. 6) Server EUS" and "Oracle Java for RHEL (v. 6) Server EUS Debuginfo" channels fails with following traceback:

Time: Wed Apr 23 02:00:55 2014
Exception type <class 'psycopg2.IntegrityError'>

Exception Handler Information
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/", line 131, in process
  File "/usr/lib64/python2.6/xml/sax/", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib64/python2.6/xml/sax/", line 123, in parse
  File "/usr/lib64/python2.6/xml/sax/", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib64/python2.6/xml/sax/", line 304, in end_element
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/", line 221, in endElement
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/", line 887, in endElement
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/", line 526, in endContainerCallback
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 647, in run
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 249, in submit
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 980, in processChannelFamilies
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 1508, in __processObjectCollection
    return self.__processObjectCollection__(objColl, parentTable, childDict, **kwargs)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 1678, in __processObjectCollection__
    return self.__doDML(dml)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 1785, in __doDML
    self.__doUpdate(dml.update, dml.tables)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 1833, in __doUpdate
    self.__doUpdateTable(tname, dict)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 1846, in __doUpdateTable
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 326, in query
    executeStatement(statement, val, self.count)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/", line 456, in executeStatement
    count += statement.executemany(**tempdict)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/", line 172, in executemany
    return apply(self._execute_wrapper, (self._executemany, ) + p, kw)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/", line 273, in _execute_wrapper
    retval = apply(function, p, kw)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/", line 310, in _executemany
    self._real_cursor.executemany(self.sql, all_kwargs)
IntegrityError: duplicate key value violates unique constraint "rhn_channel_family_name_uq"


  • Red Hat Satellite 5.6 running satellite-sync on the following 2 channels:
Oracle Java for RHEL (v. 6) Server EUS   

Oracle Java for RHEL (v. 6) Server EUS Debuginfo 
  • In some case the same issue can also affect other channels besides rhel-server-6-oracle-java-z

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