Docker-Cloud“自己的节点”无法连接(ubuntu服务器)

时间:2017-01-21 17:20:16

标签: ubuntu docker docker-cloud

我尝试将我的vps服务器与dockercloud-agent连接,但我无法让它运行。

我尝试了多个Ubuntu-Server版本(14.05,15.05和16.xx) 安装了docker,执行了cloud.docker脚本。

在启动时,我在docker-cloud Dasboard上“部署”,但总是失败。这是日志输出:

Bringing your node to Docker Cloud...
Agent contacted! Checking whether docker has started in node...
Waiting for docker port to be open...
Docker port is open!
Waiting for docker server to be up...
[...]
Waiting for docker server to be up...
Instance has been removed from Docker Cloud
PLEASE NOTE: we have not shut down the underlying host as it was not created by Docker Cloud
ERROR: Unable to connect to the Docker daemon in 42xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.node.dockerapp.io. Please try to restart the Docker Cloud agent and contact support if the problem persists.

Reallocating containers in other nodes...
Reallocation done!

我打开了Ports:

TCP 6783
UDP 6783
TCP 2375

我甚至试图用禁用的防火墙运行它。

我发现了什么:

  • 无法访问DockerAPI(我使用此article可以访问)
  • 我执行了dockercloud脚本之后再无法访问

1 个答案:

答案 0 :(得分:1)

好的,我让它在Ubuntu Server 16.04上运行

我首先启用了docker rest API:

  • 1)打开lib / systemd / system / docker.service
  • 2)编辑以ExecStart开头的行到ExecStart = / usr / bin / docker daemon -H fd:// -H tcp://0.0.0.0:2375
  • 3)reload daemon:systemctl daemon-reload
  • 4)重启docker service:service docker restart
  • 5)执行dockercloud-agend脚本。

现在应该可以了。