Try to use "path_prefix" with the management plugin

761 views
Skip to first unread message

Michael Newton

unread,
Jan 8, 2018, 5:24:44 AM1/8/18
to rabbitm...@googlegroups.com
Hi all,
I'm deploying RabbitMQ into a kubernetes cluster. My plan was to
expose the management UI via "kubectl proxy", which would allow
access to the ui with the prefix (depending how you configure
kubernetes!):

"api/v1/namespaces/default/services/rabbitmq:management/proxy"

This means I don't have to worry about exposing a publicly
accessible endpoint for the management UI and then securing it.

Having read all of the documentation I can find, it appears the
only way to specify the prefix to the management plugin is via an
advanced config file; currently mine is:

[
{rabbitmq_management,
[{path_prefix,"api/v1/namespaces/default/services/rabbitmq:management/proxy"}]}
].

but with this config, the plugin fails to start.

I'm using the rabbitmq:3.7.2-management-alpine docker image which
I believe supports the new prefix functionality - can anyone help
me with what I might be doing wrong? I have attached a log file
from a failed start.

--
Thanks,

Michael

logs-from-rabbitmq-in-rabbitmq-6d756dd4c7-kszqn.txt

Karl Nilsson

unread,
Jan 8, 2018, 6:52:23 AM1/8/18
to rabbitm...@googlegroups.com
Hi Michael,

What format are your logs? I'm not able to read them.

Cheers
Karl



--
Thanks,

Michael

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send an email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Pivotal/RabbitMQ

Michael Newton

unread,
Jan 8, 2018, 7:11:57 AM1/8/18
to rabbitmq-users
That's an excellent question, neither can I.

Having said that, I think I have discovered the core of the issue: kubenetes proxy generates a prefix which includes a ":" - for example:

 "api/v1/namespaces/default/services/rabbitmq:management/proxy"

cowboy doesn't seem to consider this a valid configuration.

Actually readable log (I hope..) attached.





On Monday, 8 January 2018 11:52:23 UTC, Karl Nilsson wrote:
Hi Michael,

What format are your logs? I'm not able to read them.

Cheers
Karl
On 8 January 2018 at 10:24, Michael Newton <mic...@mavnn.co.uk> wrote:
Hi all,
I'm deploying RabbitMQ into a kubernetes cluster. My plan was to expose the management UI via "kubectl proxy", which would allow access to the ui with the prefix (depending how you configure kubernetes!):

"api/v1/namespaces/default/services/rabbitmq:management/proxy"

This means I don't have to worry about exposing a publicly accessible endpoint for the management UI and then securing it.

Having read all of the documentation I can find, it appears the only way to specify the prefix to the management plugin is via an advanced config file; currently mine is:

[
 {rabbitmq_management,  [{path_prefix,"api/v1/namespaces/default/services/rabbitmq:management/proxy"}]}
].

but with this config, the plugin fails to start.

I'm using the rabbitmq:3.7.2-management-alpine docker image which I believe supports the new prefix functionality - can anyone help me with what I might be doing wrong? I have attached a log file from a failed start.


--
Thanks,

Michael

--
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.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Pivotal/RabbitMQ
rabbit_logs.txt

Karl Nilsson

unread,
Jan 8, 2018, 7:43:56 AM1/8/18
to rabbitm...@googlegroups.com
Looks like you're right there. The rules for using ':' in URI path segments are a bit subtle. Is there any way to get kubenetes not to include the colon?

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.



--
Karl Nilsson

Pivotal/RabbitMQ

Michael Newton

unread,
Jan 8, 2018, 10:19:28 AM1/8/18
to rabbitm...@googlegroups.com
Not that I can find, unfortunately. Looks like I'll need to either
publicly expose and secure the management UI, or add a "sidecar"
nginx container to handle the proxying.
>> To post to this group, send email to
>> rabbitm...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Karl Nilsson
>
> Pivotal/RabbitMQ


--
Thanks,

Michael

ti...@welbo.eu

unread,
Sep 12, 2018, 2:51:23 PM9/12/18
to rabbitmq-users
Hello Michael, any update on this? 

I have to install the management ui via kubectl exec, but it works. I can access the management ui via "api/v1/namespaces/default/services/rabbitmq:management/proxy".

The problem now is login-in. 
When I type the username and password, a standard authentication window is prompted, requesting a new user and password to be typed. No user and password combination work
Do you recognize this issue? Could it be related to path_prefix, which I did not set?
I can access and login to the management ui if I expose 

Thanks,
Tiago

Michael Klishin

unread,
Sep 12, 2018, 3:26:35 PM9/12/18
to rabbitm...@googlegroups.com
Please start new threads for new questions and consider posting logs and browser developer tools information.
We do not guess on this list.

In this thread we have the OP report that Kubernetes proxy includes a colon into path that RabbitMQ's embedded HTTP server
supposedly considers to be invalid. We are not able to read the provided logs, however.


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
Reply all
Reply to author
Forward
0 new messages