Satellite Taskomatic logging unique constraint errors for rhn_tasko_run_id_pk

Solution Verified - Updated -

Issue

  • unable to generate repodata because of constraint RHN_TASKO_RUN_ID_PK
  • after upgrade to Satellite 5.6, taskomatic begins throwing hibernate exceptions continually until restarted
  • once the exceptions start, task scheduling stops
  • errors like the following in /var/log/rhn/rhn_taskomatic_daemon.log:

    INFO   | jvm 1    | 2013/11/04 03:20:00 | 2013-11-04 03:20:00,107 [DefaultQuartzScheduler_Worker-4] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: current transaction is aborted, commands ignored until end of transaction block
    INFO   | jvm 1    | 2013/11/04 03:20:00 | 2013-11-04 03:20:00,107 [DefaultQuartzScheduler_Worker-4] ERROR org.quartz.core.JobRunShell - Job DEFAULT.errata-queue-default threw an unhandled Exception:
    
    INFO   | jvm 1    | 2013/11/02 00:53:00 | 2013-11-02 00:53:00,103 [DefaultQuartzScheduler_Worker-4] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 23505
    INFO   | jvm 1    | 2013/11/02 00:53:00 | 2013-11-02 00:53:00,104 [DefaultQuartzScheduler_Worker-4] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: duplicate key value violates unique constraint "rhn_tasko_run_id_pk"
    INFO   | jvm 1    | 2013/11/02 00:53:00 | 2013-11-02 00:53:00,111 [DefaultQuartzScheduler_Worker-4] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
    INFO   | jvm 1    | 2013/11/02 00:53:00 | org.hibernate.exception.ConstraintViolationException: could not insert: [com.redhat.rhn.taskomatic.TaskoRun]
    [...]
    INFO   | jvm 1    | 2013/11/02 00:53:00 |       at com.redhat.rhn.common.hibernate.ConnectionManager.commitTransaction(ConnectionManager.java:253)
    INFO   | jvm 1    | 2013/11/02 00:53:00 |       at com.redhat.rhn.common.hibernate.HibernateFactory.commitTransaction(HibernateFactory.java:330)
    INFO   | jvm 1    | 2013/11/02 00:53:00 |       at com.redhat.rhn.taskomatic.TaskoJob.execute(TaskoJob.java:151)
    INFO   | jvm 1    | 2013/11/02 00:53:00 |       at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
    INFO   | jvm 1    | 2013/11/02 00:53:00 |       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
    
    jvm 1    | 2013/11/04 03:22:00 | 2013-11-04 03:22:00,018 [DefaultQuartzScheduler_Worker-4] ERROR 
    org.quartz.core.ErrorLogger - Job (DEFAULT.sync-probe-default threw an exception.
    INFO   | jvm 1    | 2013/11/04 03:22:00 | org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.redhat.rhn.common.hibernate.HibernateRuntimeException: Executing query TaskoSchedule.lookupById with params {schedule_id=1} failed]
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
    INFO   | jvm 1    | 2013/11/04 03:22:00 | Caused by: 
    INFO   | jvm 1    | 2013/11/04 03:22:00 | com.redhat.rhn.common.hibernate.HibernateRuntimeException: Executing query TaskoSchedule.lookupById with params {schedule_id=1} failed
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   at com.redhat.rhn.common.hibernate.HibernateFactory.lookupObjectByNamedQuery(HibernateFactory.java:190)
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   at com.redhat.rhn.common.hibernate.HibernateFactory.lookupObjectByNamedQuery(HibernateFactory.java:160)
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   at com.redhat.rhn.taskomatic.TaskoFactory.lookupScheduleById(TaskoFactory.java:334)
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   at com.redhat.rhn.taskomatic.TaskoJob.execute(TaskoJob.java:103)
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
    INFO   | jvm 1    | 2013/11/04 03:22:00 |   ... 1 more
    [...]
    

Environment

  • Red Hat Network Satellite 5.5
  • Red Hat Satellite 5.6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.