Docker容器未启动,因为兔子没有光盘空间

时间:2016-12-11 10:18:06

标签: docker rabbitmq docker-compose

RabbitMQ似乎占用了太多的磁盘空间并且无法启动。如何在Mac上删除它?我似乎找不到它。我已经尝试删除所有图像和容器,然后从头开始重建,希望它能解决问题。

$docker logs rabbitmq

              RabbitMQ 3.6.6. Copyright (C) 2007-2016 Pivotal Software, Inc.
  ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
  ##  ##
  ##########  Logs: tty
  ######  ##        tty
  ##########
              Starting broker...

=INFO REPORT==== 11-Dec-2016::10:06:13 ===
Starting RabbitMQ 3.6.6 on Erlang 19.0.7
Copyright (C) 2007-2016 Pivotal Software, Inc.
Licensed under the MPL.  See http://www.rabbitmq.com/

=INFO REPORT==== 11-Dec-2016::10:06:13 ===
node           : rabbit@538f7beedbe3
home dir       : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/rabbitmq.config
cookie hash    : kOyaDgypIBcP8tZ01/3Fdg==
log            : tty
sasl log       : tty
database dir   : /var/lib/rabbitmq/mnesia/rabbit@538f7beedbe3

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
Memory limit set to 799MB of 1997MB total.

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
Disk free limit set to 50MB

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
Disk free space insufficient. Free bytes:0 Limit:50000000

=WARNING REPORT==== 11-Dec-2016::10:06:18 ===
disk resource limit alarm set on node rabbit@538f7beedbe3.

**********************************************************
*** Publishers will be blocked until this alarm clears ***
**********************************************************

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
Limiting to approx 1048476 file handles (943626 sockets)

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
FHC read buffering:  OFF
FHC write buffering: ON

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
Database directory at /var/lib/rabbitmq/mnesia/rabbit@538f7beedbe3 is empty. Initialising from scratch...

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: mnesia
    exited: stopped
    type: temporary

=CRASH REPORT==== 11-Dec-2016::10:06:18 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.116.0>
    registered_name: []
    exception exit: {{cannot_create_schema,
                         {file_error,
                             "/var/lib/rabbitmq/mnesia/rabbit@538f7beedbe3/rabbit@538f7beedbe3514846847780.BUPTMP",
                             enospc}},
                     {rabbit,start,[normal,[]]}}
      in function  application_master:init/4 (application_master.erl, line 134)
    ancestors: [<0.115.0>]
    messages: [{'EXIT',<0.117.0>,normal}]
    links: [<0.115.0>,<0.31.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 1598
    stack_size: 27
    reductions: 98
  neighbours:

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: rabbit
    exited: {{cannot_create_schema,
                 {file_error,
                     "/var/lib/rabbitmq/mnesia/rabbit@538f7beedbe3/rabbit@538f7beedbe3514846847780.BUPTMP",
                     enospc}},
             {rabbit,start,[normal,[]]}}
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: ranch
    exited: stopped
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: os_mon
    exited: stopped
    type: temporary


BOOT FAILED
===========

Error description:
   {could_not_start,rabbit,
       {{cannot_create_schema,
            {file_error,
                "/var/lib/rabbitmq/mnesia/rabbit@538f7beedbe3/rabbit@538f7beedbe3514846847780.BUPTMP",
                enospc}},
        {rabbit,start,[normal,[]]}}}

Log files (may contain more information):
   tty
   tty


=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: amqp_client
    exited: stopped
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: syntax_tools
    exited: stopped
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: rabbit_common
    exited: stopped
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: xmerl
    exited: stopped
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: asn1
    exited: stopped
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
    application: inets
    exited: stopped
    type: temporary

=INFO REPORT==== 11-Dec-2016::10:06:18 ===
Error description:
   {could_not_start,rabbit,
       {{cannot_create_schema,
            {file_error,
                "/var/lib/rabbitmq/mnesia/rabbit@538f7beedbe3/rabbit@538f7beedbe3514846847780.BUPTMP",
                enospc}},
        {rabbit,start,[normal,[]]}}}

Log files (may contain more information):
   tty
   tty

{"init terminating in do_boot",{could_not_start,rabbit,{{cannot_create_schema,{file_error,"/var/lib/rabbitmq/mnesia/rabbit@538f7beedbe3/rabbit@538f7beedbe3514846847780.BUPTMP",enospc}},{rabbit,start,[normal,[]]}}}}
init terminating in do_boot ()

Crash dump is being written to: erl_crash.dump...

我可以在docker-compose.yml中定义Rabbit的物理卷吗?

2 个答案:

答案 0 :(得分:1)

您也可以通过运行此命令来摆脱悬空卷:

docker system prune -a

答案 1 :(得分:0)

这两个命令完成了这项任务:

 docker rmi $(docker images -q) //removes all images
 docker volume rm $(docker volume ls -f dangling=true -q) // removes all volumes