yaronr / docker-mesos

A distributed computing cluster-in-a-box: Mesos, zookeeper, chronos, marathon, storm + add your own. Use other physical computers to add computation power to the cluster.
GNU General Public License v3.0
25 stars 8 forks source link

Unable to launch simple docker example in marathon. #3

Open HelloGrayson opened 10 years ago

HelloGrayson commented 10 years ago

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!

yaronr commented 10 years ago

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

HelloGrayson commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

yaronr commented 10 years ago

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

HelloGrayson commented 10 years ago

@yaronr Are you able to get anything working?

yaronr commented 10 years ago

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.

larskluge commented 9 years ago

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