Rabbitmq port

602 views
Skip to first unread message

Sushil Chaudhary

unread,
Jul 14, 2017, 12:34:17 PM7/14/17
to rabbitmq-users
Quick question :
We have only below ports open in Cloud for Rabbitmq cluster to communicate with each other but still, its not working for us. is there some other port we need to have open, something for erlang or anything? we can not keep all ports open so need specific port list. We are using all default ports setting, no specific configuration.
  • 4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools
  • 5672, 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS
  • 25672: used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). See networking guide for details.
  • 15672: HTTP API clients and rabbitmqadmin (only if the management plugin is enabled)
  • 61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
  • 1883, 8883: (MQTT clients without and with TLS, if the MQTT plugin is enabled
  • 15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
  • 15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)

Michael Klishin

unread,
Jul 14, 2017, 12:43:03 PM7/14/17
to rabbitm...@googlegroups.com
The list above covers all ports used by RabbitMQ and the runtime with default settings.

You can see what ports are used in the management UI, `rabbitmqctl status` (in the `listeners` section) and
using tools such as netstat.

I'm afraid "it's not working" is not specific enough to suggest more.

--
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 email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Sushil Chaudhary

unread,
Jul 14, 2017, 1:08:55 PM7/14/17
to rabbitmq-users
MK,
Its not forming a cluster. it execute the joincluster but we do not really join the cluster. but we do not see a error message..


On Friday, 14 July 2017 12:43:03 UTC-4, Michael Klishin wrote:
The list above covers all ports used by RabbitMQ and the runtime with default settings.

You can see what ports are used in the management UI, `rabbitmqctl status` (in the `listeners` section) and
using tools such as netstat.

I'm afraid "it's not working" is not specific enough to suggest more.
On Fri, Jul 14, 2017 at 7:34 PM, Sushil Chaudhary <sushilkuma...@gmail.com> wrote:
Quick question :
We have only below ports open in Cloud for Rabbitmq cluster to communicate with each other but still, its not working for us. is there some other port we need to have open, something for erlang or anything? we can not keep all ports open so need specific port list. We are using all default ports setting, no specific configuration.
  • 4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools
  • 5672, 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS
  • 25672: used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). See networking guide for details.
  • 15672: HTTP API clients and rabbitmqadmin (only if the management plugin is enabled)
  • 61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
  • 1883, 8883: (MQTT clients without and with TLS, if the MQTT plugin is enabled
  • 15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
  • 15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)

--
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.

Luke Bakken

unread,
Jul 14, 2017, 3:02:06 PM7/14/17
to rabbitmq-users
Sushil -

Have you checked the logs on all nodes?

"we do not really join the cluster" - how are you checking this?

Luke

Sushil Chaudhary

unread,
Jul 14, 2017, 3:21:16 PM7/14/17
to rabbitmq-users
I think, we find out. These are port needs to open for clustering.  But, look like these are dynamic ports as on different rabbitmq cluster, it picks up different port. Is there a way to make it static.


clusteringip-10-205-84-109::34279
clusteringip-10-205-86-45::34854
clusteringip-10-205-86-50::36037
clusteringip-10-205-86-45::38701
clusteringip-10-205-85-110::39930
clusteringip-10-205-86-50::49409
clusteringip-10-205-85-110::51655
clusteringip-10-205-85-227::54691
clusteringip-10-205-86-221::58298
clusteringip-10-205-86-45::58643

Luke Bakken

unread,
Jul 14, 2017, 3:51:53 PM7/14/17
to rabbitmq-users
Sushil,


You will want to use  inet_dist_listen_min and inet_dist_listen_max to set the port range that epmd will choose from.

I am a bit mystified as to why the distribution port is not 25672 in all of the above cases. I'll check in my environment.

Luke

Luke Bakken

unread,
Jul 14, 2017, 4:08:52 PM7/14/17
to rabbitmq-users
Hi again Sushil,

I started two RabbitMQ brokers on my local workstation using port 5672 for one node, and 5673 for the other.

Running the following command shows which distribution ports are in use:

$ epmd -names
epmd: up and running on port 4369 with data:
name rabbit2 at port 25673
name rabbit at port 25672

In your case, since all of your nodes are on distinct hosts and using the default RabbitMQ ports, you *should* be using 25672 for distribution. I don't know where the other ports come from in your table. How did you get that information?

Luke

Sushil Chaudhary

unread,
Jul 14, 2017, 4:47:58 PM7/14/17
to rabbitmq-users
Luke,
Thanks for response. 

This is what I am getting :

epmd: up and running on port 4369 with data:

name rabbit at port 40743


And this is what configured in rabbitmq.config:


{kernel, [

    {inet_dist_listen_max, 44001},

    {inet_dist_listen_min, 44000}

  ]}


does not look like, its controling dynamic empd ports.

Luke Bakken

unread,
Jul 14, 2017, 4:56:21 PM7/14/17
to rabbitm...@googlegroups.com
Sushil,

Could you please post your *entire*, un-edited rabbitmq.config file?
If the file is large, please attach it to the message or save it
online (gist.github.com, for example).

Thanks -

--
Staff Software Engineer
Pivotal / RabbitMQ

Michael Klishin

