0

Hi have launched my own elastic search docker from Marathon UI. I can see docker from "docker ps". Now I scaled instances to 2. I can see two dockers from Marathon, Mesos UI and on host also.

Now I scaled down to 1 instance. I can see only one running docker from Marathon and Mesos UI. But two dockers running on host. It means it's killed from host. While I used other dockers like "wildfly"(example), it's removing properly.

I'm not getting it's issue from my docker or Marathon ? Am I missing anything while building docker ?

App definition:

{
  "id":"elasticsearch",
  "cmd":"docker run -t \\\n--net host \\\n-e CLUSTER_NAME=cluster \\\n-v /data/docker/elasticsearch/data/:/var/lib/elasticsearch \\\n-v /data/docker/elasticsearch/log/:/var/log/elasticsearch \\\n-p 9200 -p 9300 \\\nuser/elasticsearch:2.3.0",
  "cpus":0.5,
  "mem":128,
  "disk":0,
  "instances":1
}
janisz
  • 6,292
  • 4
  • 37
  • 70
  • How did you run docker? Can you show application definition? – janisz Dec 05 '16 at 17:37
  • { "id": "elasticsearch", "cmd": "docker run -t \\\n--net host \\\n-e CLUSTER_NAME=cluster \\\n-v /data/docker/elasticsearch/data/:/var/lib/elasticsearch \\\n-v /data/docker/elasticsearch/log/:/var/log/elasticsearch \\\n-p 9200 -p 9300 \\\nuser/elasticsearch:2.3.0", "cpus": 0.5, "mem": 128, "disk": 0, "instances": 1 } – Soma Sekhar Kuruva Dec 06 '16 at 05:07
  • Take a look at [this answer](http://stackoverflow.com/a/40795329/1387612). You shouldn't run docker that way. Instead you should use [Docker contanarizer or Mesos Unified contanarizer with docker runtime](https://mesosphere.github.io/marathon/docs/native-docker.html). Also you can check https://github.com/mesos/elasticsearch – janisz Dec 06 '16 at 08:47
  • Thanks @janisz, please help me setting up above command in proper format .. I tried some sample dockers in the same format , but it worked properly. Please help in setting up above command. – Soma Sekhar Kuruva Dec 06 '16 at 09:07
  • how add "-t" parameter to run in sudo mode. ? – Soma Sekhar Kuruva Dec 06 '16 at 11:38

0 Answers0