chronos
chronos copied to clipboard
Chronos doesn't work in bridged mode on docker in marathon
From master logs:
{"log":"I1030 09:28:59.826421 7 master.cpp:1361] Framework 20141028-073834-3925977280-5050-1-0004 ([email protected]:53492) already registered, resending acknowledgement\n","stream":"stderr","time":"2014-10-30T09:28:59.82644282Z"}
My network is 192.168.x.x, 172.17.0.30 is behind nat in docker.
Chronos cannot run any task because of this. Any thoughts how to make it work?
I'm also experiencing a problem with HOST mode as well. @bobrik did you manage to find a fix?
Nope, I'm running in host mode
I am running Mesos Slave in a Container, I got around the ip address issue it by setting MESOS_IP as well as running with host networking. I tried bridge mode and even tried setting LIBPROCESS_IP which seems to control which ip is binds to but not the ip that is reported. I assume if you can get them right you can get this working, but I gave up and ran in host mode.
@lancehudson can you elaborate a bit ? I am facing the same issue, i am running all in one PanteraS (mesos/marathon/zookeeper/chronos,consul,haproxy)
setting the listenning address using --http_hostname
crash the http server.
I am wondering if I can just deploy chronos within marathon and what volume should I share. Your Dockerfile could be a great help.
Sorry, I gave up trying to run chronos in a container.
Running Mesos 1.1.0 and Chronos 3.0.1, I was able to successfully configure Chronos in BRIDGE
mode by explicitly setting LIBPROCESS_ADVERTISE_IP
, LIBPROCESS_ADVERTISE_PORT
and pinning its second port to a hostPort
which isn't ideal but the only way I could find to make it advertise its port to Mesos properly:
{
"id": "/core/chronos",
"cmd": "LIBPROCESS_ADVERTISE_IP=$(getent hosts $HOST | awk '{ print $1 }') LIBPROCESS_ADVERTISE_PORT=$PORT1 /chronos/bin/start.sh --hostname $HOST --zk_hosts master-1:2181,master-2:2181,master-3:2181 --master zk://master-1:2181,master-2:2181,master-3:2181/mesos --http_credentials ${CHRONOS_USER}:${CHRONOS_PASS}",
"cpus": 0.1,
"mem": 1024,
"disk": 100,
"instances": 1,
"container": {
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "mesosphere/chronos:v3.0.1",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 9900,
"hostPort": 0,
"servicePort": 0,
"protocol": "tcp",
"labels": {}
},
{
"containerPort": 9901,
"hostPort": 9901,
"servicePort": 0,
"protocol": "tcp",
"labels": {}
}
],
"privileged": true,
"parameters": [],
"forcePullImage": true
}
},
"env": {
"CHRONOS_USER": "admin",
"CHRONOS_PASS": "XXX",
"PORT1": "9901",
"PORT0": "9900"
}
}