【问题标题】:Error with Docker daemon for docker installation on Fiware cloud在 Fiware 云上安装 Docker 的 Docker 守护进程出错
【发布时间】:2018-04-19 11:40:49
【问题描述】:

我是 Fiware 和 docker 技术的新手,所以我需要一些帮助。

我正在按照此链接http://simple-docker-hosting-on-fiware-cloud.readthedocs.io/en/v1.0/manuals/install 中的说明在 Fiware 云上创建一个 docker-host 机器,但是当我运行以下命令时:

docker-machine create -d openstack --openstack-flavor-id="2" --openstack-image-name="base_ubuntu_14.04" --openstack-net-name="node-int-net-01" --openstack-floatingip-pool="public-ext-net-01" --openstack-sec-groups="docker-sg" --openstack-ssh-user "ubuntu" docker-host

我收到以下错误:

Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded

虽然我可以在Fiware cloud上看到docker-host机器的实例,但是当我运行以下命令时:

eval "$(docker-machine env docker-host)"

出现以下错误:

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "147.27.60.136:2376": dial tcp 147.27.60.136:2376: connectex: No connection could be made because the target machine actively refused it.
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.**

我也尝试重新生成证书:

docker-machine regenerate-certs docker-host

但我收到以下错误:

Error getting SSH command to check if the daemon is up: ssh command error:
command : sudo docker version
err     : exit status 1
output  : Client:
 Version:       18.04.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    3d479c0
 Built: Tue Apr 10 18:21:14 2018
 OS/Arch:       linux/amd64
 Experimental:  false
 Orchestrator:  swarm
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?**

Image with the result for the Command: docker-machine ls

我做错了什么?

我使用 Windows 10 的 docker 社区版。

docker版本是:

客户:

  • 版本:18.03.0-ce
  • API 版本:1.37
  • Go 版本:go1.9.4
  • Git 提交:0520e24
  • 建成时间:2018 年 3 月 21 日星期三 23:06:28
  • 操作系统/Arch:windows/amd64
  • 实验性:错误
  • 协调者:swarm

服务器:

  • 版本:18.03.0-ce
  • API 版本:1.37(最低版本 1.12)
  • Go 版本:go1.9.4
  • Git 提交:0520e24
  • 建成时间:2018 年 3 月 21 日星期三 23:14:32
  • 操作系统/Arch:linux/amd64
  • 实验性:错误

【问题讨论】:

    标签: docker fiware


    【解决方案1】:

    首先确保您已在默认安全组中打开 docker 端口 (tcp/2376)

    我建议你使用 base_ubuntu_16.04 而不是 base_ubuntu_14.04

    无论如何,它一开始不会正常运行。最新版本的 docker 和 docker-machine 存在问题。作为一种解决方法,在运行 docker-machine 命令后,您可以这样做来解决问题:

    ssh docker-host 'sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual ; sudo modprobe aufs ; sudo service docker start'
    

    但是,由于 docker 主机中的 MTU 配置,您可能会发现更多问题。要解决这些问题,您可以使用以下命令降低 MTU:

    docker-machine ssh docker-host "sudo sed -i 's/--label provider=openstack/--label provider=openstack\n--mtu=1400/g' /etc/default/docker"
    docker-machine ssh docker-host "sudo service docker restart"
    docker-machine ssh docker-host "sudo ip link set mtu 1400 dev docker0"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-16
      • 1970-01-01
      • 1970-01-01
      • 2018-11-08
      • 2021-10-27
      • 1970-01-01
      • 1970-01-01
      • 2014-12-12
      相关资源
      最近更新 更多