【问题标题】:rabbitmq-server don't start - unable to connect to epmd / Ubuntu 16.04rabbitmq-server 不启动 - 无法连接到 epmd / Ubuntu 16.04
【发布时间】:2018-01-07 13:56:06
【问题描述】:

我按照本指南https://www.rabbitmq.com/install-debian.html 安装了rabbitmq-server。但是,它不会以错误消息开头:

Jul 31 20:29:49 76672.local rabbitmqctl[7519]: attempted to contact: [rabbit@76672]
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: rabbit@76672:
Jul 31 20:29:49 76672.local rabbitmqctl[7519]:   * unable to connect to epmd (port 4369) on 76672: badarg (unknown POSIX error)
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: current node details:
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: - node name: 'rabbitmq-cli-30@76672'
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: - home dir: /var/lib/rabbitmq
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: - cookie hash: VwJCJ/LkSvmUKaoPOglCcQ==
Jul 31 20:29:49 76672.local systemd[1]: Failed to start RabbitMQ broker.
Jul 31 20:29:49 76672.local systemd[1]: rabbitmq-server.service: Unit entered failed state.
Jul 31 20:29:49 76672.local systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
dpkg: error processing package rabbitmq-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu17) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
altor_work@76672:

我尝试在一个清晰的 Ubuntu 实例上进行此安装,但遇到了同样的错误。我用谷歌搜索了错误消息,似乎我的网络设置有问题 - 我想我应该从默认状态更改一些设置。

知道需要改变什么吗?或者我应该第一次尝试哪个设置?

附:我完全是 Unix 新手。对我来说,它只是一个运行 Python 脚本的云环境。

【问题讨论】:

标签: rabbitmq ubuntu-16.04


【解决方案1】:

如果它仅适用于 localhost 设置,请查看以下内容:

fgrep BindToDevice /lib/systemd/system/epmd.socket

【讨论】:

    【解决方案2】:

    我通过在文件 rabbitmq-env.conf 中设置 HOSTNAME 解决了我的问题。我不知道到底是什么导致了这个问题。

    我的设置:

    sudo cat /etc/hostname
    76672.localhost
    
    sudo cat /etc/hosts
    127.0.0.1   localhost
    127.0.1.1   ubuntu16.04 ubuntu16
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    127.0.0.1 76672.local
    
    /etc/rabbitmq/rabbitmq-env.conf
    # Empty - if the file is empty rabbitmq doesn't start
    HOSTNAME=76672.local # With this rabbitmq doesn't start either
    HOSTNAME=localhost # With this all works
    

    【讨论】:

    • /etc/hostname (76672.localhost) 中的主机名可能无法解析为 IP 地址。在/etc/hosts(仅76672.local)中没有提及它。 Erlang 要求主机名解析为某些内容。
    猜你喜欢
    • 2018-05-06
    • 1970-01-01
    • 2020-02-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-27
    • 2017-03-16
    • 2017-08-31
    相关资源
    最近更新 更多