unread,
Jul 14, 2017, 5:20:34 PM7/14/17
to rabbitm...@googlegroups.com
`kernel.inet_dist_listen_min` and `kernel.inet_dist_listen_max ` control ports used by nodes
for inter-node traffic (this includes CLI tools). epmd simply helps peers discover effective ports.
The `kernel` section needs to be placed
at the "top level" section of the config, there's an example on http://www.rabbitmq.com/networking.html.

See http://www.rabbitmq.com/configure.html for how to verify your effective configuration.

Your original post claims you run with "all defaults". If that's still the goal, you don't need
any `kernel.*` keys in your config.






--
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 email to rabbitmq-users@googlegroups.com.

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

Sushil Chaudhary

unread,
Jul 17, 2017, 11:24:09 AM7/17/17
to rabbitmq-users
MK, 
Thanks for the response.
This is what i have in rabbitmq.config, but still the clustering port is not in the range of 44000-44001. Am I missing something here?

[

{kernel, [

    {inet_dist_listen_max, 44001},

    {inet_dist_listen_min, 44000}

  ]},

 {ssl, [{versions, ['tlsv1.2']}]},

 {rabbit, [

           {tcp_listeners, [5672]},

           {ssl_listeners, [5671]},

           {num_ssl_acceptors, 250},

           {ssl_options, [{cacertfile,"xa.pem"},

                          {certfile,  "cde.pem"},

                          {keyfile,   "abc.pem"},

                          {versions, ['tlsv1.2']},

                          {verify,verify_peer},

                          {fail_if_no_peer_cert,true}

                         ]}

          ]}

].

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,
Jul 17, 2017, 12:11:18 PM7/17/17
to rabbitm...@googlegroups.com
Your config uses default distribution port which is not in the 44000-44001 range, as mentioned in the docs.

Where does this range come from?
Sorry but there are conflicting messages in this thread, first you want to use all defaults then you don't then you expect the port to be 44000 or 44001.

What are we trying to achieve here?
Staff Software Engineer, Pivotal/RabbitMQ

Michael Klishin

unread,
Jul 17, 2017, 12:18:42 PM7/17/17
to rabbitm...@googlegroups.com
I have the following 2 configs, one I use for client library development, another is a copy
plus a distribution port override:


With the first one, port 25672 is used:

epmd -names; rabbitmqctl status | grep clustering
epmd: up and running on port 4369 with data:
name rabbit at port 25672
     [{clustering,25672,"::"},

with the second one, port 44000 is:

epmd -names; rabbitmqctl status | grep clustering
epmd: up and running on port 4369 with data:
name rabbit at port 44000
     [{clustering,44000,"::"},

HTH.


On Mon, Jul 17, 2017 at 7:10 PM, Michael Klishin <mkli...@pivotal.io> wrote:
Your config uses default distribution port which is not in the 44000-44001 range, as mentioned in the docs.

Where does this range come from?
Sorry but there are conflicting messages in this thread, first you want to use all defaults then you don't then you expect the port to be 44000 or 44001.

What are we trying to achieve here?
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.
--
Staff Software Engineer, Pivotal/RabbitMQ

Sushil Chaudhary

unread,
Jul 17, 2017, 1:01:17 PM7/17/17
to rabbitmq-users
MK,
Thanks for this. Let me play with it.




On Monday, 17 July 2017 12:18:42 UTC-4, Michael Klishin wrote:
I have the following 2 configs, one I use for client library development, another is a copy
plus a distribution port override:


With the first one, port 25672 is used:

epmd -names; rabbitmqctl status | grep clustering
epmd: up and running on port 4369 with data:
name rabbit at port 25672
     [{clustering,25672,"::"},

with the second one, port 44000 is:

epmd -names; rabbitmqctl status | grep clustering
epmd: up and running on port 4369 with data:
name rabbit at port 44000
     [{clustering,44000,"::"},

HTH.

On Mon, Jul 17, 2017 at 7:10 PM, Michael Klishin <mkli...@pivotal.io> wrote:
Your config uses default distribution port which is not in the 44000-44001 range, as mentioned in the docs.

Where does this range come from?
Sorry but there are conflicting messages in this thread, first you want to use all defaults then you don't then you expect the port to be 44000 or 44001.

What are we trying to achieve here?
--
Staff Software Engineer, Pivotal/RabbitMQ

Sushil Chaudhary

unread,
Jul 17, 2017, 5:37:29 PM7/17/17
to rabbitmq-users
MK, 
I find some surprising stuff. The configuration above never worked for me with  Erlang/OTP 18 [erts-7.0]

 epmd -names; rabbitmqctl status | grep clustering

epmd: up and running on port 4369 with data:

name rabbit at port 39719

 {listeners,[{clustering,39719,"::"},{'amqp/ssl',5671,"::"}]},


when I upgraded Erlang to Erlang/OTP 19 [erts-8.3.5.1], it started working.

epmd -names; rabbitmqctl status | grep clustering

epmd: up and running on port 4369 with data:

name rabbit at port 44000

 {listeners,[{clustering,44000,"::"},{'amqp/ssl',5671,"::"}]},



was it a bug with erlang 18..?

Michael Klishin

unread,
Jul 17, 2017, 5:58:09 PM7/17/17
to rabbitm...@googlegroups.com
I cannot rule this out but those kernel settings have been around since at least R13B03 (for at least 8 years):

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