How to set up cluster name through rabbitmq.config?

4,609 views
Skip to first unread message

Jakov Sosic

unread,
Mar 19, 2015, 9:00:14 AM3/19/15
to rabbitm...@googlegroups.com
Hi guys,

I'm using automatic cluster via rabbitmq.config file, but when I create
new cluster, it's name is set automatically by the first node started.

Eg, this is newly spawned cluster:

# rabbitmqctl cluster_status
Cluster status of node 'rabbit@dev-c1n01-rabbitmq' ...
[{nodes,[{disc,['rabbit@dev-c1n01-rabbitmq','rabbit@dev-c1n02-rabbitmq',
'rabbit@dev-c1n03-rabbitmq']}]},
{running_nodes,['rabbit@dev-c1n03-rabbitmq','rabbit@dev-c1n02-rabbitmq',
'rabbit@dev-c1n01-rabbitmq']},
{cluster_name,<<"rab...@dev-c1n01-rabbitmq.examle.lan">>},
{partitions,[]}]


As you can figure it out, my domain is example.net...

Is there a way to set up cluster name to something specific, like for
example 'dev-rabbitmq', or something similar, so that it's autoset upon
first node startup?

I'm asking this because I'm spinning up clusters via Cobbler/Puppet and
would like to automate it.

This is my current rabbitmq.config:


[
{rabbit, [
{cluster_nodes, {['rabbit@dev-c1n01-rabbitmq',
'rabbit@dev-c1n02-rabbitmq', 'rabbit@dev-c1n03-rabbitmq'], disc}},
{cluster_partition_handling, pause_minority},
{heartbeat, 0},
{tcp_listen_options, [binary, {backlog, 1024}, {nodelay, true},
{keepalive, true} ]},
{vm_memory_high_watermark, 0.6},
{default_user, <<"admin">>},
{default_pass, <<"would_like_to_know_do_u">>}
]},
{kernel, [

]}
,
{rabbitmq_management, [
{listener, [
{port, 15672}
]}
]}
].

Michael Klishin

unread,
Mar 19, 2015, 9:44:36 AM3/19/15
to rabbitm...@googlegroups.com, Jakov Sosic
 On 19 March 2015 at 14:00:14, Jakov Sosic (jso...@gmail.com) wrote:
> Is there a way to set up cluster name to something specific, like
> for
> example 'dev-rabbitmq', or something similar, so that it's
> autoset upon
> first node startup?
>
> I'm asking this because I'm spinning up clusters via Cobbler/Puppet
> and
> would like to automate it.

Cluster name currently only can be set via rabbitmqctl.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Sebastian YEPES

unread,
Aug 5, 2016, 2:24:49 AM8/5/16
to rabbitmq-users, jso...@gmail.com
Hello,

Is this still true with the current version 3.6.x?

Regards,
Sebastian

Michael Klishin

unread,
Aug 5, 2016, 8:11:37 AM8/5/16
to rabbitmq-users, jso...@gmail.com
Yes, rabbitmqctl and HTTP API are still the only options IIRC. Certainly nothing new was introduced in that area.
Reply all
Reply to author
Forward
0 new messages