Why Red Hat Satellite registeration fails with - IntegrityError: new row for relation "rhnpackageevr" violates check constraint "vn_rhnpackageevr_release"

Solution Verified - Updated -


  • Red Hat Satellite registration fails with the below error:
 [error] Exception Handler Information
 [error] Traceback (most recent call last):
 [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 122, in call_function
 [error]     response = func(*params)
 [error]   File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 857, in add_packages
 [error]     server.save_packages()
 [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnServer/server_wrapper.py", line 75, in save_packages
 [error]     ret = self.save_packages_byid(self.server["id"], schedule=schedule)
 [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnServer/server_packages.py", line 228, in save_packages_byid
 [error]     h.execute_bulk(package_data)
 [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 181, in execute_bulk
 [error]     ret = ret + self.executemany(**subdict)
 [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 156, in executemany
 [error]     return self._execute_wrapper(self._executemany, *p, **kw)
 [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 286, in _execute_wrapper
 [error]     retval = function(*p, **kw)
 [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 328, in _executemany
 [error]     self._real_cursor.executemany(self.sql, all_kwargs)
 [error] IntegrityError: new row for relation "rhnpackageevr" violates check constraint "vn_rhnpackageevr_release"
 [error] DETAIL:  Failing row contains (17292, 0, 2.0.1, , (0,2.0.1,"")).
 [error] CONTEXT:  Error occurred on dblink connection named "at_conn": could not execute command.
 [error] SQL statement "SELECT dblink_exec('at_conn', in_sql, true)"
 [error] PL/pgSQL function pg_dblink_exec(character varying) line 8 at PERFORM
 [error] SQL statement "SELECT pg_dblink_exec(
 [error]                 'insert into rhnPackageEVR(id, epoch, version, release, evr) values (' ||
 [error]                 evr_id || ', ' || e_text || ', ' || v_text || ', ' || r_text
 [error] \t\t|| ', evr_t(' || e_text || ', ' || v_text || ', ' || r_text || '))'
 [error]             )"
 [error] PL/pgSQL function lookup_evr(character varying,character varying,character varying) line 19 at PERFORM


  • Red Hat Satellite 5.x

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