如何使用AWS ubuntu机器设置docker swarm群集

如何使用AWS ubuntu机器设置docker swarm群集,ubuntu,docker,cluster-computing,docker-compose,docker-swarm,Ubuntu,Docker,Cluster Computing,Docker Compose,Docker Swarm,我得到了下面的错误。在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 G

我得到了下面的错误。在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机器(管理器、slave1、slave2)

  • 首先使用下面的命令启动concur节点

    docker run--restart=除非停止-d-p 8500:8500-h consul1 progrium/consu-server-bootstrap

  • 然后在同一台机器上启动了swarm Manager

    docker run--restart=除非停止-d-p 3375:2375consul://172.31.17.163:8500

  • 然后添加了2个奴隶

    docker-H=tcp://slave1ip:2375 --重新启动=除非停止运行-d swarm join--Advertised=slave1ip:2375consul://172.31.17.163:8500

    docker-H=tcp://slave2ip:2375 --重新启动=除非停止运行-d swarm join--Advertised=slave2ip:2375consul://172.31.17.163:8500

  • 在swarm manger机器中添加领事店

    DOCKER_OPTS=“--群集存储=consul://172.31.17.163:8500 --群集播发=eth0:2375-Htcp://0.0.0.0:2375 -Hunix:///var/run/docker.sock"

  • 码头工人信息

    导出DOCKER\u主机=tcp://172.31.17.163:3375

    docker run hello world

    这是完美的执行。我可以看到容器通过传播策略创造奴隶

    现在我只是试着去创造

    docker-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网络创建-d overlay myapp

    所以问题是,这不是用我当前的配置创建覆盖网络


    如何解决此错误

    我在docker swarm问题上发布了同样的问题。我得到的答案是错误的,我没有在所有从节点DOCKER_OPTS=“--集群存储中添加此配置=consul://172.31.17.163:8500 --群集播发=eth0:2375-Htcp://0.0.0.0:2375 -Hunix:///var/run/docker.sock"
     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)