[2.3.2] How to cancel a PublisherQueueJob?

25 views
Skip to first unread message

Nathan Keiter

unread,
Oct 17, 2013, 8:43:25 AM10/17/13
to dot...@googlegroups.com
One of our servers throws 500 errors every morning (last three days in a row.) I can trace this back to a corrupted hibernated session that is caused by a bad PublisherQueueJob. This job tries to run shortly after the database comes back up in the wee hours of the morning.

It only affects the one server, the other server in the cluster is fine. Restarting this server clears up the issue, but we'd rather not have it crash every morning.

Also, where can we find/modify the schedule for automated tasks? We would like to make sure they are scheduled around our database downtime and not during.

Here's the details of the error, which starts at 3:42 AM:

[17/10/13 03:42:00:110 EDT] ERROR business.PublisherQueueJob: Unable to save Object to Hibernate Session
com.dotmarketing.exception.DotHibernateException: Unable to save Object to Hibernate Session
at com.dotmarketing.db.HibernateUtil.save(HibernateUtil.java:450)
at com.dotmarketing.business.RoleFactoryImpl.addRoleToUser(RoleFactoryImpl.java:210)
at com.dotmarketing.business.RoleAPIImpl.addRoleToUser(RoleAPIImpl.java:160)
at com.dotmarketing.business.RoleAPIImpl.addRoleToUser(RoleAPIImpl.java:165)
at com.dotmarketing.business.UserAPIImpl.getSystemUser(UserAPIImpl.java:127)
at com.dotcms.enterprise.publishing.PublishDateUpdater.updatePublishExpireDates(SourceFile:22)
at com.dotcms.publisher.business.PublisherQueueJob.execute(PublisherQueueJob.java:54)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.dotmarketing.business.UsersRoles#5efa29d4-f469-4329-b0b2-38bb43d767dd]
at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:73)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:472)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at com.dotmarketing.db.HibernateUtil.save(HibernateUtil.java:448)
... 8 more
Caused by: java.sql.SQLException: ORA-00001: unique constraint (DOTCMS.USERS_CMS_ROLES1_UNIQUE) violated

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3462)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1061)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
... 15 more


Nathan

Nathan I. Keiter
Lead Network Applications Programmer
DataSystems
Gettysburg College
Campus Box 2453
717-337-6993

Measure your success by the level of service you provide.
Si hoc legere scis nimium eruditionis habes.

danny.gl...@isaac.nl

unread,
Oct 17, 2013, 9:16:33 AM10/17/13
to dot...@googlegroups.com
We have also issues with the PublisherQueueJob, same version:


[17/10/13 14:11:12:512 BST] ERROR quartz.DotJobStore: MisfireHandler: Error handling misfires: Couldn't store trigger: com.dotcms.publisher.business.PublisherQueueJob
org.quartz.JobPersistenceException: Couldn't store trigger: com.dotcms.publisher.business.PublisherQueueJob [See nested exception: java.lang.ClassNotFoundException: com.dotcms.publisher.business.PublisherQueueJob]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1182)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:950)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:898)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3029)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3789)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3809)
Caused by: java.lang.ClassNotFoundException: com.dotcms.publisher.business.PublisherQueueJob
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
    at org.quartz.simpl.InitThreadContextClassLoadHelper.loadClass(InitThreadContextClassLoadHelper.java:74)
    at org.quartz.simpl.CascadingClassLoadHelper.loadClass(CascadingClassLoadHelper.java:118)
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:897)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1138)
    ... 5 more
[17/10/13 14:11:12:512 BST]  INFO quartz.DotJobStore: Handling 4 trigger(s) that missed their scheduled fire-time.
[17/10/13 14:11:12:572 BST] ERROR quartz.DotJobStore: MisfireHandler: Error handling misfires: Couldn't store trigger: com.dotcms.publisher.business.PublisherQueueJob
org.quartz.JobPersistenceException: Couldn't store trigger: com.dotcms.publisher.business.PublisherQueueJob [See nested exception: java.lang.ClassNotFoundException: com.dotcms.publisher.business.PublisherQueueJob]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1182)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:950)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:898)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3029)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3789)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3809)
Caused by: java.lang.ClassNotFoundException: com.dotcms.publisher.business.PublisherQueueJob
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
    at org.quartz.simpl.InitThreadContextClassLoadHelper.loadClass(InitThreadContextClassLoadHelper.java:74)
    at org.quartz.simpl.CascadingClassLoadHelper.loadClass(CascadingClassLoadHelper.java:118)
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:897)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1138)
    ... 5 more

Op donderdag 17 oktober 2013 14:43:25 UTC+2 schreef Nathan Keiter:

Jorge Urdaneta

unread,
Oct 17, 2013, 9:23:31 AM10/17/13
to dot...@googlegroups.com
If you aren't using the push publishing feature then you can disable that job setting 

ENABLE_PUBLISHER_QUEUE_THREAD=false

in your dotmarketing-conf.properties.

Other than that in the first stacktrace I see you're losing the system admin role in the system user. It fails trying to assign it again. Take a look at your users portlet and see if you can do it manually.

--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
Visit this group at http://groups.google.com/group/dotcms.
For more options, visit https://groups.google.com/groups/opt_out.

Nathan Keiter

unread,
Oct 17, 2013, 9:32:29 AM10/17/13
to dot...@googlegroups.com
Thanks. We aren't using it, so we'll disable it.

Nathan

Nathan I. Keiter
Lead Network Applications Programmer
DataSystems
Gettysburg College
Campus Box 2453
717-337-6993

Measure your success by the level of service you provide.
Si hoc legere scis nimium eruditionis habes.


From: Jorge Urdaneta <jorge.u...@dotcms.com<mailto:jorge.u...@dotcms.com>>
Reply-To: "dot...@googlegroups.com<mailto:dot...@googlegroups.com>" <dot...@googlegroups.com<mailto:dot...@googlegroups.com>>
Date: Thursday, October 17, 2013 9:23 AM
To: "dot...@googlegroups.com<mailto:dot...@googlegroups.com>" <dot...@googlegroups.com<mailto:dot...@googlegroups.com>>
Subject: Re: [dotcms] Re: [2.3.2] How to cancel a PublisherQueueJob?

If you aren't using the push publishing feature then you can disable that job setting

ENABLE_PUBLISHER_QUEUE_THREAD=false

in your dotmarketing-conf.properties.

Other than that in the first stacktrace I see you're losing the system admin role in the system user. It fails trying to assign it again. Take a look at your users portlet and see if you can do it manually.

To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.

Jorge Urdaneta

unread,
Oct 17, 2013, 9:34:16 AM10/17/13
to dot...@googlegroups.com
But the problem with the role on the system user can bite you in other places. So, take a look.
> To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
> To post to this group, send email to dot...@googlegroups.com.

Nathan Keiter

unread,
Oct 17, 2013, 9:35:36 AM10/17/13
to dot...@googlegroups.com
Ok, will do. Thanks again.
>dotcms+un...@googlegroups.com<mailto:dotcms+unsubscribe@googlegroups
>.com>.
> To post to this group, send email to
>dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/dotcms.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google
>Groups "dotCMS User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
>an email to
>dotcms+un...@googlegroups.com<mailto:dotcms+unsubscribe@googlegroups
Reply all
Reply to author
Forward
0 new messages