Docker上的RabbitMQ没有创建cookie /找不到主机?

时间:2018-07-04 22:33:45

标签: docker rabbitmq

我正在尝试按照基本教程开始使用RabbitMQ,将其从“ docker run”转换为docker-compose。 http://josuelima.github.io/docker/rabbitmq/cluster/2017/04/19/setting-up-a-rabbitmq-cluster-on-docker.html

这是我的docker-compose文件:

version: '3'

services:
    rabbit1:
        image: rabbitmq:3.6.6-management
        restart: unless-stopped
        hostname: rabbit1
        ports:
            - "4369:4369"
            - "5672:5672"
            - "15672:15672"
            - "25672:25672"
            - "35197:35197"
        environment: 
            - RABBITMQ_USE_LONGNAME=true
            - RABBITMQ_LOGS=/var/log/rabbitmq/rabbit.log
        volumes:
            - "/nfs/docker/rabbit/data1:/var/lib/rabbitmq"
            - "/nfs/docker/rabbit/data1/logs:/var/log/rabbitmq"

尝试查看我是否可以连接(也删除访客帐户)时出现此错误。

Error: unable to connect to node rabbit@rabbit1: nodedown

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

attempted to contact: [rabbit@rabbit1]

rabbit@rabbit1:
  * connected to epmd (port 4369) on rabbit1
  * epmd reports node 'rabbit' running on port 25672
  * TCP connection succeeded but Erlang distribution failed
  * suggestion: hostname mismatch?
  * suggestion: is the cookie set correctly?
  * suggestion: is the Erlang distribution using TLS?

current node details:
- node name: 'rabbitmq-cli-41@rabbit1.no-domain'
- home dir: /var/lib/rabbitmq
- cookie hash: WjJle1otRdldm4Wso6HGfg==

查看持久性数据,它似乎没有创建cookie(无论我是否使用RABBITMQ_ERLANG_COOKIE变量),而且我不认为该域已得到正确处理。

RabbitMQ文档对此没有用。

0 个答案:

没有答案