rabbitmq-server install fails when another package is using port 5672
| Affects | Status | Importance | Assigned to | Milestone | ||
|---|---|---|---|---|---|---|
| rabbitmq-server (Ubuntu) | Status tracked in Resolute | |||||
| Jammy |
In Progress
|
Undecided
|
Lena Voytek | |||
| Noble |
In Progress
|
Undecided
|
Lena Voytek | |||
| Plucky |
Won't Fix
|
Undecided
|
Lena Voytek | |||
| Questing |
In Progress
|
Undecided
|
Lena Voytek | |||
| Resolute |
Fix Released
|
Undecided
|
Lena Voytek | |||
Bug Description
[ Impact ]
When installing rabbitmq-server after another package that uses port 5672, such as garagemq, the installation will fail with:
Job for rabbitmq-
See "systemctl status rabbitmq-
This is due to a combination of the systemd service failing to start when it tries to take the port, and the use of dh_installinit instead of dh_systemd_start, which provides a code block that exits with an error on service failure.
This bug is fixed by swapping to dh_systemd_start, which allows the install to continue on service failure, and by notifying the user that the service will fail by checking to see if the port is taken by another package.
[ Test Plan ]
To test, install garagemq followed by rabbitmq-server. Before this fix, this would cause the rabbitmq-server to fail. After, the install should instead display the following message and succeed:
WARNING: port 5672 is already in use by another application.
RabbitMQ server will not be started automatically.
Also, installing rabbitmq-server first should also be tested to show that the above message does not show up. Same with a rabbitmq-server upgrade.
[ Where problems could occur ]
Problems would most likely occur here due to differences in behavior between systemd's dh processes vs dh_installinit's.
[ Other Info ]
The reason dh_installinit fails is due to its generated start code being:
invoke-rc.d rabbitmq-server $_dh_action || exit 1
while dh_systemd_start's start code is
deb-systemd-invoke $_dh_action 'rabbitmq-
[ Original Description ]
E: rabbitmq-server: »installiertes post-installati
ProblemType: Package
DistroRelease: Ubuntu 24.04
Package: rabbitmq-server 3.12.1-1ubuntu1.2
ProcVersionSign
Uname: Linux 6.14.0-34-generic x86_64
NonfreeKernelMo
ApportVersion: 2.28.1-0ubuntu3.8
Architecture: amd64
CasperMD5CheckR
Date: Sat Nov 1 13:10:14 2025
ErrorMessage: »installiertes post-installati
InstallationDate: Installed on 2025-10-31 (1 days ago)
InstallationMedia: Ubuntu 24.04.2 LTS "Noble Numbat" - Release amd64 (20250215)
PackageArchitec
Python3Details: /usr/bin/
PythonDetails: N/A
RelatedPackageV
dpkg 1.22.6ubuntu6.5
apt 2.7.14build2
SourcePackage: rabbitmq-server
Title: package rabbitmq-server 3.12.1-1ubuntu1.2 failed to install/upgrade: »installiertes post-installati
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Andreas Hasenack: Disapprove
- Canonical Server Reporter: Pending requested
- Canonical Server: Pending requested
-
Diff: 285 lines (+158/-22)6 files modifieddebian/changelog (+145/-0)
debian/control (+3/-1)
debian/patches/series (+0/-1)
debian/rabbitmq-server.postinst (+7/-0)
debian/rules (+3/-1)
dev/null (+0/-19)
- Athos Ribeiro (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 61 lines (+23/-0)4 files modifieddebian/changelog (+13/-0)
debian/control (+1/-0)
debian/rabbitmq-server.postinst (+7/-0)
debian/rules (+2/-0)
| summary: |
- package rabbitmq-server 3.12.1-1ubuntu1.2 failed to install/upgrade: - »installiertes post-installation-Skript des Paketes rabbitmq- - server«-Unterprozess gab den Fehlerwert 1 zurück + rabbitmq-server install fails when another package is using port 5672 |
| Changed in rabbitmq-server (Ubuntu Jammy): | |
| assignee: | nobody → Lena Voytek (lvoytek) |
| Changed in rabbitmq-server (Ubuntu Noble): | |
| assignee: | nobody → Lena Voytek (lvoytek) |
| Changed in rabbitmq-server (Ubuntu Plucky): | |
| assignee: | nobody → Lena Voytek (lvoytek) |
| Changed in rabbitmq-server (Ubuntu Questing): | |
| assignee: | nobody → Lena Voytek (lvoytek) |
| Changed in rabbitmq-server (Ubuntu Resolute): | |
| status: | Triaged → In Progress |
| Changed in rabbitmq-server (Ubuntu Jammy): | |
| status: | New → Triaged |
| Changed in rabbitmq-server (Ubuntu Noble): | |
| status: | New → Triaged |
| Changed in rabbitmq-server (Ubuntu Plucky): | |
| status: | New → Triaged |
| Changed in rabbitmq-server (Ubuntu Questing): | |
| status: | New → Triaged |
| Changed in rabbitmq-server (Ubuntu Questing): | |
| status: | Triaged → In Progress |
| Changed in rabbitmq-server (Ubuntu Noble): | |
| status: | Triaged → In Progress |
| Changed in rabbitmq-server (Ubuntu Jammy): | |
| status: | Triaged → In Progress |
| description: | updated |

This system started with an install as 24.04 and still is on 24.04.
In there recently the log states that rabbitmq was installed
Start-Date: 2025-11-01 13:10:05 2.8+dfsg- 1ubuntu4. 5, automatic), rabbitmq- server: amd64 (3.12.1- 1ubuntu1. 2), erlang-os-mon:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang- syntax- tools:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang-crypto:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang-eldap:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), python3-vine:amd64 (5.0.0+dfsg-3, automatic), libsctp1:amd64 (1.0.19+ dfsg-2build1, automatic), erlang-tools:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang-asn1:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), python3-amqp:amd64 (5.2.0-1), garagemq:amd64 (0.0~git2020020 4.15e6a9d+ ds-4ubuntu0. 24.04.3+ esm1), erlang-base:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), librabbitmq- dev:amd64 (0.11.0-1build2), python- amqp-doc: amd64 (5.2.0-1), libssl-dev:amd64 (3.0.13-0ubuntu3.6, automatic), erlang-snmp:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang-ftp:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang-inets:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, autom atic), erlang- parsetools: amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang-ssl:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang-tftp:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), erlang- public- key:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), socat:amd64 (1.8.0.0-4build3, automatic), erlang-mnesia:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), libjs-sphinxdoc :amd64 (7.2.6-6, automatic), erlang- runtime- tools:amd64 (1:25.3. 2.8+dfsg- 1ubuntu4. 5, automatic), libjs-underscor e:amd64 (1.13.4~ dfsg+~1. 11.4-3, automatic)
Commandline: /usr/sbin/synaptic
Requested-By: r-b (1000)
Install: erlang-xmerl:amd64 (1:25.3.
All that can be seen of the error is that it failed to start the service after install.
rabbitmq-server (3.12.1-1ubuntu1.2) wird eingerichtet ...
info: Wähle GID aus dem Bereich von 100 bis 999 aus …
info: Lege Gruppe »rabbitmq« (GID 127) an …
info: Wähle UID aus dem Bereich von 100 bis 999 aus …
info: Lege Systembenutzer »rabbitmq« (UID 125) an … system/ multi-user. target. wants/rabbitmq- server. service → /usr/lib/ systemd/ system/ rabbitmq- server. service.
info: Lege neuen Benutzer »rabbitmq« (UID 125) mit Gruppe »rabbitmq« an …
info: Erstelle Home-Verzeichnis »/var/lib/rabbitmq« nicht.
Created symlink /etc/systemd/
Job for rabbitmq- server. service failed because the control process exited with error code.
See "systemctl status rabbitmq- server. service" and "journalctl -xeu rabbitmq- server. service" for details.
invoke-rc.d: initscript rabbitmq-server, action "start" failed. server. service - RabbitMQ Messaging Server systemd/ system/ rabbitmq- server. service; enabled; preset: enabled) /usr/lib/ rabbitmq/ bin/rabbitmq- server (code=exited, status=1/FAILURE)
● rabbitmq-
Loaded: loaded (/usr/lib/
Active: activating (auto-restart) (Result: exit-code) since Sat 2025-11-01 13:10:14 CET; 5ms ago
Process: 15133 ExecStart=
Main PID: 15133 (code=exited, status=1/FAILURE)
Status: "Standing by"
CPU: 2.650s
dpkg: Fehler beim Bearbeiten des Paketes rabbitmq-server (--configure):
»installiertes post-i...