RabbitMQ DNS Discovery doesn’t recognise itself
I have however managed to get my cluster up and running by specifying node names like this:
export MYIP=`ifconfig eth0 | grep ‘inet’ | awk ‘{print $2}’`
export NEW_HOSTNAME=`dig -x $MYIP +short | cut -d’.’ -f1`
export RABBITMQ_NODENAME=rabbit@$NEW_HOSTNAME
export RABBITMQ_MNESIA_DIR=/var/lib/rabbitmq/mnesia/rabbit@$HOSTNAME
I have one remaining issue which is that when my first node starts up, it looks up the shared entry in DNS and finds itself but the name doesn’t match because the node knows its own name so doesn’t perform a reverse DNS I think. I get a long delay while it fails to connect to `rabbit@myrealhost` instead of `rabbit@ip-10-10-10-10`. The subsequent nodes start up correctly.
Surely if Rabbit is going to insist on using reverse DNS it should use it consistently? Or better not use reverse DNS at all but have a way of requesting the node name from a node if I have the correct cookie?
Many thanks,
Mat.
Read more here: Source link