Rabbitmq listen distribution port and IP

717 views
Skip to first unread message

Artem Barbaruk

unread,
Feb 2, 2018, 11:35:46 AM2/2/18
to rabbitmq-users
Greetings,

Could you please help to find out how I can set IP to listener for distribution port that RabbitMQ nodes use to communicate with CLI tools and other nodes using a port known. I've found only RABBITMQ_DIST_PORT environment variable that changes port but I cannot set IP to listen. 

I'am running Ubuntu 16.04. Now I see the following in listening:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.0.5:5672      0.0.0.0:*               LISTEN      26549/beam.smp  
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      26549/beam.smp  
tcp        0      0 192.168.0.5:8080      0.0.0.0:*               LISTEN      26549/beam.smp  
tcp        0      0 192.168.0.5:4369      0.0.0.0:*               LISTEN      26637/epmd      
tcp        0      0 127.0.0.1:4369          0.0.0.0:*               LISTEN      26637/epmd      
tcp6       0      0 ::1:4369                :::*                    LISTEN      26637/epmd   

Rabbitmq configuration:

/etc/rabbitmq/rabbitmq.conf:
listeners.tcp.1 = 192.168.0.5:5672
management.listener.ip = 192.168.0.5
management.listener.port = 8080

/etc/rabbitmq/rabbitmq-env.conf:
RABBITMQ_NODE_IP_ADDRESS=192.168.0.5
export ERL_EPMD_ADDRESS=192.168.0.5

Thank you in advance.

Michael Klishin

unread,
Feb 2, 2018, 12:03:41 PM2/2/18
to rabbitm...@googlegroups.com
You can configure distribution port/port range using configuration file as well:
https://www.rabbitmq.com/networking.html#epmd-inet-dist-port-range.

`kernel.inet_dist_use_interface` from [1] is probably the parameter you are looking for.
They are runtime parameters so you have to use advanced.config for them.

As for epmd, you've already discovered `ERL_EPMD_ADDRESS`. I don't think there is
a different way.

1. http://erlang.org/doc/man/kernel_app.html

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

Artem Barbaruk

unread,
Feb 2, 2018, 1:22:39 PM2/2/18
to rabbitmq-users
Thank you, that's what I need. I've put to /etc/rabbitmq/advanced.config the following:

[{kernel,[{inet_dist_use_interface,{192,168,0,5}}]}].

Now it shows:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.0.5:5672      0.0.0.0:*               LISTEN      26549/beam.smp  
tcp        0      0 192.168.0.5:25672           0.0.0.0:*               LISTEN      26549/beam.smp  
tcp        0      0 192.168.0.5:8080      0.0.0.0:*               LISTEN      26549/beam.smp  
tcp        0      0 192.168.0.5:4369      0.0.0.0:*               LISTEN      26637/epmd      
tcp        0      0 127.0.0.1:4369          0.0.0.0:*               LISTEN      26637/epmd      
tcp6       0      0 ::1:4369                :::*                    LISTEN      26637/epmd   

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,
Feb 4, 2018, 1:56:24 PM2/4/18
to rabbitm...@googlegroups.com
We will add a note to the Networking guide.

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