我尝试用RabbitMQ启动一个Docker容器,结果是下载了映像,但是容器没有启动。我在日志中得到以下消息:
error: RABBITMQ_DEFAULT_PASS is set but deprecated
error: RABBITMQ_DEFAULT_USER is set but deprecated
error: RABBITMQ_DEFAULT_VHOST is set but deprecated
error: RABBITMQ_ERLANG_COOKIE is set but deprecated
error: deprecated environment variables detected这个问题最近出现了,在此之前,一切都很顺利并开始了。
这是我的对接兔:
rabbit:
image: "rabbitmq:3-management"
hostname: "rabbit"
environment:
RABBITMQ_ERLANG_COOKIE: 'SWQOKODSQALRPCLNMEQGW'
RABBITMQ_DEFAULT_USER: 'user'
RABBITMQ_DEFAULT_PASS: 'bitnami'
RABBITMQ_DEFAULT_VHOST: '/'
ports:
- "15672:15672"
- "5672:5672"
labels:
NAME: "rabbitmq"
networks:
- postgres发布于 2021-08-04 23:52:32
最近,RabbitMQ (3.9)的最新稳定对接图像已经更新,官方图像页面上写道:
As of RabbitMQ 3.9, all of the docker-specific variables listed below are deprecated and no longer used.我以下列方式解决了这一问题:
发布于 2021-08-02 05:30:02
您应该使用以下环境变量:
DEFAULT_VHOST=/
DEFAULT_USER=user1
DEFAULT_PASS=pass1有关详细信息,请参阅https://www.rabbitmq.com/configure.html。
或者使用其他版本的rabbitMQ,如3.8:
rabbitmq:3.8-management发布于 2021-08-03 19:37:52
线
image: "rabbitmq:3-management"基本上(我认为)得到了兔子的最新稳定版本,即3.9,它已经不推荐这些变量了。如果您希望继续使用最新版本的兔子,则必须使用配置文件。考虑到到目前为止,您可能已经使用了3.8,我想这比它更有价值。可以改为使用3.8,方法是将行更改为:
image: "rabbitmq:3.8-management"在此版本中,变量不受欢迎,也不会抛出这些错误。
https://stackoverflow.com/questions/68600215
复制相似问题