mesos / chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
http://mesos.github.io/chronos/
Apache License 2.0
4.38k stars 529 forks source link

Chronos Issues with Zookeeper #229

Open panwaria opened 10 years ago

panwaria commented 10 years ago

Hi,

Chronos (with the latest code at this date) compiles fine, but it throws up following errors while running Tests during mvn package:

...
...

Results :

Failed tests: 
   '0' is not equal to '1' expected:<[1]> but was:<[0]>
  JobSchedulerElectionSpec.testElectNewLeaderOnMasterFailure:151 Former master scheduler should not be leader after failure
  JobSchedulerElectionSpec.testJobSchedulerShouldElectOnlyOneLeader:112 One scheduler, but not both, should be running

Tests run: 39, Failures: 3, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2014-06-26T18:55:23-05:00
[INFO] Final Memory: 16M/65M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project chronos: There are test failures.
[ERROR] 
[ERROR] Please refer to /usr/local/airbnb-chronos-edited/chronos/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

The errors mentioned above appear randomly each time mvn package is executed. 'mvn package' runs successfully 1 in 5 times on an average.

Someone suggested to increase the initLimit in zoo.cfg (link: http://efod.se/blog/archive/2013/02/09/zookeeper-initlimit ). I tried increasing it from 10 to 10000, but still it is throwing up the errors mentioned above.

Build environment: CentOS 64bit (VM instance) with Zookeper service already running.

Anyone having a clue what might be happening here?

laktech commented 9 years ago

just tried building today and got the same test failure.

panwaria commented 9 years ago

Thankfully I'm not the only one. :) I'm still facing the same issue. I have to do mvn package multiple times until the jar is created. I haven't tried but one workaround is to disable the tests from the project.

brndnmtthws commented 9 years ago

The ZK tests are somewhat flaky. I should just disable that one.

deric commented 9 years ago

I have the same issue. I don't have ZooKeeper on the same machine as I'm building chronos. It would be nice to be able to change the ZooKeeper URL with some parameter. Or disable tests which depend on other components.

mvn package -DskipTests=true

works fine.

wangqunOne commented 8 years ago

I also got the same test error issue.
@deric yes, Running "mvn package -DskipTests=true" can skip the zookeeper test. But when I run the command "java -cp target/chronos*.jar org.apache.mesos.chronos.scheduler.Main --master zk://localhost:2181/mesos --zk_hosts localhost:2181" It will appear the following error: Failed to load native Mesos library from /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib [2016-04-18 06:20:51,841] ERROR Chronos has exited because of an unexpected error: no mesos in java.library.path (org.apache.mesos.chronos.scheduler.Main$:51) java.lang.UnsatisfiedLinkError: no mesos in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1889)

ouyangxuanyun commented 7 years ago

@wangqunOne I met the same problem, the following error appears, Failed to load native Mesos library from /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib

Do you still remember how to solve this? Thx so much