2

I have been trying to deploy a docker container web based application on Mesos using Mesosphere Marathon.

I first tried deploying my Play Framework application which works fine when I launch it using the docker container. Then I also tried the example application mention on the Mesosphere website. Both fail inside marathon, but work fine when run as standalone docker images.

The application shows up as "Waiting" or "Deploying" in Marathon web UI while on Mesos it fails. I have made sure that the Mesos slave is running fine. I believe that because the application fails on Mesos, Marathon tries to restart it which is why I get these status message almost always.

I have previously tried deploying the same application (without wrapping it inside the docker container) on Marathon (same installation) and it has worked fine. However, we really want to use Docker for our applications.

I have gone through plenty of tutorials and everything seems to be following the "rules". I don't understand what could be wrong.

Edit:

E1104 19:29:01.291219  4242 slave.cpp:3342] Container '9dbebe8c-5506-4f70-b560-34be39ecdc96' for executor 'mediator.30dbd1ed-82fc-11e5-b1d4-56847afe9799' of framework '64d39023-aad3-4fdc-8565-6d8e3ec9cb77-0000' failed to start: Failed to 'docker -H unix:///var/run/docker.sock pull devrep/message-mediator:latest': exit status = exited with status 1 stderr = Error: image devrep/message-mediator:latest not found
W1104 19:29:01.293334  4244 docker.cpp:1002] Ignoring updating unknown container: 9dbebe8c-5506-4f70-b560-34be39ecdc96
E1104 19:29:06.711524  4241 slave.cpp:3342] Container 'b7f8004a-2759-41ec-8169-61d04a7c4c3d' for executor 'mediator.343b027e-82fc-11e5-b1d4-56847afe9799' of framework '64d39023-aad3-4fdc-8565-6d8e3ec9cb77-0000' failed to start: Failed to 'docker -H unix:///var/run/docker.sock pull devrep/message-mediator:latest': exit status = exited with status 1 stderr = Error: image devrep/message-mediator:latest not found
chbh
  • 336
  • 2
  • 13

2 Answers2

0

Without an actual error message or the logs, it's hard to guess what your problem could be.

My first thought is that you should check whether your Mesos Slaves are started with the --containerizers=docker,mesos flag at all. If not, it can't work at all.

Also, if you're using a private registry, either make sure that Docker on your Mesos Slaves is either configured to use it, or follow the guidelines in the Marathon docs on how o use a private registry.

Can you do a docker pull devrep/message-mediator:latest on any Mesos Slave?

Also, see

Tobi
  • 31,405
  • 8
  • 58
  • 90
  • Hi! Thanks for the reply. I have made sure that containerizers have been setup properly. I don't see anything in the logs. – chbh Nov 04 '15 at 11:26
  • Hm, I can't really believe that neither in the Mesos Slave log(s) nor in the Marathon log there's plain nothing when you're trying to start the Docker containers... It's very help to help you without hard facts like logs. – Tobi Nov 04 '15 at 11:39
  • I found mesos logs which I think can be helpful. They are added to the question description. – chbh Nov 04 '15 at 14:07
  • Are you using a private registry (`devrep`)? If you, you have to configure this for the Docker instances on your node... – Tobi Nov 04 '15 at 14:32
0

I know its very late to answer it but might be helpful. Seeing your logs I find

devrep/message-mediator:latest

here latest is the tag name of your image, if you don't provide one in container docker image or leave it blank like below

  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "devrep/message-mediator",
    },
  },

it automatically tries to pull the devrep/message-mediator:latest which I highly doubt will be present so try adding a tag name always e.g in my case it was v1

devrep/message-mediator:v1
Kuldeep Dangi
  • 4,126
  • 5
  • 33
  • 56