New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chronos Arithmetic Exception /Zero #614
Comments
I'm seeing this as well. |
I get this issue too. And all chronos cant restart. The reason is chronos allows job with run_interval equal 0 to be created, eg.
But the exception would be triggered when reload jobs from zookeeper, such as restart. I delete the jobs with such config and restart successfully. |
@gongaiguo how do you delete these jobs without chronos started? |
I set the else part to zero , we don't need to skip time if interval is zero. |
Same patch is applied in#692 |
@xtazz I deleted them from zookeeper. |
Hi, I met the problem when doing HA tests. When chronos restarts it reloads jobs stored in Zookeeper (job was { "schedule": "R//P", "name": "create-volume-flocker-demo", "command"...}, ) and fails. I applied the fix proposed at #692 and now Chronos loops infinitely : and it restarts for same job. [2016-07-20 09:21:49,968] INFO Calling next for stream: R/2016-07-18T09:38:44.236Z/PT0S, jobname: create-volume-flocker-demo (org.apache.mesos.chrono Do I need another fix ? |
Hi,
I am getting below exception, Just curious to know what causing this issue/
[2016-01-07 13:48:02,153] INFO Loading jobs (org.apache.mesos.chronos.scheduler.jobs.JobScheduler:601)
[2016-01-07 13:48:02,240] INFO Registering jobs:55 (org.apache.mesos.chronos.scheduler.jobs.JobUtils$:74)
[2016-01-07 13:48:02,259] ERROR Loading tasks or jobs failed. Exiting. (org.apache.mesos.chronos.scheduler.jobs.JobScheduler:605)
java.lang.ArithmeticException: / by zero
It looks like calculateSlips on JobUtils.scala is throwing exception. Just want to make sure its a chronos bug or someting related to cron expression causing this.
/**
Calculates the number of skips needed to bring the job start into the future
*/
protected def calculateSkips(dateTime: DateTime, jobStart: DateTime, period: Period): Int = {
// If the period is at least a month, we have to actually add the period to the date
// until it's in the future because a month-long period might have different seconds
if (period.getMonths >= 1) {
} else {
}
}
The text was updated successfully, but these errors were encountered: