Sreejith P G
2018-08-23 07:49:58 UTC
Hi Team,
I am getting below error while syncing one repository.
14:50:30 Linking packages to channel.
14:50:33 ERROR: (23, 'ERROR: duplicate key value violates unique
constraint "rhn_cnp_cid_nid_uq"', 'Could not update database entry.')
Traceback (most recent call last):
File "/bin/spacewalk-repo-sync", line 244, in <module>
sys.exit(abs(main() or 0))
File "/bin/spacewalk-repo-sync", line 231, in main
elapsed_time = sync.sync()
File
"/usr/lib/python2.7/site-packages/spacewalk/satellite_tools/reposync.py",
line 320, in sync
[self.channel_label], [], "server.app.yumreposync")
File "/usr/lib/python2.7/site-packages/spacewalk/server/taskomatic.py",
line 69, in add_to_repodata_queue_for_channel_package_subscription
add_to_repodata_queue(channel, caller, reason[:128])
File "/usr/lib/python2.7/site-packages/spacewalk/server/taskomatic.py",
line 53, in add_to_repodata_queue
queue.add(entry)
File "/usr/lib/python2.7/site-packages/spacewalk/server/taskomatic.py",
line 44, in add
bypass_filters=self._boolean_as_char(entry.bypass_filters))
File
"/usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/sql_base.py",
line 151, in execute
return self._execute_wrapper(self._execute, *p, **kw)
File
"/usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py",
line 303, in _execute_wrapper
raise sql_base.SQLSchemaError(error_code, e.pgerror, e)
spacewalk.server.rhnSQL.sql_base.SQLSchemaError: (99999, 'ERROR: current
transaction is aborted, commands ignored until end of transaction block',
'', InternalError('current transaction is aborted, commands ignored until
end of transaction block\n',))
The below log is from postgres
/var/lib/pgsql/data/pg_log/postgresql-Thu.log
2018-08-23 15:17:41.386 +08 WARNING: there is already a transaction in
progress
2018-08-23 15:17:44.719 +08 ERROR: duplicate key value violates unique
constraint "rhn_cnp_cid_nid_uq"
2018-08-23 15:17:44.719 +08 DETAIL: Key (channel_id, name_id,
package_arch_id)=(103, 5515, 100) already exists.
2018-08-23 15:17:44.719 +08 CONTEXT: SQL statement "insert into
rhnChannelNewestPackage
(channel_id, name_id, evr_id, package_id,
package_arch_id)
(select channel_id,
name_id, evr_id,
package_id, package_arch_id
from rhnChannelNewestPackageView
where channel_id = channel_id_in
and (package_name_id_in is null
or name_id = package_name_id_in)
)"
PL/pgSQL function
rhn_channel.refresh_newest_package(numeric,character varying,numeric) line
9 at SQL statement
2018-08-23 15:17:44.719 +08 STATEMENT: SELECT
rhn_channel.refresh_newest_package(103, 'server.app.yumreposync', NULL)
2018-08-23 15:17:44.723 +08 ERROR: current transaction is aborted,
commands ignored until end of transaction block
2018-08-23 15:17:44.723 +08 STATEMENT:
insert into rhnRepoRegenQueue
(id, channel_label, client, reason, force,
bypass_filters,
next_action, created, modified)
values (
sequence_nextval('rhn_repo_regen_queue_id_seq'),
'nus_centos-6.9', 'server.app.yumreposync', NULL,
'N', 'N',
current_timestamp, current_timestamp,
current_timestamp
)
Thanks in advance.
I am getting below error while syncing one repository.
14:50:30 Linking packages to channel.
14:50:33 ERROR: (23, 'ERROR: duplicate key value violates unique
constraint "rhn_cnp_cid_nid_uq"', 'Could not update database entry.')
Traceback (most recent call last):
File "/bin/spacewalk-repo-sync", line 244, in <module>
sys.exit(abs(main() or 0))
File "/bin/spacewalk-repo-sync", line 231, in main
elapsed_time = sync.sync()
File
"/usr/lib/python2.7/site-packages/spacewalk/satellite_tools/reposync.py",
line 320, in sync
[self.channel_label], [], "server.app.yumreposync")
File "/usr/lib/python2.7/site-packages/spacewalk/server/taskomatic.py",
line 69, in add_to_repodata_queue_for_channel_package_subscription
add_to_repodata_queue(channel, caller, reason[:128])
File "/usr/lib/python2.7/site-packages/spacewalk/server/taskomatic.py",
line 53, in add_to_repodata_queue
queue.add(entry)
File "/usr/lib/python2.7/site-packages/spacewalk/server/taskomatic.py",
line 44, in add
bypass_filters=self._boolean_as_char(entry.bypass_filters))
File
"/usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/sql_base.py",
line 151, in execute
return self._execute_wrapper(self._execute, *p, **kw)
File
"/usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py",
line 303, in _execute_wrapper
raise sql_base.SQLSchemaError(error_code, e.pgerror, e)
spacewalk.server.rhnSQL.sql_base.SQLSchemaError: (99999, 'ERROR: current
transaction is aborted, commands ignored until end of transaction block',
'', InternalError('current transaction is aborted, commands ignored until
end of transaction block\n',))
The below log is from postgres
/var/lib/pgsql/data/pg_log/postgresql-Thu.log
2018-08-23 15:17:41.386 +08 WARNING: there is already a transaction in
progress
2018-08-23 15:17:44.719 +08 ERROR: duplicate key value violates unique
constraint "rhn_cnp_cid_nid_uq"
2018-08-23 15:17:44.719 +08 DETAIL: Key (channel_id, name_id,
package_arch_id)=(103, 5515, 100) already exists.
2018-08-23 15:17:44.719 +08 CONTEXT: SQL statement "insert into
rhnChannelNewestPackage
(channel_id, name_id, evr_id, package_id,
package_arch_id)
(select channel_id,
name_id, evr_id,
package_id, package_arch_id
from rhnChannelNewestPackageView
where channel_id = channel_id_in
and (package_name_id_in is null
or name_id = package_name_id_in)
)"
PL/pgSQL function
rhn_channel.refresh_newest_package(numeric,character varying,numeric) line
9 at SQL statement
2018-08-23 15:17:44.719 +08 STATEMENT: SELECT
rhn_channel.refresh_newest_package(103, 'server.app.yumreposync', NULL)
2018-08-23 15:17:44.723 +08 ERROR: current transaction is aborted,
commands ignored until end of transaction block
2018-08-23 15:17:44.723 +08 STATEMENT:
insert into rhnRepoRegenQueue
(id, channel_label, client, reason, force,
bypass_filters,
next_action, created, modified)
values (
sequence_nextval('rhn_repo_regen_queue_id_seq'),
'nus_centos-6.9', 'server.app.yumreposync', NULL,
'N', 'N',
current_timestamp, current_timestamp,
current_timestamp
)
Thanks in advance.
--
Regards,
Sreejith P G
Regards,
Sreejith P G