This question has been asked before (RabbitMQ Failed to initialize erlang distribution), but I haven't been able to find out how to fix it from the existing answers. Following https://www.rabbitmq.com/man/rabbitmqctl.1.man.html, I'd like to run the rabbitmqctl status
command to display information about the RabbitMQ broker. However, I get an error message:
kurt@kurt-ThinkPad:~$ rabbitmqctl status
Error: Failed to initialize erlang distribution: {{shutdown, {failed_to_start_child, net_kernel, {'EXIT',nodistribution}}}, {child,undefined, net_sup_dynamic, {erl_distribution, start_link, [['rabbitmq-cli-13', shortnames]]}, permanent,1000,supervisor, [erl_distribution]}}.
Only root or rabbitmq should run rabbitmqctl
If I run the command with sudo
, I still get an error message:
kurt@kurt-ThinkPad:~$ sudo rabbitmqctl status
Error: Failed to initialize erlang distribution: {{shutdown, {failed_to_start_child, net_kernel, {'EXIT',nodistribution}}}, {child,undefined, net_sup_dynamic, {erl_distribution, start_link, [['rabbitmq-cli-69', shortnames]]}, permanent,1000,supervisor, [erl_distribution]}}.
How can I fix this?