Schedule publishing is failing in magnolia due to below mentioned error. Scheduler is shutdown automatically and its leads to publishing failure.If I restart the author instance then scheduler is up and schedule publishing working fine.
What are the key actions which leads to shutdown the scheduler?
Is there any time frame set to scheduler ?
ERROR info.magnolia.task.schedule.DefaultTaskSchedulerService 30.10.2018 10:28:40 -- Could not schedule job [publish_9e827f8d-89f2-4c61-a0c5-bfe84d5c3a7e].
org.quartz.SchedulerException: The Scheduler has been shutdown.
at org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:795)
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:846)
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249)
at info.magnolia.task.schedule.DefaultTaskSchedulerService.schedule(DefaultTaskSchedulerService.java:90)
at info.magnolia.task.DefaultTasksManager.scheduleTask(DefaultTasksManager.java:126)
at info.magnolia.module.workflow.jbpm.workitem.handler.ScheduleTaskWorkItemHandler.executeWorkItem(ScheduleTaskWorkItemHandler.java:49)
at info.magnolia.module.workflow.jbpm.persistence.WorkItemHandlerSystemContextWrapper$1.exec(WorkItemHandlerSystemContextWrapper.java:37)
at info.magnolia.module.workflow.jbpm.persistence.WorkItemHandlerSystemContextWrapper$1.exec(WorkItemHandlerSystemContextWrapper.java:33)
at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:400)
at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:378)
at info.magnolia.module.workflow.jbpm.persistence.WorkItemHandlerSystemContextWrapper.executeWorkItem(WorkItemHandlerSystemContextWrapper.java:33)
at org.drools.persistence.jcr.processinstance.JcrWorkItemManager.internalExecuteWorkItem(JcrWorkItemManager.java:76)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:138)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:366)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:381)
at org.jbpm.workflow.instance.node.SplitInstance.executeStrategy(SplitInstance.java:117)
at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:63)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:366)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:325)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:73)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:44
> Blockquote
The only action that can make it go down is user initiated shutdown.
No.
The only reasonable explanation seems to be programatically triggered shutdown. Since this is not widely reported issue (personally I never heard about it before and I dare to say I've seen most of issues with Magnolia over last couple of years), I'd search your custom code or any community or 3rd party modules you have installed. Perhaps you can also create small scheduled task, e.g. over groovy and have it executed every minute. If the task is only to print the log statement, it should not add too much of the overhead to your instance but would allow you to better pinpoint time when shutdown happens (within minute after last log statement) and perhaps it can also help you find out the cause of shutdown.
Before doing this, you might also want to inspect log file for any exceptions happening prior to you detecting the shutdown, but I presume you have already done this.