2
RabbitMQ 3.6.6 on Erlang 19.1.3

When autocluster plugin interrogates aws autoscale group, it retrieves the value of private dns field something like ip-10-80-x-xx.

The hostname of box is node1 for example.

Then it tries to connect to ip-10-80-10-243 which won't resolve.

Running manually rabbitmqctl join_cluster ip-192-168-x-xx fails.

However, running manually rabbitmqctl join_cluster rabbit@10.80.10.243 it connects.

I don't seem to be able to change ip-10-80-x-xx as that is something that amazon sets internally.

All of these nodes instances are on an internal private subnet.

=INFO REPORT==== 28-Mar-2017::23:14:23 ===
autocluster: Discovered ['rabbit@ip-10-80-10-144','rabbit@ip-10-80-10-243']

=ERROR REPORT==== 28-Mar-2017::23:14:23 ===
autocluster: Can not communicate with cluster nodes.

Anyone know how to make rabbitmq to start with different hostname for example rabbit@privateip instead of rabbit@ip-10-80-10-144 ?

I want to use RabbitMQ cluster based on autoscaling rule where nodes can go up and down, so I will not be able to add every time that node goes up the internal dns ip-192-168-x-xx to /etc/hosts to all hosts in order to resolve the private dns for example:

127.0.0.1 node2 ip-10-80-10-243.eu-central-1.compute.internal ip-10-80-10-243
10.80.10.144 node1 ip-10-80-10-144.eu-central-1.compute.internal ip-10-80-10-144
10.80.10.243 node2 ip-10-80-10-243.eu-central-1.compute.internal ip-10-80-10-243
Berlin
  • 1,456
  • 1
  • 21
  • 43
  • 4
    *Then it tries to connect to ip-10-80-10-243 which won't resolve.* Sounds like you don't have the necessary features enabled in your VPC -- DNS Support and DNS Hostnames. [Check that](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.html#vpc-dns-hostnames)? – Michael - sqlbot Mar 29 '17 at 02:56
  • @Michael-sqlbot I want to be able to change node name from `rabbit@ip-10-80-10-144` to `rabbit@private.ip`. are you sure is it possible to ping to private dns something like ip-10-80-x-xx ? – Berlin Mar 29 '17 at 11:32
  • 1
    Yes, it's absolutely possible, if the VPC is configured correctly. See the link in my prior comment, and [this SO answer](http://stackoverflow.com/a/33443018/1695906). – Michael - sqlbot Mar 29 '17 at 11:48
  • @Michael-sqlbot I have managed to fix the vpc configuration and everything works, do you like to answer and I will mark the answer as accepted ? – Berlin Apr 01 '17 at 15:17

0 Answers0