0

I want to run docker container through marathon on mesos cluster so I added docker in mesos-slave containerizers configuration with below command.

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

After change mesos-slave its not starting. I am getting error

Insufficient version of Docker! Please upgrade to >= 1.0.0' in slave logs while restarting: Here below is complete log

May 19 15:24:09 flo-doc-nfr-b2b-27 mesos-slave[18055]: W0519 15:24:04.174897 18055 logging.cpp:81] RAW: Received signal SIGTERM from process 19232 of user 0; exiting
May 19 15:24:10 flo-doc-nfr-b2b-27 mesos-slave[19275]: I0519 15:24:10.360828 19275 logging.cpp:172] INFO level logging started!
May 19 15:24:10 flo-doc-nfr-b2b-27 mesos-slave[19275]: I0519 15:24:10.361471 19275 main.cpp:156] Build: 2015-05-05 06:16:58 by root
May 19 15:24:10 flo-doc-nfr-b2b-27 mesos-slave[19275]: I0519 15:24:10.361518 19275 main.cpp:158] Version: 0.22.1
May 19 15:24:10 flo-doc-nfr-b2b-27 mesos-slave[19275]: I0519 15:24:10.361543 19275 main.cpp:161] Git tag: 0.22.1
May 19 15:24:10 flo-doc-nfr-b2b-27 mesos-slave[19275]: I0519 15:24:10.361565 19275 main.cpp:165] Git SHA: d6309f92a7f9af3ab61a878403e3d9c284ea87e0
May 19 15:24:10 flo-doc-nfr-b2b-27 mesos-slave[19275]: Failed to create a containerizer: Could not create DockerContainerizer: Insufficient version of Docker! Please upgrade to >= 1.0.0

Below is docker version details on mesos-slave:

Client:

  • Version: 1.11.1
  • API version: 1.23
  • Go version: go1.5.4
  • Git commit: 5604cbe
  • Built: Tue Apr 26 23:20:46 2016
  • OS/Arch: linux/amd64

Server:

  • Version: 1.11.1
  • API version: 1.23
  • Go version: go1.5.4
  • Git commit: 5604cbe
  • Built: Tue Apr 26 23:20:46 2016
  • OS/Arch: linux/amd64

Mesos version on slave: 0.22.1

If I remove containerizers configuration from slave then its working fine. Mesos, Marathon, Docker are running as service on nodes.

I even tried downgrading mesos to 0.21.1 & docker to 1.9.0 but getting same error.

Can someone please help me on this?

Thanks!! Sumit

janisz
  • 6,292
  • 4
  • 37
  • 70
ssuummit
  • 45
  • 6
  • 1
    Why doN#t you use the current Mesos version 0.28.1, but 0.22.1 instead? – Tobi May 19 '16 at 14:48
  • Latest package available on mesosphere apt repo is 0.22.1that's why I used it. For 0.28.1 I have build it manually. – ssuummit May 19 '16 at 15:18
  • That's not correct, the version 0.28.1 is available. You have to add the Mesosphere repository. See http://open.mesosphere.com/downloads/mesos/ and https://open.mesosphere.com/getting-started/install/ – Tobi May 19 '16 at 15:29
  • Yes I agree that 0.28.1 is available but only for debian 8. I have debian 7 machine and last mesos version which is available for debian 7 is 0.22.1 – ssuummit May 19 '16 at 15:53

1 Answers1

1

I think you need to use one of 0.24.1, 0.23.1, 0.22.2 or 0.21.2 due to MESOS-2986.

Try to build mesos from source rather than using debs. Here is pretty straightforward tutorial how to do it.

# Install the packages.
sudo apt-get install -qq tar wget openjdk-7-jdk build-essential python-dev libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev
# Download the source
wget http://www.apache.org/dist/mesos/0.28.1/mesos-0.28.1.tar.gz
tar -zxf mesos-0.28.1.tar.gz
# Build Mesos
cd mesos-0.28.1
mkdir build
cd build
../configure
make -j 8

EDIT:

Marathon require libmesos to be placed in the system so after building Mesos from source ensure proper lib will be used. Below extract from documentation

MESOS_NATIVE_JAVA_LIBRARY: bin/start searches the common installation paths, /usr/lib and /usr/local/lib, for the Mesos native library. If the library lives elsewhere in your configuration, set the environment variable MESOS_NATIVE_JAVA_LIBRARY to its full path.

For example:

$ MESOS_NATIVE_JAVA_LIBRARY=/Users/bob/libmesos.dylib ./bin/start --master local --zk zk://localhost:2181/marathon

janisz
  • 6,292
  • 4
  • 37
  • 70
  • Thanks a lot for your response. I tried 0.28.1 by building from source, but somehow slave is shutting down automatically after running for 1-2 minutes. Getting **Slave asked to shut down by master@10.84.190.67:5050 because 'health check timed out** in slave logs. – ssuummit May 20 '16 at 05:51
  • Also my slave and master are running on same host so it could not be possible due to network glitches. Don't know why health check is failing. Any idea? – ssuummit May 20 '16 at 05:58
  • Hey Janisz, I rebuild mesos, now mesos master & slave are working fine. But somehow my marathon is not able to detect mesos master. I am getting error **Trying to get '/mesos/json.info_0000000008' in ZooKeeper, Failed to detect a master: Failed to parse data of unknown label 'json.info'**. Mesos version is 0.28.0 and Marathon version is 1.1.1. – ssuummit May 20 '16 at 07:01
  • Here are command which I am using to start them: Mesos-master: `./mesos-0.28.1/build/bin/mesos-master.sh --zk=zk://localhost:2181/mesos --quorum=1 --work_dir=/var/lib/mesos` Mesos-slave: `./mesos-0.28.1/build/bin/mesos-slave.sh --master=zk://localhost:2181/mesos --containerizers=docker,mesos` Marathon: `./bin/start --master zk://localhost:2181/mesos --zk zk://localhost:2181/marathon` – ssuummit May 20 '16 at 07:02
  • How do you run marathon? I think the problem is related to `libmesos.so`. Set `MESOS_NATIVE_JAVA_LIBRARY` with full path to new `libmesos.so`. More in [docs](https://mesosphere.github.io/marathon/docs/) – janisz May 20 '16 at 09:07
  • Tried with MESOS_NATIVE_JAVA_LIBRARY still same error. Here is how I am running marathon: `MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so ./marathon-1.1.1/bin/start --master 10.84.190.67:5050 --disable_revive_offers_for_new_apps` If I run mesos & marathon without zookeeper then its able to detect master, but not able to run any task on connected salve. – ssuummit May 20 '16 at 10:07
  • does `/usr/lib/libmesos.so` goes from your build or from deb package you have installed? – janisz May 20 '16 at 10:38
  • It comes from build as I have build after purging mesos deb package. – ssuummit May 20 '16 at 11:05
  • Hey Janisz, finally I am able to resolve issue. It was because of Java. `Marathon 1.1.1` requires `JDK 8` . I install `JDK8` while building marathon from source but when I installed `zookeeper 3.4.5` it automatically downgraded my java to `JDK7`. Now I am running zookeeper on different node and mesos, marathon on different nodes. Thanks a lot for your help!! – ssuummit May 20 '16 at 11:28