簡體   English   中英

Docker-Cloud“自己的節點”無法連接(ubuntu 服務器)

[英]Docker-Cloud "own node" doesn't connect (ubuntu server)

我試圖將我的 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!

我打開了端口:

TCP 6783
UDP 6783
TCP 2375

我什至嘗試在禁用防火牆的情況下運行它。

我發現了什么:

  • DockerAPI 不可訪問(我通過本文使其可訪問)
  • 在我執行 dockercloud 腳本后,它不再可用了

好的,我讓它在 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)重新加載守護進程:systemctl daemon-reload
  • 4)重啟docker服務:service docker restart
  • 5) 執行 dockercloud-agend 腳本。

現在它應該可以工作了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM