Support for Docker Swarm

393 views
Skip to first unread message

Muhammad Rehan Saeed

unread,
Mar 5, 2018, 11:54:11 AM3/5/18
to rabbitmq-users
I'm trying to get RabbitMQ 3.7.3 working with Docker Swarm's service discovery. I raised a GitHub issue where I showed that My RabbitMQ instances start but are unable to discover each other. Here is what I've tried:

rabbitmq.conf


cluster_formation.peer_discovery_backend = rabbit_peer_discovery_dns
cluster_formation
.dns.hostname = rabbitmq

docker-stack.yml


version: '3.3'

services
:
  rabbitmq
:
    image
: rabbitmq:3.7.0
    deploy
:
      endpoint_mode
: dnsrr
      replicas
: 3
    environment
:
     
- RABBITMQ_DEFAULT_USER=admin
     
- RABBITMQ_DEFAULT_PASS=password
     
- RABBITMQ_ERLANG_COOKIE=foobar
     
- RABBITMQ_USE_LONGNAME=true
   
#healthcheck:
   
#  test: ["rabbitmqctl", "node_health_check"]
   
#  interval: 60s
   
#  timeout: 5s
   
#  retries: 3
    networks
:
     
- myoverlay
    ports
:
     
- mode: host
        target
: 25672
        published
: 25672
     
- mode: host
        target
: 15672
        published
: 15672
     
- mode: host
        target
: 5672
        published
: 5672
     
- mode: host
        target
: 4369
        published
: 4369

networks
:
  myoverlay
:

I can't seem to get my cluster to form. Has anyone managed to getRabbitMQ working on a Docker Swarm. Is Docker Swarm being considered for being one of the built in methods of auto-scaling?

Michael Klishin

unread,
Mar 5, 2018, 1:00:35 PM3/5/18
to rabbitm...@googlegroups.com
It would be considered if someone decides to contribute it.

We cannot suggest much without any logs. I could find any Docker Swarm docs that explain whether
the "dnsrr" mode sets up reverse lookup records, which rabbit_peer_discovery_dns needs [1].

I suggest that you enable debug mode, reset (or recreate from scratch) and take a look at the logs.
Both A/AAAA and reverse lookup query results should be logged.

--
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
Reply all
Reply to author
Forward
0 new messages