在docker容器中启动RabbitMQ

时间:2019-06-19 15:03:49

标签: docker centos rabbitmq connection centos6

我有FROM centos:6个Docker容器。

我正在执行以下docker命令:

Step 10/24 : RUN wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm     && rpm -Uvh erlang-solutions-1.0-1.noarch.rpm     && yum install -y erlang
 ---> Using cache
 ---> 8cf0a02d5f95
Step 11/24 : RUN wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm     && rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc     && yum install -y rabbitmq-server-3.6.1-1.noarch.rpm
 ---> Using cache
 ---> 9f0702727c73
Step 12/24 : RUN chkconfig rabbitmq-server on
 ---> Using cache
 ---> a9914d5cc519
Step 13/24 : RUN service rabbitmq-server start
 ---> Using cache
 ---> 74058fde6836
Step 14/24 : RUN rabbitmqctl status
 ---> Running in d1837eb4724b
Status of node rabbit@d1837eb4724b ...
Error: unable to connect to node rabbit@d1837eb4724b: nodedown

DIAGNOSTICS
===========

attempted to contact: [rabbit@d1837eb4724b]

rabbit@d1837eb4724b:
  * connected to epmd (port 4369) on d1837eb4724b
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on d1837eb4724b
  * suggestion: start the node

current node details:
- node name: 'rabbitmq-cli-24@d1837eb4724b'
- home dir: /var/lib/rabbitmq
- cookie hash: pl7YvEX0JxuUWtu+SrYfFA==

The command '/bin/sh -c rabbitmqctl status' returned a non-zero code: 69

似乎RabbitMQ已启动,但由于某种原因,主机名d1837eb4724b未知。您能否解释一下错误原因并帮助我解决该问题?

0 个答案:

没有答案