【问题标题】:Why do containers fail to fetch URIs in DC/OS?为什么容器无法在 DC/OS 中获取 URI?
【发布时间】:2017-09-07 09:04:31
【问题描述】:

我按照这些说明here 使用 terraform 在 Digital Ocean (DC/OS 1.9) 上创建了一个集群

一切似乎都已正确安装,要从私有 docker 存储库中提取,我需要将压缩的 .docker 文件添加到我的 /core/home/ 并在部署期间通过将其包含在我的 JSON 中来获取它。

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

根据这些说明:https://docs.mesosphere.com/1.9/deploying-services/momee/docker-creds-agent/

我仍然遇到错误:

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

查看其中一位特工的日志:

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

【问题讨论】:

  • docker.tar.gz复制成功,好像是dns解析导致的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 我认为你是对的 shizhz,我尝试在 etc/hosts 文件中添加:127.0.0.1 digitalocean-dcos-agent-20 以解析 url,但我仍然一无所获。

标签: docker mesos mesosphere terraform dcos


【解决方案1】:

您缺少提取指令:

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

【讨论】:

    猜你喜欢
    • 2021-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-23
    • 1970-01-01
    • 1970-01-01
    • 2013-09-29
    相关资源
    最近更新 更多