amqp-tools port parameter unusable

Bug #1888313 reported by tinodj
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
librabbitmq
Fix Released
Unknown
librabbitmq (Ubuntu)
Fix Released
Low
Jess Jang
Bionic
Triaged
Low
Unassigned
Focal
Triaged
Low
Unassigned
Impish
Won't Fix
Undecided
Unassigned

Bug Description

This bug is related to #1790657, but not the same.

Broken behaviour:

amqp-consume -s mq.example.com --port 5672 cat
opening socket to localhost:5672

amqp-consume --server=mq.example.com --port 5672 cat
opening socket to localhost:5672

It connects to localhost instead to mq.example.com

This works, but says deprecated:

amqp-consume --server=mq.example.com:5672 cat
Specifying the port number with --server is deprecated
opening socket to mq.example.com:5672

Verified on xenial, bionic and focal.

Related branches

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for taking the time to report this bug and try to make Ubuntu better!

I was able to reproduce what you mentioned even in Groovy. Checking the code, the warning about specifying the port number with --server seems something desired by upstream since it is not IPv6 friendly [1]. I did not go through details of implementation but it might be an upstream bug, when the ':<port>' is passed the host is correctly parsed otherwise not and it fallback to localhost.

Interestingly, if you check the manpages those options are not listed there, and it is not a bug in the Ubuntu package but the upstream doc seems outdated [2].

This sounds like an upstream bug to me. The best route to getting it fixed
in Ubuntu in this case would be to file an bug with the upstream project. Would you like to do that?

If you do end up filing an upstream bug, please link to it from here. Thanks!

[1] https://github.com/alanxz/rabbitmq-c/blob/master/tools/common.c#L223
[2] https://github.com/alanxz/rabbitmq-c/tree/master/tools/doc

Changed in librabbitmq (Ubuntu):
status: New → Triaged
Revision history for this message
tinodj (gjorgjioski) wrote :

Hi, you are right, it is upstream bug, thanks for pointing me to the right direction. I will fill in bug report there and link to this.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

tinodj did report this upstream a while back. The issue got fixed by the following commits, which should be available from librabbitmq 0.11.0:

https://github.com/alanxz/rabbitmq-c/commit/637f0275ffcc2bfb58c94f0bf6e290aa40c1695a
https://github.com/alanxz/rabbitmq-c/commit/4d03c849868231dc217785c6f0e78eab9cd79fd5

Revision history for this message
tinodj (gjorgjioski) wrote :

Indeed, thank you for remembering this. It seems I promised to post a link to a bug-report with them, but I didn't.

Here it is anyway:
https://github.com/alanxz/rabbitmq-c/issues/621

so for sure, this can be closed.

Revision history for this message
Paride Legovini (paride) wrote :

Thanks @tinodj for working with upstream to get this fixed. Even if fixed upstream this is still a bug in Ubuntu, ideally to be fixed by Debian packaging version 0.11.0, and Ubuntu syncing it. Hopefully this will happen in time for Jammy. Otherwise this is a 1-line patch on a plate scenario:

https://github.com/alanxz/rabbitmq-c/pull/623/commits/54d00bee5cc4603dc96af5f86c899210689dfeeb

I'm updating the bug tasks to reflect this.

Changed in librabbitmq (Ubuntu Bionic):
status: New → Triaged
Changed in librabbitmq (Ubuntu Focal):
status: New → Triaged
Changed in librabbitmq (Ubuntu):
importance: Undecided → Low
Changed in librabbitmq (Ubuntu Bionic):
importance: Undecided → Low
Changed in librabbitmq (Ubuntu Focal):
importance: Undecided → Low
Changed in librabbitmq:
status: Unknown → Fix Released
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

FWIW, Jess and I are working on this. \o/

Changed in librabbitmq (Ubuntu):
assignee: nobody → Jess Jang (jessica-youjeong)
Utkarsh Gupta (utkarsh)
Changed in librabbitmq (Ubuntu Impish):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package librabbitmq - 0.10.0-1ubuntu2

---------------
librabbitmq (0.10.0-1ubuntu2) jammy; urgency=medium

  * d/p/server-flag-deprecation.patch:
    add patch to fix issue parsing hostname in --server flag.
    (LP: #1888313)

 -- Jess Jang <email address hidden> Thu, 03 Feb 2022 14:30:36 -0600

Changed in librabbitmq (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 21.10 (Impish Indri) has reached end of life, so this bug will not be fixed for that specific release.

Changed in librabbitmq (Ubuntu Impish):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.