“错误:无法初始化erlang发布:”尝试运行“rabbitmqctl status”

时间:2016-12-05 17:53:29

标签: python rabbitmq pika rabbitmqctl

之前已经问过这个问题(RabbitMQ Failed to initialize erlang distribution),但我无法从现有的答案中找到解决方法。在https://www.rabbitmq.com/man/rabbitmqctl.1.man.html之后,我想运行rabbitmqctl status命令来显示有关RabbitMQ代理的信息。但是,我收到一条错误消息:

kurt@kurt-ThinkPad:~$ rabbitmqctl status
  

错误:无法初始化erlang发布:{{shutdown,                                                          {failed_to_start_child,                                                           net_kernel,                                                           { '退出',nodistribution}}},                                                         {孩子,不确定的,                                                          net_sup_dynamic,                                                          {erl_distribution,                                                           START_LINK,                                                           [[ '的RabbitMQ-CLI-13',                                                             简短名字]]},                                                          永久,1000,监事,                                                          [erl_distribution]}}

     

只有root或rabbitmq才能运行rabbitmqctl

如果我使用sudo运行命令,我仍会收到错误消息:

kurt@kurt-ThinkPad:~$ sudo rabbitmqctl status
  

错误:无法初始化erlang发布:{{shutdown,                                                          {failed_to_start_child,                                                           net_kernel,                                                           { '退出',nodistribution}}},                                                         {孩子,不确定的,                                                          net_sup_dynamic,                                                          {erl_distribution,                                                           START_LINK,                                                           [[ '的RabbitMQ-CLI-69',                                                             简短名字]]},                                                          永久,1000,监事,                                                          [erl_distribution]}}

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:7)

尝试启用rabbitmq管理插件时,我也遇到了类似的错误, $ rabbitmq-plugins启用rabbitmq_management

错误:无法初始化erlang发布:{{shutdown,                                                    {failed_to_start_child,                                                     AUTH,                                                     {"阅读时出错./.erlang.cookie:eacces",...}}。

当我使用** sudo 时,它已经解决了。**

答案 1 :(得分:6)

实际上我得到了同样的错误:

  

只有root或rabbitmq才能运行rabbitmqctl

当我想运行以下命令时:

rabbitmq-plugins enable rabbitmq_mqtt

我刚用 sudo 运行它,它已经解决了!

尝试重新启动rabbitmq-server,然后使用sudo重试:

sudo service rabbitmq-server restart