必须如何配置 RabbitMQ 管理插件以同时侦听 IPV4 和 IPV6
How must the RabbitMQ Management Plugin be configured to listen on both IPV4 and IPV6
如果未配置 ip,RabbitMq 管理插件似乎只侦听 IPV4 地址。 documentation中显示的典型配置为:
[
{rabbitmq_management, [{listener, [{port, 12345}]}]}
].
文档还指出:
Use ip to specify an interface for mochiweb to bind to (giving an IP address as a string or tuple).
据此,如果您指定 IPv6 环回地址,例如:
[
{rabbitmq_management, [{listener, [{port, 12345}, {ip, "::"}]}]}
].
它将侦听 IPV6 地址,但不会侦听 IPV4。指定“0.0.0.0”的 ip(或省略设置)仅在 IPV4 上侦听。
文档暗示您可以在此处使用元组,但我未能理解 erlang tuple 足以进行此设置并成功启动管理插件的程度。
我尝试了以下(和其他变体)错误消息,例如 could_not_start_listener:
{ip, "::", "0.0.0.0"}
{ip, {"::", "0.0.0.0"}}
在 IPV4 和 IPV6 端点上托管它需要什么魔力?
根据@michaelklishin 在 rabbitmq-users mailing list 中回复的线程,RabbitMq_Management 插件由于使用的 HTTP 服务器而无法侦听两个不同的端点。所以目前这个问题的答案是'not possible'
计划在 RabbitMq 3.6.0 版本中更改底层 HTTP 服务器,这有望消除此限制。作为参考,这个问题是#64 - Dual IP stack support and the issue to change the web server is #63 - Move from Webmachine to Cowboy
如果未配置 ip,RabbitMq 管理插件似乎只侦听 IPV4 地址。 documentation中显示的典型配置为:
[
{rabbitmq_management, [{listener, [{port, 12345}]}]}
].
文档还指出:
Use ip to specify an interface for mochiweb to bind to (giving an IP address as a string or tuple).
据此,如果您指定 IPv6 环回地址,例如:
[
{rabbitmq_management, [{listener, [{port, 12345}, {ip, "::"}]}]}
].
它将侦听 IPV6 地址,但不会侦听 IPV4。指定“0.0.0.0”的 ip(或省略设置)仅在 IPV4 上侦听。
文档暗示您可以在此处使用元组,但我未能理解 erlang tuple 足以进行此设置并成功启动管理插件的程度。
我尝试了以下(和其他变体)错误消息,例如 could_not_start_listener:
{ip, "::", "0.0.0.0"}
{ip, {"::", "0.0.0.0"}}
在 IPV4 和 IPV6 端点上托管它需要什么魔力?
根据@michaelklishin 在 rabbitmq-users mailing list 中回复的线程,RabbitMq_Management 插件由于使用的 HTTP 服务器而无法侦听两个不同的端点。所以目前这个问题的答案是'not possible'
计划在 RabbitMq 3.6.0 版本中更改底层 HTTP 服务器,这有望消除此限制。作为参考,这个问题是#64 - Dual IP stack support and the issue to change the web server is #63 - Move from Webmachine to Cowboy