Add Context for redirect in RabbitMQ Management

184 views
Skip to first unread message

Kris Steele

unread,
Feb 23, 2017, 9:28:11 AM2/23/17
to rabbitmq-users

I have RabbitMQ 3.6.6 setup on one Windows server and am trying to set it up the same way on the other server that has an older version (3. something). I did an Export then Import definitions from the older server but it seems to be missing one item....


In the RabbitMQ Management webpage, on the Overview tab, there is a "Web context" -> Context section. On my old server, I have entries for "RabbitMQ Management" and "Redirect to port XXXX". On the new server, I only have "RabbitMQ Management".


How do I go about adding the "Redirect to port XXXX" context entry? I don't seem to have an option to add or edit contexts in the UI.The program I'm using is trying to connect via port XXX and is unable to do so until I can setup that redirect/new context.

Michael Klishin

unread,
Feb 23, 2017, 9:34:39 AM2/23/17
to rabbitm...@googlegroups.com
The redirection feature you are referring to was in place originally to migrate
from port 55672, which fails into a range which is often filtered out by various firewall products, to 15672. It was never the intent to keep that feature around for general use.

I'd need to check if that option still exists (but disabled by default) or if we removed it entirely. Perhaps the right thing to do for port forwarding is to use a dedicated tool for that, e.g. HAproxy can do port forwarding and Nginx can do that plus sophisticated URL rewriting.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Feb 23, 2017, 9:48:03 AM2/23/17
to rabbitm...@googlegroups.com
So that feature was removed a while ago: there's only one function related to it that I managed to find.

You have a few options:

 * Use an HAproxy or Nginx as an intermediary.
 * Switch management plugin to port 55672 (http://www.rabbitmq.com/management.html)
 * Change your clients to use port 15672, which has been the default since November 2012.


To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Kris Steele

unread,
Feb 23, 2017, 10:11:37 AM2/23/17
to rabbitmq-users

Thanks for the update... I guess that's why I couldn't find any information on it. I have two different pieces that use this, one that uses port 55672 and another that uses 15672. I'll have to try and see if I can switch one of these.

Or perhaps I just roll back to an older version or RabbitMQ that does support this. I don't really want to add any new software components if possible.


Michael Klishin

unread,
Feb 23, 2017, 10:26:04 AM2/23/17
to rabbitm...@googlegroups.com, Kris Steele
Downgrades of node data store are not supported but you can downgrade if you have a backup from the
older version.

We rarely recommend upgrading and since the new port has been the default for over 4 years, you'd be definitely
running a version that is out of _any_ kind of support by our team and Pivotal professional services.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.

Kris Steele

unread,
Feb 23, 2017, 11:36:25 AM2/23/17
to rabbitmq-users, kris...@gmail.com
Ideally I'd like to use the new version. I'm having issues though in my code...
 
   ConnectionFactory factory = new ConnectionFactory { HostName = myQueueServerPath };

I'm calling this same code above for the two different services I use RabbitMQ in. They both are using the same 3.3.0 version of RabbitMQ.Client.dll. From one service the factory.EndPoint has a port of 55672. From the other service, I get a port of 15672. Any idea what is controlling what port I am getting? I can't change the Port once the factory object is initialized. It doesn't seem to matter what I pass in for the host name, even if I pass in NULL it gives me a 55672 port.


Michael Klishin

unread,
Feb 23, 2017, 11:41:08 AM2/23/17
to rabbitm...@googlegroups.com, Kris Steele
Let's take a couple of steps back, please.

Port 55672 was NEVER used for AMQP 0-9-1 clients, only HTTP API.
5672 (which looks almost identical to 55672 but not the same value) is the default port for AMQP 0-9-1 and AMQP 1.0.

Port 15672 is used by RabbitMQ HTTP API since the 3.0 release.

If you have code that uses port 55672 with the .NET client, that's either an indication that the
port was overridden in the server or that something or someone is terribly confused.
There never was any kind of port redirection for AMQP 0-9-1 or 1.0 clients.

If you don't override AMQP ports on the server end, you don't have to specify it on ConnectionFactory.
It's already set to 5672 or 5671 (if TLS is enabled).

Kris Steele

unread,
Feb 23, 2017, 1:06:36 PM2/23/17
to rabbitmq-users, kris...@gmail.com
You're right, I was getting my wires a bit crossed between 55672 and 5672 and this was leading me down the wrong path to resolving my issues. I found a different configuration error I had and was able to get this working correctly using the latest version (!!!) of RabbitMQ.

Thanks for the assistance... I would have been lost trying to figure this all out without your direction.

Kris

Reply all
Reply to author
Forward
0 new messages