5

I have created a cluster on Digital Ocean (DC/OS 1.9) using terraform following these instructions here

Everything seems to have installed correctly, to pull from a private docker repo, I need to add a compressed .docker file to my /core/home/ and fetch it during deployment by including it in my JSON.

"fetch":[  
   {  
      "uri":"file:///home/core/docker.tar.gz"
   }
]

Based on these instructions: https://docs.mesosphere.com/1.9/deploying-services/momee/docker-creds-agent/

And I'm still getting errors:

Failed to launch container: 
Failed to fetch all URIs for container 'abc123-xxxxx' with exit status: 256

Upon looking at the logs of one of the agents:

Starting container '123-abc-xxx' for task 'my-docker-image-service.321-dfg-xxx' (and executor 'my-docker-image-service.397d20cb-1
Begin fetcher log (stderr in sandbox) for container 123-abc-xxx from running command: /opt/mesosphere/packages/mesos--aaedd03eee0d57f5c0d49c
Fetcher Info: {"cache_directory":"\/tmp\/mesos\/fetch\/slaves\/94af100c-4dc2-416d-b6d7-eec0d947a1a6-S11","items":[{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":true,"value":"file:\/\/\/home\/core\/docker.tar.gz"}}],"sandbox_directory":"\/var\/lib\/mesos\/slave\/slaves\/94af100c-4dc2-416d-b6d7-eec0d947a1a6-S11\/frameworks\/94af100c-4dc2-416...
Fetching URI 'file:///home/core/docker.tar.gz'
Fetching directly into the sandbox directory
Fetching URI 'file:///home/core/docker.tar.gz'
Copied resource '/home/core/docker.tar.gz' to '/var/lib/mesos/slave/slaves/94af100c-4dc2-416d-b6d7-eec0d947a1a6-S11/frameworks/94af100c-4dc2-416d-b6d7-eec0d947a1a6-0
Failed to obtain the IP address for 'digitalocean-dcos-agent-20'; the DNS service may not be able to resolve it: Name or service not known
End fetcher log for container 123-abc-xxx
Failed to run mesos-fetcher: Failed to fetch all URIs for container '123-abc-xxx' with exit status: 256
Dominic Cabral
  • 844
  • 6
  • 21
  • 3
    docker.tar.gz is successfully copied, seems it's caused by the dns resolution, `Failed to obtain the IP address for 'digitalocean-dcos-agent-20'; the DNS service may not be able to resolve it: Name or service not known` – shizhz Apr 12 '17 at 01:39
  • @shizhz I think you are correct shizhz, I've tried adding: `127.0.0.1 digitalocean-dcos-agent-20` to the `etc/hosts` file to resolve the url, but I still get nothing. – Dominic Cabral Apr 13 '17 at 13:56

1 Answers1

1

You are missing the extract instruction:

"fetch":[  
   {  
      "uri":"file:///home/core/docker.tar.gz",
      "extract":true
   }
]
itaysk
  • 4,670
  • 2
  • 27
  • 35