rabbitmq.conf vs rabbitmq.config

270 views
Skip to first unread message

Ry

unread,
Feb 11, 2019, 5:37:47 PM2/11/19
to rabbitmq-users
Hi All,

I'm trying to cluster my rabbitmq nodes however, it's not clustering properly.

Is it due to the fact I have both rabbitmq.conf and rabbitmq.config?

Here are the contents of rabbitmq.conf

loopback_users.guest = false
cluster_formation.peer_discovery_backend  = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
cluster_formation.k8s.address_type = hostname
cluster_formation.node_cleanup.interval = 30
cluster_formation.node_cleanup.only_log_warning = true
cluster_partition_handling = autoheal



Here are the contents of rabbitmq.config
[  {rabbitmq_management, [    {load_definitions, "/etc/rabbitmq/definitions.json"}  ]}].


Here's our load_definition
{
  "users": [
    {
      "name": "xxx",
      "password": "yyy",
      "tags": "management,,monitoring"
    },
    {
      "name": "zzz",
      "password": "aaa",
      "tags": "administrator"
    }
  ],
  "vhosts": [
    {
      "name": "/"
    },
  ],
  "permissions": [
    {
      "user": "zzz",
      "vhost": "/",
      "configure": ".*",
      "write": ".*",
      "read": ".*"
    },
    {
      "user": "xxx",
      "vhost": "/",
      "configure": ".*",
      "write": ".*",
      "read": ".*"
    }
  ],
  "parameters": [],
  "policies": [
    {
      "vhost": "/",
      "name": "xxx-default",
      "pattern": ".*",
      "apply-to": "all",
      "definition": {
        "max-length-bytes": 5000000000,
        "message-ttl": 2592000000,
        "ha-mode": "exactly",
        "ha-params": 2
      },
      "priority": 1
    }
  ]
}

Am I not allowed to combine both? rabbitmq.conf and rabbitmq.config?

Thanks in advance,
Ry

Luke Bakken

unread,
Feb 11, 2019, 5:51:38 PM2/11/19
to rabbitmq-users
Hi Ry,

You should rename /etc/rabbitmq/rabbitmq.config to /etc/rabbitmq/advanced.config

https://www.rabbitmq.com/configure.html#advanced-config-file

When you do this and restart RabbitMQ, be sure to double-check the startup log messages to ensure that RabbitMQ used both files. It'll have an entry with config file(s): like this:


Thanks,
Luke

Ry

unread,
Feb 11, 2019, 6:34:37 PM2/11/19
to rabbitmq-users
Hi Luke,

I just tried that before reading your response. And it did work!

Thank you so much!!
Ry

Luke Bakken

unread,
Feb 11, 2019, 7:03:39 PM2/11/19
to rabbitmq-users
Good deal, and thanks for letting us know.
Reply all
Reply to author
Forward
0 new messages