Chronos does not run job

梦想的初衷 提交于 2019-12-11 03:19:20

问题


I have set up Mesos Cluster including Marathon & Chronos using Docker image for each service.

Docker images I am using are as follows;

  • ZooKeeper: jplock/zookeeper:3.4.5
  • Mesos Master: redjack/mesos-master:0.21.0
  • Mesos Slave: redjack/mesos-slave:0.21.0
  • Marathon: mesosphere/marathon:v0.8.2-RC3
  • Chronos: tomaskral/chronos:2.3.0-mesos0.21.0

ZooKeeper is running on port 2181, Mesos Master on 5050, Mesos Slave on 5051, marathon on 8088, and Chronos on 8080.

What I want to do is; Run Docker container on Marathon & Chronos.

Marathon successfully runs Docker containers as its Apps.

But Chronos doesn't runs any Jobs. Even if the Job is not with Docker.

Config for Chronos Job I tried to launch is;

{
    "schedule": "R/2015-05-28T10:16:30Z/PT2M",
    "name": "simplejob",
    "cpus": "0.5",
    "mem": "512",
    "command": "while sleep 10; do date -u %T; done"
}

Jobs are registered on Chronos but never be launched.

My command for running Chronos container is as follows;

docker run -p 8080:8080 -e LIBPROCESS_PORT=5050 tomaskral/chronos:2.3.0-mesos0.21.0 --http_port 8080 --master zk://<master-hostname>:2181/mesos --zk_hosts zk://<master-hostname>:2181/mesos

回答1:


Change --zk_hosts zk://<master-hostname>:2181/mesos in your Chronos command-line to --zk_hosts <master-hostname>:2181, since this is supposed to be a list of zk node:port pairs, so that Chronos can store its own state in a /chronos znode (as opposed to the /mesos znode, where Mesos stores its leading master info).



来源:https://stackoverflow.com/questions/30503907/chronos-does-not-run-job

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!