[rabbitmq-discuss] rabbitmqctl not reporting anything
david at rabbitmq.com
Thu Aug 5 22:57:00 BST 2010
Greg Turnquist <gturnquist at vmware.com> writes:
> rabbitmqctl tries to access the same node name:
> gturnquist-mbp:~ gturnquist$ sudo rabbitmqctl list_exchanges
> Listing exchanges ...
> Error: unable to connect to node 'rabbit at gturnquist-mbp': nodedown
> - unable to connect to epmd on gturnquist-mbp: address
> - current node: 'rabbitmqctl50582 at gturnquist-mbp'
> - current node home dir: /opt/local/var/lib/rabbitmq
> - current node cookie hash: WsSCWeum/oLXE3iNW2zauw==
> I don't know where it decided to call the node
> rabbit at gturnquist-mbp. It is the local hostname, but I usually use
> gturnquist-mbp.local to reference my local LAN IP address. I don't see
> how to override this setting from either the server or the ctl
> script. It seems like an issue, because I thought doing all this on
> the same node would be out-of-the-box functionality.
RabbitMQ requires that the host (or hosts) running rabbitmq-server can
be named by a short hostname (i.e. without any dots).
So when constructing the default value of RABBITMQ_NODENAME, the
rabbitmq scripts will assume that the hostname given by `hostname -s` is
a valid name for the machine. This is usually a reasonable assumption,
but it sounds like it doesn't apply on your machine.
You can override it by setting RABBITMQ_NODENAME in the environment, as
documented in the rabbitmq-server man page. This also applies to
rabbitmqctl. The RABBITMQ_NODENAME value should be of the form
"name at host". If your machine doesn't have a simple hostname, then you
can simply use "rabbit at localhost", though of course this
constrains you to run rabbitmqctl on the same machine as the server.
Staff Engineer, RabbitMQ
SpringSource, a division of VMware
More information about the rabbitmq-discuss