docker-compose ERROR: network jumpserver_default has active endpoints

**

问题:

**
使用docker-compose up 启动jumpserver项目时,出现报错
ERROR: network jumpserver_default has active endpoints
同样在关闭时也报错:

[root@localhost jumpserver]# docker-compose up
Creating redis ...
Creating redis ... done
Creating jumpserver ...
Creating jumpserver ... error

ERROR: for jumpserver  Cannot start service jumpserver: service endpoint with name jumpserver already exists

ERROR: for jumpserver  Cannot start service jumpserver: service endpoint with name jumpserver already exists
ERROR: Encountered errors while bringing up the project.

**

解决方法:

**
使用 docker network disconnect -f {network} {endpoint-name},其中的 {endpoint-name} 可以使用命令 docker network inspect {network} 获得。
实际如下:

[root@localhost sysconfig]# docker network inspect jumpserver_default
[
    {
        "Name": "jumpserver_default",
        "Id": "945a4fc8137243ea6c6cd8198f92e7d1fe9027f2a70f4a2fba5ec61086f3bbed",
        "Created": "2017-12-01T15:29:11.994844259+08:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {
            "dbcc7e19186acf586353c931c4c7d5455f553e86ff4d0c35482986d48fa1327d": {
                "Name": "jumpserver",
                "EndpointID": "2df020f59e61d2854e92c3bf78a98d580b6577bfa604e5c4066f622dd0a345fa",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

可以看到jump_default 的endpoint的名称“Name”为jumpserver
所以执行以下命令清除即可:

[root@localhost sysconfig]# docker network disconnect -f jumpserver_default jumpserver
[root@localhost sysconfig]# docker network inspect jumpserver_default
[
    {
        "Name": "jumpserver_default",
        "Id": "945a4fc8137243ea6c6cd8198f92e7d1fe9027f2a70f4a2fba5ec61086f3bbed",
        "Created": "2017-12-01T15:29:11.994844259+08:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {},
        "Options": {},
        "Labels": {}
    }
]

重新使用docker-compose up -d 启动jumpserver服务。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值