[Spacewalk-list] Error in rhn_taskomatic_daemon.log

Jan Pazdziora jpazdziora at redhat.com
Thu Apr 12 11:40:00 UTC 2012


On Wed, Apr 11, 2012 at 02:54:11PM +0000, Wojtak, Greg (Superfly) wrote:
> CentOS 6.2, Spacewalk 1.6, Postgres backend, 64-bit
> 
> I was watching rhn_taskomatic_daemon.log to make sure that the repo metadata got updated after rhnpush'ing a package.  I'm not really seeing any troubles, but an error keeps popping up in the log:
> 
> INFO   | jvm 1    | 2012/04/11 10:51:00 | 2012-04-11 10:51:00,720 [Thread-42679] ERROR com.redhat.rhn.common.db.datasource.CachedStatement - Error while processing cached statement sql: insert into rhnPackageRepodata (package_id)
> INFO   | jvm 1    | 2012/04/11 10:51: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/04/11 10:51:00 |                       where cp.channel_id = ?
> INFO   | jvm 1    | 2012/04/11 10:51:00 |                         and rd.package_id is null)
> INFO   | jvm 1    | 2012/04/11 10:51:00 | com.redhat.rhn.common.db.WrappedSQLException: ERROR: duplicate key value violates unique constraint "rhnpackagerepodata_pk"
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.translation.SqlExceptionTranslator.postgreSqlException(SqlExceptionTranslator.java:56)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:45)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:141)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:453)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:430)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.db.datasource.CachedStatement.executeUpdate(CachedStatement.java:270)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.db.datasource.WriteMode.executeUpdate(WriteMode.java:33)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.manager.rhnpackage.PackageManager.createRepoEntrys(PackageManager.java:1202)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.taskomatic.task.repomd.RpmRepositoryWriter.writeRepomdFiles(RpmRepositoryWriter.java:91)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.taskomatic.task.repomd.ChannelRepodataWorker.run(ChannelRepodataWorker.java:104)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at java.lang.Thread.run(Thread.java:679)
> INFO   | jvm 1    | 2012/04/11 10:51:00 | Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "rhnpackagerepodata_pk"
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:362)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:138)
> INFO   | jvm 1    | 2012/04/11 10:51:00 |       ... 9 more
> 
> Like I said, I don't really see any symptoms, but I wanted to report it in case it was something that needed to be addressed.

Does it prevent the repodata from being correctly regenerated for the
channel? I suspect there might be two of these tasks running and the
same time, causing this primary key violation. But subsequent runs of
the same task should heal the problem.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list