Distributed Erlang ports and RabbitMQ clustering

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Distributed Erlang ports and RabbitMQ clustering

This post has NOT been accepted by the mailing list yet.

I am trying to configure RabbitMQ so that Erlang uses a specified port range when clustering rabbit nodes. I supply the following configuration (etc/rabbitmq/rabbitmq.conf) on both machines I am trying to cluster together.

{kernel, [
        {inet_dist_listen_max, 27280},
        {inet_dist_listen_min, 27275}

However, I notice that one of the machine (the one joining the cluster) will use a port outside the configured range to communicate with the other machine. I was expecting to see 27275 on machine B but I see that it uses 33013 (a randomly chosen port) to talk to A

Machine A
tcp        0      0 *:27275                     *:*                  
tcp        0      0 A.DOMAIN.COM:27275     B.DOMAIN.CON:33013

Machine B
tcp        0      0 *:27275                     *:*              
tcp        0      0 B.DOMAIN.COM:33013     A.DOMAIN.COM:27275