How to fix rabbitmq installation?
Somehow rabbitmq is installed on my Mac (OS X Mavericks) and I see the following process
500 86 1 0 Tue05PM ?? 0:00.31 /opt/local/bin/daemondo --label=rabbitmq-server --start-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.rabbitmq-server/rabbitmq-server.wrapper restart ; --pid=none
500 98 1 0 Tue05PM ?? 0:00.00 /bin/sh /opt/local/sbin/rabbitmq-server
500 109 98 0 Tue05PM ?? 64:58.43 /opt/local/lib/erlang/erts-6.0/bin/beam.smp -W w -K true -A30 -P 1048576 -- -root /opt/local/lib/erlang -progname erl -- -home /opt/local/var/lib/rabbitmq -- -pa /opt/local/lib/rabbitmq/bin/../lib/rabbitmq_server-3.1.5/sbin/../ebin -noshell -noinput -s rabbit boot -sname rabbit@localhost -boot start_sasl -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"/opt/local/var/log/rabbitmq/[email protected]"} -rabbit sasl_error_logger {file,"/opt/local/var/log/rabbitmq/[email protected]"} -rabbit enabled_plugins_file "/opt/local/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/opt/local/lib/rabbitmq/bin/../lib/rabbitmq_server-3.1.5/sbin/../plugins" -rabbit plugins_expand_dir "/opt/local/var/lib/rabbitmq/mnesia/rabbit@localhost-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/opt/local/var/lib/rabbitmq/mnesia/rabbit@localhost" @STDOUT_STDERR_REDIRECTION@
However, diagnostics shows the following:
sudo rabbitmqctl status
Status of node rabbit@alsMac ...
Error: unable to connect to node rabbit@alsMac: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit@alsMac]
hosts, their running nodes and ports:
- unable to connect to epmd on alsMac: nxdomain (non-existing domain)
current node details:
- node name: 'rabbitmqctl14166@jhammar-lt'
- home dir: /opt/local/var/lib/rabbitmq
- cookie hash: u9T+ExBe4Ol0RIKh8VYXcw==
What should I do?
Solution 1:
I brew installed rabbitmq, and had this problem several weeks later after installing.
You may have a look at
/usr/local/etc/rabbitmq/rabbitmq-env.conf
and run in terminal:
$ hostname
make sure the value of hostname equals the value of NODENAME
You can set the value of hostname by
sudo scutil --set HostName xxx
Solution 2:
I had the same issue. It turned out the /etc/hosts file on my Mac was empty. To resolve it I added the following using 'sudo vim /etc/hosts'.
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost