FS#55842 - [rabbitmq] service does not stop cleanly due to epmd process

Attached to Project: Community Packages
Opened by John Ledbetter (ledbettj) - Monday, 02 October 2017, 14:54 GMT
Last edited by Ivy Foster (escondida) - Friday, 11 October 2019, 00:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

systemd is unable to shutdown rabbitmq cleanly. rabbitmq shuts itself down, but any epmd process it started will not exit; as a result, the `systemctl stop` process eventually times out and kills the epmd process.


I was able to resolve this issue by adding a Requires= and After= dependency on epmd.service in the rabbitmq unit file; in this case, rabbitmq will not start epmd and epmd will persist after rabbit shutdown:

john@oberon:~$ cat /etc/systemd/system/rabbitmq.service.d/override.conf
[Unit]
Requires=epmd.service
After=epmd.service

I am not a unit-file guru, so unsure if this is entirely correct.


Additional info:

* rabbitmq 3.6.12-1


Steps to reproduce:

systemctl start rabbitmq
systemctl stop rabbitmq
This task depends upon

Closed by  Ivy Foster (escondida)
Friday, 11 October 2019, 00:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  upstreamfixedit, according to OP's last post.
Comment by Henrik Johansson (dahankzter) - Tuesday, 21 November 2017, 14:15 GMT
I get this constantly as well but the above fix does not work for me.
Comment by Henrik Johansson (dahankzter) - Tuesday, 21 November 2017, 14:20 GMT
Actually it does but I have to enable and start epmd which may seem natural but well I forgot.
Comment by Dan LaManna (danlamanna) - Thursday, 18 January 2018, 19:33 GMT
Also affected by the bug with version 3.6.14-1, but the suggested patch did not resolve the issue for me.
Comment by Levente Polyak (anthraxx) - Thursday, 18 January 2018, 19:53 GMT
it shouldn't be applied for now, epmd runs as root with a public facing port. This needs to be resolved first, will raise to do it.
Afterwards its fine to depend on epmd service
Comment by Levente Polyak (anthraxx) - Thursday, 22 February 2018, 11:39 GMT
please test cleanly with 3.7.3-2 without overrides, it works fine since 3.7, epmd doesn't stay around or make service hang, the epmd is gracefully shut down:

Feb 22 12:34:43 anthraxx systemd[1]: Stopping RabbitMQ broker...
Feb 22 12:34:43 anthraxx rabbitmq[12437]: Stopping and halting node rabbit@anthraxx ...
Feb 22 12:34:43 anthraxx rabbitmq[11816]: Gracefully halting Erlang VM
Feb 22 12:34:47 anthraxx systemd[1]: Stopped RabbitMQ broker.

> ps aux | grep rabbitmq|grep -v grep|wc -l
0

> ps aux | grep epmd|grep -v grep|wc -l
0


Before testing, you of cause need to have a clean state once, having no rabbitmq nor epmd running when starting 3.7.3 rabbitmq.
Comment by John Ledbetter (ledbettj) - Thursday, 22 February 2018, 14:40 GMT
Thanks! I removed my existing override, stopped everything, and performed a daemon-reload; it looks like everything is now working correctly with rabbitmq 3.7.3-2.

Loading...