[Spacewalk-list] Unique constraint violation after upgrade

Pierre Casenove pcasenove at gmail.com
Thu Mar 8 14:33:46 UTC 2012


Hello,
I just upgraded Spacewalk server to version 1.7, and synced the
spacewalk client repo.
here is the error message I get in file rhn_taskomatic_daemon.log:

INFO   | jvm 1    | 2012/03/08 14:21:00 | 2012-03-08 14:21:00,226
[Thread-92] ERROR com.redhat.rhn.common.db.datasource.CachedStatement
- Error while processing cached statement sql: insert into
rhnPackageRepodata (package_id)
INFO   | jvm 1    | 2012/03/08 14:21:00 |               (select
cp.package_id as id from rhnChannelPackage cp left join
rhnPackageRepoData rd on cp.package_id = rd.package_id
INFO   | jvm 1    | 2012/03/08 14:21:00 |                       where
cp.channel_id = ?
INFO   | jvm 1    | 2012/03/08 14:21:00 |                         and
rd.package_id is null)
INFO   | jvm 1    | 2012/03/08 14:21:00 |
com.redhat.rhn.common.db.WrappedSQLException: ERROR: duplicate key
value violates unique constraint "rhnpackagerepodata_pk"
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.translation.SqlExceptionTranslator.postgreSqlException(SqlExceptionTranslator.java:54)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:44)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:141)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:453)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:430)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.db.datasource.CachedStatement.executeUpdate(CachedStatement.java:270)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.db.datasource.WriteMode.executeUpdate(WriteMode.java:33)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.manager.rhnpackage.PackageManager.createRepoEntrys(PackageManager.java:1196)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.taskomatic.task.repomd.RpmRepositoryWriter.writeRepomdFiles(RpmRepositoryWriter.java:91)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.taskomatic.task.repomd.ChannelRepodataWorker.run(ChannelRepodataWorker.java:104)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
java.lang.Thread.run(Thread.java:679)
INFO   | jvm 1    | 2012/03/08 14:21:00 | Caused by:
org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "rhnpackagerepodata_pk"
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:347)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:651)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       at
com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:138)
INFO   | jvm 1    | 2012/03/08 14:21:00 |       ... 9 more


What could I do to investigate the duplicate key exception?

Thanks,

Pierre




More information about the Spacewalk-list mailing list