2017-12-05 29 views
0

Dockerを使用してPHP AMQライブラリで使用されているRabbitMQドッカーコンテナを実行しています。RabbitMQ DockerコンテナがAWS EC2インスタンス上で動作しない

私のラップトップでローカルで実行している場合、すべて正常に動作し、RabbitMQは要求を受け入れることができます。

しかし、テストのためにt2.mediumインスタンスにデプロイする場合、RabbitMQコンテナは40-50秒ごとに再起動とクラッシュを続けます。

さらに悪いことに、私はerl_crash.dumpファイルをEC2インスタンスで見つけることができません。

Crash dump is being written to: erl_crash.dump... 
       RabbitMQ 3.6.14. Copyright (C) 2007-2017 Pivotal Software, Inc. 
    ## ##  Licensed under the MPL. See http://www.rabbitmq.com/ 
    ## ## 
    ########## Logs: tty 
    ###### ##  tty 
    ########## 
       Starting broker... 

=INFO REPORT==== 5-Dec-2017::13:49:05 === 
Starting RabbitMQ 3.6.14 on Erlang 19.2.1 
Copyright (C) 2007-2017 Pivotal Software, Inc. 
Licensed under the MPL. See http://www.rabbitmq.com/ 

=INFO REPORT==== 5-Dec-2017::13:49:05 === 
node   : [email protected] 
home dir  : /var/lib/rabbitmq 
config file(s) : /etc/rabbitmq/rabbitmq.config 
cookie hash : o9UBS7q82y5P84WzdKnCaw== 
log   : tty 
sasl log  : tty 
database dir : /var/lib/rabbitmq/mnesia/[email protected] 
erl_child_setup closed 

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

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

=INFO REPORT==== 5-Dec-2017::13:49:13 === 
Starting RabbitMQ 3.6.14 on Erlang 19.2.1 
Copyright (C) 2007-2017 Pivotal Software, Inc. 
Licensed under the MPL. See http://www.rabbitmq.com/ 

=INFO REPORT==== 5-Dec-2017::13:49:13 === 
node   : [email protected] 
home dir  : /var/lib/rabbitmq 
config file(s) : /etc/rabbitmq/rabbitmq.config 
cookie hash : o9UBS7q82y5P84WzdKnCaw== 
log   : tty 
sasl log  : tty 
database dir : /var/lib/rabbitmq/mnesia/[email protected] 

=ERROR REPORT==== 5-Dec-2017::13:49:15 === 
Loading of /usr/lib/erlang/lib/stdlib-3.2/ebin/dets_v9.beam failed: badfile 
WARNING: module dets_v9 not found, so not scanned for boot steps. 

=ERROR REPORT==== 5-Dec-2017::13:49:15 === 
beam/beam_load.c(1179): Error loading module dets_v9: 
    form size 113612 greater than size 82440 of binary 

erl_child_setup closed 

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

Crash dump is being written to: erl_crash.dump... 
       RabbitMQ 3.6.14. Copyright (C) 2007-2017 Pivotal Software, Inc. 
    ## ##  Licensed under the MPL. See http://www.rabbitmq.com/ 
    ## ## 
    ########## Logs: tty 
    ###### ##  tty 
    ########## 
       Starting broker... 

=INFO REPORT==== 5-Dec-2017::13:49:05 === 
Starting RabbitMQ 3.6.14 on Erlang 19.2.1 
Copyright (C) 2007-2017 Pivotal Software, Inc. 
Licensed under the MPL. See http://www.rabbitmq.com/ 

=INFO REPORT==== 5-Dec-2017::13:49:05 === 
node   : [email protected] 
home dir  : /var/lib/rabbitmq 
config file(s) : /etc/rabbitmq/rabbitmq.config 
cookie hash : o9UBS7q82y5P84WzdKnCaw== 
log   : tty 
sasl log  : tty 
database dir : /var/lib/rabbitmq/mnesia/[email protected] 
erl_child_setup closed 

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

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

=INFO REPORT==== 5-Dec-2017::13:49:13 === 
Starting RabbitMQ 3.6.14 on Erlang 19.2.1 
Copyright (C) 2007-2017 Pivotal Software, Inc. 
Licensed under the MPL. See http://www.rabbitmq.com/ 

=INFO REPORT==== 5-Dec-2017::13:49:13 === 
node   : [email protected] 
home dir  : /var/lib/rabbitmq 
config file(s) : /etc/rabbitmq/rabbitmq.config 
cookie hash : o9UBS7q82y5P84WzdKnCaw== 
log   : tty 
sasl log  : tty 
database dir : /var/lib/rabbitmq/mnesia/[email protected] 

=ERROR REPORT==== 5-Dec-2017::13:49:15 === 
Loading of /usr/lib/erlang/lib/stdlib-3.2/ebin/dets_v9.beam failed: badfile 
WARNING: module dets_v9 not found, so not scanned for boot steps. 

=ERROR REPORT==== 5-Dec-2017::13:49:15 === 
beam/beam_load.c(1179): Error loading module dets_v9: 
    form size 113612 greater than size 82440 of binary 

erl_child_setup closed 

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

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

=INFO REPORT==== 5-Dec-2017::13:49:22 === 
Starting RabbitMQ 3.6.14 on Erlang 19.2.1 
Copyright (C) 2007-2017 Pivotal Software, Inc. 
Licensed under the MPL. See http://www.rabbitmq.com/ 

=INFO REPORT==== 5-Dec-2017::13:49:22 === 
node   : [email protected] 
home dir  : /var/lib/rabbitmq 
config file(s) : /etc/rabbitmq/rabbitmq.config 
cookie hash : o9UBS7q82y5P84WzdKnCaw== 
log   : tty 
sasl log  : tty 
database dir : /var/lib/rabbitmq/mnesia/[email protected] 
erl_child_setup closed 

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

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

=INFO REPORT==== 5-Dec-2017::13:49:32 === 
Starting RabbitMQ 3.6.14 on Erlang 19.2.1 
Copyright (C) 2007-2017 Pivotal Software, Inc. 
Licensed under the MPL. See http://www.rabbitmq.com/ 

これはウサギのための私のドッキングウィンドウのコンファイルです:

rabbit: 
    mem_limit: 80000000 
    build: 'support/rabbitmq' 
    environment: 
     - RABBITMQ_DEFAULT_USER=${RABBITMQ_USER} 
     - RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD} 
     - RABBITMQ_VM_MEMORY_HIGH_WATERMARK=800MB 
    ports: 
     - "15672:15672" 
     - "5672:5672" 
    restart: unless-stopped 

任意のアイデアなぜその動作していない、または私は、このダンプファイルを取得できますか?

+0

ドッカーコンテナのログを提供する、ドッカーのログcontainer_id –

+0

私はそれから得たフルログを追加しました – kaleeway

+0

erl_crash.dumpはコンテナディレクトリの下にあるEC2インスタンスには含まれません。また、/ var/lib/rabbitmqフォルダまたはルートフォルダ –

答えて

1

問題がドッキングウィンドウ-構成mem-limitが誤ってこの設定は、RabbitMQのが適切に初期化するために十分ではない80メガバイト、ある

mem_limit: 80000000 

を設定しているためでした。

これを削除して、docker_composeがコンテナメモリを管理できるようにすることがソリューションでした。

関連する問題