错误:对于couchbase-db驱动程序编程外部连接失败

时间:2016-08-08 07:16:24

标签: docker couchbase

docker-compose up
Starting dev_couchbase-db_1
dev_mysql-db_1 is up-to-date

ERROR: for couchbase-db  driver failed programming external connectivity on endpoint dev_couchbase-db_1 (1fcc046cf53cac9faf47de38eb23469ab686a73a7cf6b1f55ea0d217f87fcab6): Bind for 0.0.0.0:11210 failed: port is already allocated
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "compose/cli/main.py", line 63, in main
AttributeError: 'ProjectError' object has no attribute 'msg'
docker-compose returned -1

当我尝试运行这些命令来启动docker时,会出现这些错误。

然后我做netstat:

:~/development/dfraud/docker/dev$ netstat -l
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State      
    tcp        0      0 localhost:mysql         *:*                     LISTEN     
    tcp        0      0 localhost:63342         *:*                     LISTEN     
    tcp        0      0 vegan:domain            *:*                     LISTEN     
    tcp        0      0 *:37367                 *:*                     LISTEN     
    tcp        0      0 localhost:6942          *:*                     LISTEN     
    tcp6       0      0 [::]:28329              [::]:*                  LISTEN     
    tcp6       0      0 [::]:11210              [::]:*                  LISTEN     
    tcp6       0      0 [::]:3310               [::]:*                  LISTEN     
    tcp6       0      0 [::]:8091               [::]:*                  LISTEN     
    tcp6       0      0 [::]:8092               [::]:*                  LISTEN     
    tcp6       0      0 [::]:8093               [::]:*                  LISTEN     
    tcp6       0      0 [::]:40286              [::]:*                  LISTEN  
我在那里看到11210。它似乎是空的。

而没有其他容器:

docker ps -a
CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS                      PORTS                    NAMES
86fa576a95f18       qq/baseline:hepsiburada   "/home/infoowl/instal"   3 days ago          Exited (1) 26 minutes ago                            dev_fraud-app_1
c113b94cf8817        mysql:5.7.11                   "docker-entrypoint.sh"   3 days ago          Up 16 minutes               0.0.0.0:3310->3306/tcp   dev_mysql-db_1
a3a39676f9f9c        couchbase/server               "/entrypoint.sh couch"   3 days ago          Exited (128) 11 hours ago                            dev_couchbase-db_1
b899a05f04ee7        hello-world                    "/hello"                 6 days ago          Exited (0) 6 days ago                                cranky_hypatia
bfa004e39fbf1        hello-world                    "/hello"                 6 days ago          Exited (0) 6 days ago                                modest_keller
37e6efc5b2ae9        mysql/mysql-server             "/entrypoint.sh mysql"   13 days ago         Exited (0) 9 days ago                                demo-mysql
cad1af1b49b10        c478557s729bb                   "sh -c 'cd /root/proj"   8 weeks ago         Exited (0) 3 weeks ago                               dev_turktelekom-app_1
9d32d908f8264        mysql:5.7.11                   "docker-entrypoint.sh"   8 weeks ago         Exited (0) 3 weeks ago                               dev_ttg-mysql-db_1
ff@ff:~/development/dfraud/docker/dev$ 

Whaat有问题吗?

1 个答案:

答案 0 :(得分:2)

这可能与couchbase-db的关系不大,而且更多的是ro docker-compose 参见:

使用Hyper-V(Windows)或Mac VM时,如果不删除VirtualBox,可能会发生这种情况。

你也有这个评论:

  

我删除了所有自定义网络,删除了所有容器,然后删除了docker/network/files/local-kv.db并重新启动了我的计算机。

警告:

  

这个问题实际上是两个问题:

     
      
  1. 当端口已被其他应用程序(例如Apache)使用时,会出现令人困惑的错误消息。这已经在Docker 1.12.0中得到修复(它现在明确地说“已经分配了端口”)。

  2.   
  3. 停止容器后,他们使用的端口有时仍会映射到localhost。

  4.   

在您的情况下,由于您使用的是Ubuntu(不涉及VM),消息为“port is already allocated”,您必须使用该端口提供其他服务。