chronos icon indicating copy to clipboard operation
chronos copied to clipboard

Framework becomes inactive

Open kevtaylor opened this issue 9 years ago • 5 comments

Using chronos 3.0.0 and mesos 1.1.0 When a schedule is set up as a single run eg. R1/2016-12-27T10:00:00Z/PT1M

and the task fails (in this instance just issuing a straight java call with no parameters gives an exit status of 1)

The task fails and remains in an inconsistent state (ie. Mesos thinks it is still active), because the framework has detached itself

14:49:20.646 [Thread-150] WARN org.apache.mesos.chronos.scheduler.jobs.JobUtils$ - Filtered job as it is no longer valid. Exception in thread "Thread-150" java.util.NoSuchElementException: None.get at scala.None$.get(Option.scala:347) at scala.None$.get(Option.scala:345) at org.apache.mesos.chronos.scheduler.jobs.JobScheduler.getNewRunningJob(JobScheduler.scala:186) at org.apache.mesos.chronos.scheduler.jobs.JobScheduler.handleLaunchedTask(JobScheduler.scala:154) at org.apache.mesos.chronos.scheduler.mesos.MesosJobFramework$$anonfun$launchTasks$2$$anonfun$apply$1.apply(MesosJobFramework.scala:174) at org.apache.mesos.chronos.scheduler.mesos.MesosJobFramework$$anonfun$launchTasks$2$$anonfun$apply$1.apply(MesosJobFramework.scala:171) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at org.apache.mesos.chronos.scheduler.mesos.MesosJobFramework$$anonfun$launchTasks$2.apply(MesosJobFramework.scala:171) at org.apache.mesos.chronos.scheduler.mesos.MesosJobFramework$$anonfun$launchTasks$2.apply(MesosJobFramework.scala:161) at scala.collection.immutable.Map$Map1.foreach(Map.scala:116) at org.apache.mesos.chronos.scheduler.mesos.MesosJobFramework.launchTasks(MesosJobFramework.scala:161) at org.apache.mesos.chronos.scheduler.mesos.MesosJobFramework.resourceOffers(MesosJobFramework.scala:109) at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37) at com.sun.proxy.$Proxy30.resourceOffers(Unknown Source) I1229 14:49:20.648046 22 sched.cpp:2029] Asked to abort the driver I1229 14:49:20.654323 22 sched.cpp:1217] Aborting framework 4e67ebcf-b266-4fa1-a68f-3f1ac39574ba-0000

kevtaylor avatar Dec 29 '16 15:12 kevtaylor

I have the same issue, do you fix it??

zhanrox avatar Jan 03 '17 09:01 zhanrox

Only by changing the R1 frequency to an R - it seems that it is only for single iteration jobs - an open ended schedule works okay for me

kevtaylor avatar Jan 03 '17 09:01 kevtaylor

According to my test findings, If the task scheduling time is earlier than the current time, the task will cause the chronos framework inactive. If the task scheduling time is later than the current time, it will work fine. in addition, if the "Rn" can reach the current time ,it's ok too. So, when you set "Rn" as "R", it work fine.

zhanrox avatar Jan 03 '17 09:01 zhanrox

you can contact the team of chronos to fix this bug

zhanrox avatar Jan 03 '17 09:01 zhanrox

I'm intermittently having the same problem. Using the same versions (Mesos 1.1.0 and Chronos 3.0.0). I am not using any R1 jobs, though. I've actually seen this happen when no jobs at all are configured in Chronos, but I'm finding it extremely difficult to replicate consistently. Sometimes restarting Chronos will create a new framework that runs successfully, but sometimes I have to completely nuke my Zookeeper data to get things to work. Sometimes I can bootstrap a new cluster that runs with no problems.

aayore avatar Jan 06 '17 16:01 aayore