gpt4 book ai didi

docker - RabbitMQ Docker容器不适用于AWS EC2实例

转载 作者:行者123 更新时间:2023-12-02 20:48:20 25 4
gpt4 key购买 nike

我有一个正在运行的RabbitMQ Docker容器,该容器由PHP AMQ库与Docker组成。

在笔记本电脑上本地运行时,一切正常,RabbitMQ可以接受请求。

但是,当部署到t2.medium实例进行测试时,RabbitMQ容器会每隔40-50秒不断重启并崩溃。

更糟的是,我在EC2实例中找不到erl_crash.dump文件。

   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 : rabbit@bbee863f0066
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/rabbit@bbee863f0066
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 : rabbit@bbee863f0066
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/rabbit@bbee863f0066

=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 : rabbit@bbee863f0066
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/rabbit@bbee863f0066
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 : rabbit@bbee863f0066
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/rabbit@bbee863f0066

=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 : rabbit@bbee863f0066
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/rabbit@bbee863f0066
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 docker撰写文件:
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

有什么想法为什么它不起作用,或者我如何获得这个转储文件?

最佳答案

该问题是由于docker-compose mem-limit设置不正确引起的

    mem_limit: 80000000

此设置为80mb,不足以使RabbitMQ正确初始化。

解决方案是删除它并让docker_compose管理容器内存。

关于docker - RabbitMQ Docker容器不适用于AWS EC2实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47655131/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com