rabbitmq-server does not properly shutdown

Bug #1784757 reported by Ivan Kurnosov on 2018-08-01
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
rabbitmq-server (Ubuntu)
Medium
Unassigned

Bug Description

When I run `systemctl restart rabbitmq-server` it waits for 90 seconds then systemd sends SIGKILL to it.

Presumably the `epmd` process does not receive SIGTERM, since if I run `kill 1493` (or whatever pid it currently is) then restart happens straight after that successfully

● rabbitmq-server.service - RabbitMQ Messaging Server
   Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
   Active: deactivating (final-sigterm) since Wed 2018-08-01 01:17:04 UTC; 7s ago
  Process: 1183 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
  Process: 178 ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmq-server-wait (code=exited, status=0/SUCCESS)
  Process: 177 ExecStart=/usr/sbin/rabbitmq-server (code=killed, signal=TERM)
 Main PID: 177 (code=killed, signal=TERM)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/rabbitmq-server.service
           └─1493 /usr/lib/erlang/erts-9.2/bin/epmd -daemon

Aug 01 01:11:20 rmq-1 systemd[1]: rabbitmq-server.service: Failed to reset devices.list: Operation not permitted
Aug 01 01:11:20 rmq-1 systemd[1]: Starting RabbitMQ Messaging Server...
Aug 01 01:11:25 rmq-1 rabbitmq[178]: Waiting for 'rabbit@rmq-1'
Aug 01 01:11:25 rmq-1 rabbitmq[178]: pid is 204
Aug 01 01:11:30 rmq-1 systemd[1]: Started RabbitMQ Messaging Server.
Aug 01 01:17:04 rmq-1 systemd[1]: Stopping RabbitMQ Messaging Server...
Aug 01 01:17:06 rmq-1 rabbitmq[1183]: Stopping and halting node 'rabbit@rmq-1'

Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1784757

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in rabbitmq-server (Ubuntu):
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for rabbitmq-server (Ubuntu) because there has been no activity for 60 days.]

Changed in rabbitmq-server (Ubuntu):
status: Incomplete → Expired
Alex Tomkins (tomkins) wrote :

The rabbitmq-server-release GitHub repo has a systemd file which uses shutdown instead of stop:

https://github.com/rabbitmq/rabbitmq-server-release/blob/master/packaging/debs/Debian/debian/rabbitmq-server.service

Switching to this will shut down rabbitmq in the expected way, instead of having to wait ~90 seconds.

Changed in rabbitmq-server (Ubuntu):
status: Expired → Confirmed

The attachment "rabbitmq-stop-shutdown.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch

Thanks for the update Alex.
In general the package seems rather different than upstream in terms of systemd integration.
We will have to take a wider look at this than just this line.

tags: added: server-next
Changed in rabbitmq-server (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers