Closed galindro closed 6 years ago
This plugin generally has no effect on RABBITMQ_NODENAME
except for two things:
rabbit@
prefix is hardcoded in some backends. This plugin is not intended to be used with N nodes per machine, e.g. on AWS.So, backends either assume that they can compute hostnames (that will actually resolve) and can communicate them to their discovery mechanism or that the hostnames are provided e.g. by DNS or using an external API (such as EC2 instance listing or DNS A/AAAA record resolution)
This is design and will not change.
On AWS your options are private DNS-provided hostnames and private IP addresses.
If Docker or anything else hardcodes or otherwise messes with hostnames, it's not a problem with this plugin. It is opinionated by design. You can use Consul-based discovery (for which there are examples that use Docker) or not use Docker and rely on the AWS backend which will use the options above.
We are not interested in complicating the AWS backend more to support hybrid scenarios.
@michaelklishin if this plugin has no effect on RABBITMQ_NODENAME, why is it documented?
Another thing is: I'm not using 'N' nodes per machine. I'm using 1 node per machine.
@galindro I'm quite confident that parts of the docs is from the first year or so of this plugin, well before private IP addresses or all the countless Consul node name options were introduced. This plugin does not change the way RABBITMQ_NODENAME
is used — that happens in the core server's scripts. It DOES expect certain node name values or naming schemes depending on the backend as explained above and that may or may not work well with hardcoded RABBITMQ_NODENAME
values.
Our team does not use GitHub issues for questions and discussions. If you have something else to say, take it to rabbitmq-users.
@galindro according to the log, the node name is rabbit@rabbitmq
, so exactly the value provided in RABBITMQ_NODENAME
. So clearly this is a misunderstanding of some kind => mailing list material.
Problem description
I have started two rabbitmq docker containers in two AWS EC2 different instances in sa-east-1 region using AWS ECS to manage them. I've constructed the image and I'm pretty sure that this plugin was correctly installed (this info could be confirmed by the logs bellow).
I need to use
RABBITMQ_NODENAME
to setup the rabbitmq node name to a defined hostname because I can't use docker container with host networking.For testing, you should start a rabbitmq 3.6.x container with rabbitmq-autocluster plugin version 0.10.0 using the following run command in two EC2 instances tagged with
env=socialbase
:Here are the details of my env:
Environment variables
RabbitMQ/Erlang Version
RabbitMQ server and client application log files
RabbitMQ plugin information via
rabbitmq-plugins list
Operating system, version, and patch level
Alpine Linux 3.4
rabbitmq-collect-env
https://drive.google.com/file/d/0B7odw6Q-9mFdSzFZWDl5eFBRZ1k/view?usp=sharing