2

I am trying to run docker container using apache marathon/mesos. In the official documentation they have mentioned echo "docker,mesos" > /etc/mesos-slave/containerizers should be done to use docker.

But there is no such file or directory on my machine. I'm using ubuntu 14.04. my mesos version is 0.22.1. It only shows deploying while running using marathon using --containerizer==docker,mesos flag.

For this flag to work I need to do that echo thing. But there is no such thing on my machine.

Maripi
  • 81
  • 1
  • 4
  • That command will create the file, just try running it and continuing with the tutorial. – Adrian Mouat Jul 15 '15 at 16:53
  • Not sure what setup you use, this file should exist only on Agent (slaves) machines. – rukletsov Jul 15 '15 at 19:13
  • My slave and the master are same machine. I couldn't find such file or directory. Without that file/directory I can't continue. Is it okay if I manually create that file? – Maripi Jul 16 '15 at 06:42

1 Answers1

0

I am pretty sure it should be

echo "docker,mesos" > /etc/mesos-slave/containerizers

  • I see you changed it in the question above, but don't forget the 's' at the end. – Thijs Schnitger Jul 16 '15 at 06:48
  • thanks, I've changed it. Do you know how to fix this. – Maripi Jul 16 '15 at 06:54
  • Well, the containerizers fie should translate to a flag of the mesos-slave process: `/usr/sbin/mesos-slave --master=zk://1.2.3.4:2181/mesos --log_dir=/var/log/mesos --containerizers=docker,mesos --hostname=1.2.3.4`. Is there an error logged in /var/log/mesos/mesos-master.ERROR? – Thijs Schnitger Jul 16 '15 at 06:57
  • I've installed mesos in my home directory i.e mesos directory is there in my home directory. No, my log files are not showing any errors. I'm using `./bin/mesos-slave.sh --log_dir==/home/file-path --containerizers=docker,mesos --master=127.0.0.1:5050` to start slave. – Maripi Jul 16 '15 at 07:20
  • So where exactly does it go wrong? Do you see mesos and marathon interfaces at ports 5050 and 8080? Can you post a .json to marathon? What does the .json look like? – Thijs Schnitger Jul 16 '15 at 08:17
  • yes, I'm able to see the mesos and marathon interfaces. But when I post a .json file, it's showing deploying for hours and it's not getting deployed. So, I thought may be it's due to --containerizers flag as I don't have that containerizers file. – Maripi Jul 16 '15 at 08:52
  • If the containerizers flag is in your process list, than it should work. In any case the log files should tell you what's happening. Probably the Mesos interface will show you a bunch of failed tasks? If so, check the stdout/stderr of those. – Thijs Schnitger Jul 16 '15 at 09:25
  • Maybe the answer is in the json. Perhaps you are requesting resources (ports, cpu, mem) that are not available? – Thijs Schnitger Jul 16 '15 at 09:33
  • I'm trying to deploy A Simple docker-based application(basic-3) in this link https://mesosphere.github.io/marathon/docs/application-basics.html – Maripi Jul 16 '15 at 12:13
  • Does the user running Mesos have permissions to run docker? Can the docker daemon reach the docker hub for pulling the image? – Thijs Schnitger Jul 16 '15 at 12:34
  • yes, I'm able to pull an image if I directly write `"cmd":"docker pull xxx/image"`. While trying the other way, it's only showing delpoying for hours. – Maripi Jul 17 '15 at 09:16
  • logs of the containers should be under `/tmp/mesos/slaves/[id]/frameworks/[id]/executors/[id]/runs/[id]/` and would be called `stdout` and `stderr`. You should be able to find more info there. – Thijs Schnitger Jul 17 '15 at 12:17