[rabbitmq-discuss] is it possible to have broker listen on multiple ports

Mark Geib mark.geib at echostar.com
Fri Nov 20 13:14:45 GMT 2009


Matthew,

Thanks for the reply. In a related issue I have found that the erlang
client, tagged for 1.6.0, does not support specifying the port for the
broker connection. This actually prompted the first question. In a new
application our IT wants to use a different port for the broker
connections, but I found it difficult to support in an erlang client.

I will plan to go with 1.7.0.

Mark.

Matthew Sackman wrote:
> Hi Mark,
> 
> Staggeringly, this doesn't seem to be on our website, and the FAQ entry
> is wrong. You want to alter the tcp_listeners argument to Rabbit.
> Unfortunately, the ways of doing this are all pretty grim and I've
> raised a bug internally for us to look at this and sort things out.
> Ideally, you should be able to make an entry in
> /etc/rabbitmq/rabbitmq.config so that the file looks a bit like:
> 
> [{rabbit, [{tcp_listeners, [{'10.224.189.156', 3333},
>                             {'10.224.189.156', 3334}
>                            ]
>            }
>           ]
>  }
> ].
> 
> That will tell Rabbit to listen on ports 3333 and 3334 on the indicated
> IP. You can use '0.0.0.0' to indicate all network interfaces. Don't
> forget the quotes around the IP addresses, otherwise Rabbit will fail to
> parse the configuration file.
> 
> However, sadly, Rabbit's start-up scripts override the configuration for
> tcp_listeners. Thus, edit /usr/lib/rabbitmq/bin/rabbitmq-server. Towards
> the bottom, you'll find a line:
> 
>     -rabbit tcp_listeners '[{"'${RABBITMQ_NODE_IP_ADDRESS}'", '${RABBITMQ_NODE_PORT}'}]' \
> 
> Just remove that line completely, and save the file. Then, when starting
> rabbit, you should find entries in the logs indicating it has correctly
> started listening on all the interfaces specified.
> 
> This will definitely work on 1.7. On 1.6, the configuration file didn't
> exist, and whilst there are ways around, they're even more hairy, so I
> would encourage you to stick with 1.7!
> 
> Matthew
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> 

-- 
Principal Engineer
Cheyenne Software Engineering
mark.geib at echostar.com / 35-215

PGP fingerprint:6DFC 389D 9796 0188 92E5 58F5 34C5 6B47 D091 76FD




More information about the rabbitmq-discuss mailing list