我在docker-compose.yml中有这个配置:
rabbitmq:
image: rabbitmq:3.5.1-management
ports:
- "${CPF_RABBITMQ_PORT}:5672"
- "${CPF_RABBITMQ_MANAGEMENT_PORT}:15672"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
Rabbitmq服务器正常运行。但是当服务器启动并且我输入容器以使用rabbitmqctl时,我收到以下错误:
rabbitmqctl list_queues
Error: unable to connect to node rabbit@0928435c3767: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@0928435c3767]
rabbit@0928435c3767:
* connected to epmd (port 4369) on 0928435c3767
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?
current node details:
- node name: 'rabbitmq-cli-277@0928435c3767'
- home dir: /root
- cookie hash: cE9wdMxW96ogqvZmxND6cA==
我失踪了什么? Shoudn&#t; tt"只是工作" ?
答案 0 :(得分:1)
我找到了解决方案。如果你升级rabbitmq容器它只是工作。 我换了一行:
image: rabbitmq:3.5.1-management
要:
image: rabbitmq:3-management