Maxim Andreev
Maxim Andreev

Reputation: 197

rabbitmq-server don't start - unable to connect to epmd / Ubuntu 16.04

I followed this guide https://www.rabbitmq.com/install-debian.html and installed rabbitmq-server. However, it won't start with an error message:

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:

I tried to do this installation on a clear instance of Ubuntu and got the same error. I googled the error message and it seems I have some problem with network settings - I guess I should change some settings from their default state.

Any idea what needed to be changed? Or with which setting I should take my first try?

P.S. I'm completely novice in Unix. For me, it's just a cloud environment where I run my Python scripts.

Upvotes: 7

Views: 10562

Answers (2)

Michael Polenchuk
Michael Polenchuk

Reputation: 11

If it works with localhost setting only please check out the following:

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

Upvotes: 0

Maxim Andreev
Maxim Andreev

Reputation: 197

I solved my problem by setting HOSTNAME in the file rabbitmq-env.conf. I don't know what exactly caused the problem in the first place.

My settings:

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

Upvotes: 5

Related Questions