RabbitMQ 使用哪些端口? [英] What ports does RabbitMQ use?

查看:21
本文介绍了RabbitMQ 使用哪些端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

RabbitMQ 服务器使用或需要在防火墙上为节点集群打开哪些端口?

What ports does RabbitMQ Server use or need to have open on the firewall for a cluster of nodes?

我的 /usr/lib/rabbitmq/bin/rabbitmq-env 设置在我假设需要 (35197) 的下方.

My /usr/lib/rabbitmq/bin/rabbitmq-env is set below which I'm assuming are needed (35197).

SERVER_ERL_ARGS="+K true +A30 +P 1048576    
-kernel inet_default_connect_options [{nodelay,true}]   
-kernel inet_dist_listen_min 35197    
-kernel inet_dist_listen_max 35197"

我没有触及 rabbitmq.config 来设置自定义 tcp_listener 所以它应该在默认的 5672 上监听.

I haven't touched the rabbitmq.config to set a custom tcp_listener so it should be listening on the default 5672.

以下是相关的 netstat 行:

Here are the relevant netstat lines:

tcp        0      0 0.0.0.0:4369           0.0.0.0:*           LISTEN      728/epmd 
tcp        0      0 0.0.0.0:35197          0.0.0.0:*           LISTEN      5126/beam
tcp6       0      0 :::5672                :::*                LISTEN      5126/beam

我的问题是:

  1. 为了让其他节点能够连接到集群,是否需要打开所有 3 个端口 4369、5672 和 35197?

  1. for other nodes to be able to connect to the cluster, do all 3 ports 4369, 5672 and 35197 need to be open?

为什么 5672 不运行在 tcp 而不仅仅是 tcp6 上?

Why isn't 5672 running on tcp and not just tcp6?

推荐答案

PORT 4369:Erlang 使用端口映射器守护程序 (epmd) 来解析集群中的节点名称.节点必须能够相互访问,并且端口映射器守护程序才能使集群工作.

PORT 4369: Erlang makes use of a Port Mapper Daemon (epmd) for resolution of node names in a cluster. Nodes must be able to reach each other and the port mapper daemon for clustering to work.

端口 35197由 inet_dist_listen_min/max 设置防火墙必须允许此范围内的流量在集群节点之间通过

PORT 35197 set by inet_dist_listen_min/max Firewalls must permit traffic in this range to pass between clustered nodes

RabbitMQ 管理控制台:

RabbitMQ Management console:

  • 端口 15672 用于 RabbitMQ 版本 3.x
  • RabbitMQ pre 3.x 的端口 55672

PORT 5672 RabbitMQ 主端口.

PORT 5672 RabbitMQ main port.

对于节点集群,它们必须在 3519743695672 上相互开放.

For a cluster of nodes, they must be open to each other on 35197, 4369 and 5672.

对于任何想要使用消息队列的服务器,只需要 5672.

For any servers that want to use the message queue, only 5672 is required.

这篇关于RabbitMQ 使用哪些端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