docker-mesos icon indicating copy to clipboard operation
docker-mesos copied to clipboard

Unable to launch simple docker example in marathon.

Open HelloGrayson opened this issue 11 years ago • 8 comments

Any clue?

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" \
  localdocker:18080/v2/apps -d '
{
    "id": "inky",
    "container": {
        "docker": {
            "image": "mesosphere/inky"
        },
        "type": "DOCKER",
        "volumes": []
    },
    "args": ["isanybodythere"],
    "cpus": 0.1,
    "mem": 16.0,
    "instances": 1
}'

Thanks!

HelloGrayson avatar Sep 28 '14 07:09 HelloGrayson

Hi

Let's try to localise the problem first.

  1. Try to run something (a simple 'bash' hello world loop) from the Marathon UI. Does it work? 1.1) If that works, try to run another docker container. something small and simple - ubuntu. does it work?
  2. Are there any errors?
  3. Look at the docker logs (docker log

yaronr avatar Sep 28 '14 09:09 yaronr

A simple helloworld works:

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" \
  localdocker:18080/v2/apps -d '
{
    "id": "hello",
    "cpus": "0.1",
    "mem": "32",
    "cmd": "echo hello; sleep 10"
}'

This runs no problem, although I'm not able to view the sandbox link through the Mesos UI:

screen shot 2014-09-28 at 1 49 37 pm

HelloGrayson avatar Sep 28 '14 20:09 HelloGrayson

Hmmm... Inky fails even when avoiding the container contents by using echo hello; sleep 10 as the command:


curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" \
  localdocker:18080/v2/apps -d '
{
    "id": "inky",
    "container": {
        "docker": {
            "image": "mesosphere/inky"
        },
        "type": "DOCKER",
        "volumes": []
    },
    "cpus": 0.1,
    "mem": 16.0,
    "instances": 1,
    "cmd": "echo hello; sleep 10"
}'

screen shot 2014-09-28 at 1 52 27 pm

HelloGrayson avatar Sep 28 '14 20:09 HelloGrayson

Hmmm... ubuntu fails as well

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" \
  localdocker:18080/v2/apps -d '
{
    "id": "ubuntutest",
    "container": {
        "docker": {
            "image": "ubuntu"
        },
        "type": "DOCKER",
        "volumes": []
    },
    "cpus": 0.1,
    "mem": 16.0,
    "instances": 1,
    "cmd": "echo hello; sleep 10"
}'

screen shot 2014-09-28 at 2 11 21 pm

HelloGrayson avatar Sep 28 '14 21:09 HelloGrayson

Hi @breerly !

I've seen the bug where I can't connect to the sandbox. I've spent a few hours trying to understand it and solve it, unsuccessfully obviously. It's really annoying. My guess is that it has to do with port exposure and hostnames.

Regarding the others: Guessing it's unable to retrieve the images, do you think so too?

Can you try to grab the logs from the actual hosts? Please check that all your hosts have Internet access. please try to docker pull the image on the slave (does it work?) and then run the same mesos command

yaronr avatar Sep 29 '14 08:09 yaronr

@yaronr Are you able to get anything working?

HelloGrayson avatar Sep 29 '14 10:09 HelloGrayson

I did, back at the days I played with it. I will try again later - I'm in the middle of something right now. But the setup is pretty simple - so if you can fix it you self and send a pull request, that'll be great.

yaronr avatar Sep 29 '14 10:09 yaronr

Did somebody find a solution by any chance? I am running into the same problem currently.. Thanks a ton for any hints!

larskluge avatar Mar 06 '15 13:03 larskluge