我收到以下错误。在 swarm 集群中创建和运行容器时。
Creating network "ubuntu_default" with the default driver
ERROR: 500 Internal Server Error: failed to parse pool request
for address space "GlobalDefault" pool "" subpool "":
cannot find address space GlobalDefault
(most likely the backing datastore is not configured)
我遵循的步骤。
创建了一个 VPC 并添加了一个允许所有端口号的安全组。
在 AWS 中创建了 3 台 ubuntu 机器(manager、slave1、slave2)
首先使用以下命令启动 Consul 节点
docker run --restart=unless-stopped -d -p 8500:8500 -h consul1 progrium/consul -server -bootstrap
然后在同一台机器上启动了一个 swarm manager
docker run --restart=unless-stopped -d -p 3375:2375 swarm manage consul://172.31.17.163:8500
然后将2个奴隶添加到它
docker -H=tcp://slave1ip:2375 --restart=unless-stopped run -d swarm join --advertise=slave1ip:2375 consul://172.31.17.163:8500
docker -H=tcp://slave2ip:2375 --restart=unless-stopped run -d swarm join --advertise=slave2ip:2375 consul://172.31.17.163:8500
在 swarm manger 机器中添加了领事商店
DOCKER_OPTS="--cluster-store=consul://172.31.17.163:8500 --cluster-advertise=eth0:2375 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker 。短袜”
码头工人信息
Containers: 8
Running: 2
Paused: 0
Stopped: 6
Images: 4
Server Version: swarm/1.1.3
Role: primary
Strategy: spread
Filters: health, port, dependency, affinity, constraint
Nodes: 2
ip-172-31-19-203: slave1ip:2375
└ Status: Healthy
└ Containers: 4
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.018 GiB
└ Labels: executiondriver=native-0.2, kernelversion=3.13.0-74-generic, operatingsystem=Ubuntu 14.04.4 LTS, storagedriver=aufs
└ Error: (none)
└ UpdatedAt: 2016-03-29T11:32:39Z
ip-172-31-42-220: slave2ip:2375
└ Status: Healthy
└ Containers: 4
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.018 GiB
└ Labels: executiondriver=native-0.2, kernelversion=3.13.0-74-generic, operatingsystem=Ubuntu 14.04.4 LTS, storagedriver=aufs
└ Error: (none)
└ UpdatedAt: 2016-03-29T11:32:21Z
Plugins:
Volume:
Network:
Kernel Version: 3.13.0-74-generic
Operating System: linux
Architecture: amd64
CPUs: 2
Total Memory: 2.035 GiB
Name: 257d542e5b26
导出 DOCKER_HOST=tcp://172.31.17.163:3375
码头工人运行你好世界
它执行得很完美。我可以看到容器使用传播策略创建从属
现在我只是尝试创建
码头工人-compose.yml
version: "2"
services:
web:
image: busybox
码头工人组成
这表示以下错误。
Creating network "ubuntu_default" with the default driver
ERROR: 500 Internal Server Error: failed to parse pool request
for address space "GlobalDefault" pool "" subpool "":
cannot find address space GlobalDefault
(most likely the backing datastore is not configured)
它给出了同样的错误
docker network create -d 覆盖 myapp
所以问题是,这不是用我当前的配置创建覆盖网络。
如何解决此错误?