RabbitMQ使用哪些端口? [英] What ports does RabbitMQ use?
问题描述
RabbitMQ Server使用哪些端口或需要在防火墙上为节点集群打开哪些端口?
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
我的问题是:
-
要使其他节点能够连接到群集,是否需要打开所有3个端口4369、5672和35197?
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?
推荐答案
端口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:
- 用于RabbitMQ版本3.x的端口15672
- 用于RabbitMQ 3.x之前版本的端口55672
端口5672
RabbitMQ主端口.
PORT 5672
RabbitMQ main port.
对于节点集群,它们必须在35197
,4369
和5672
上彼此打开.
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屋!