Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682816 - net-misc/rabbitmq-server does not start without epmd (incomplete dependencies, OpenRC)
Summary: net-misc/rabbitmq-server does not start without epmd (incomplete dependencies...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-07 14:51 UTC by Daniel Neugebauer
Modified: 2019-10-06 12:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Neugebauer 2019-04-07 14:51:42 UTC
Attempting to simply emerge rabbitmq-server in both current stable (3.6.9) and keyworded (3.7.13) version produces an error message "Distribution failed" with {:EXIT, :nodistribution}. With OpenRC:

# /etc/init.d/rabbitmq start
 * Starting RabbitMQ ...
Distribution failed: {{:shutdown, {:failed_to_start_child, :net_kernel, {:EXIT, :nodistribution}}}, {:child, :undefined, :net_sup_dynamic, {:erl_distribution, :start_link, [[:"rabbitmqcli-8039-rabbit@enterprise", :shortnames, 15000], false]}, :permanent, 1000, :supervisor, [:erl_distribution]}}
Distribution failed: {{:shutdown, {:failed_to_start_child, :net_kernel, {:EXIT, :nodistribution}}}, {:child, :undefined, :net_sup_dynamic, {:erl_distribution, :start_link, [[:"rabbitmqcli-8673-rabbit@enterprise", :shortnames, 15000], false]}, :permanent, 1000, :supervisor, [:erl_distribution]}}
[ !! ]
 * ERROR: rabbitmq failed to start


Starting epmd before rabbitmq fixes the issue:

# /etc/init.d/epmd start
 * Starting Erlang Port Mapper Daemon ... [ ok ]
# /etc/init.d/rabbitmq start
 * Starting RabbitMQ ...                  [ ok ]


The start script currently lists epmd as optional:

depend() {
        need net
        use dns epmd
}


Is there any reason/use-case why epmd should not simply be added to "need" instead of "use" so that it gets started together with rabbitmq?

There was no info/warning on installation. If anything prevents simply marking epmd needed, maybe a check for epmd with a warning if it's not listed for startup could be added to the ebuild? The above error message alone as printed by upstream is not very helpful to figure out what's wrong and how to fix it.

Logged messages from installation:

# cat /var/log/portage/elog/net-misc\:rabbitmq-server-3.7.13\:20190407-131718.log 
INFO: setup
Package:    net-misc/rabbitmq-server-3.7.13
Repository: gentoo
Maintainer: ultrabug@gentoo.org
USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
FEATURES:   network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox
INFO: test
Skipping make test/check due to ebuild restriction.
INFO: install
Setting correct RABBITMQ_HOME in scripts
Installing Erlang modules to /usr/lib64/erlang/lib/rabbitmq_server-3.7.13
Installing server scripts to /usr/sbin
Final size of build directory: 49120 KiB (47.9 MiB)
Final size of installed tree:  14544 KiB (14.2 MiB)


BTW, systemd service declaration (/lib/systemd/system/rabbitmq.service) appears to have missed listing epmd as well?
Comment 1 Marco Sirabella 2019-08-13 15:42:37 UTC
This bit me too, adding `epmd` to `need` fixed this for me.
Comment 2 Ultrabug gentoo-dev 2019-10-06 12:19:08 UTC
fixed on 3.8.0 version