OpenStack中创建消息队列用户时出现:Error: unable to connect to node rabbit@localhost: nodedown

文章目录

  • 一、问题
  • 二、解决办法

一、问题

在安装RadditMQ结束,创建消息队列用户,用于controler和node节点连接rabbitmq的认证时出现

[root@controller ~]#  rabbitmqctl add_user openstack RABBIT_PASS
Error: unable to connect to node rabbit@localhost: nodedown    无法连接到节点rabbit

DIAGNOSTICS
===========

attempted to contact: [rabbit@localhost]

rabbit@localhost:
  * connected to epmd (port 4369) on localhost
  * epmd reports node 'rabbit' running on port 25672
  * TCP connection succeeded but Erlang distribution failed

  * Hostname mismatch: node "rabbit@controller" believes its host is different. Please ensure that hostnames resolve the same way locally and on "rabbit@controller"


current node details:
- node name: 'rabbitmq-cli-13@controller'
- home dir: /var/lib/rabbitmq
- cookie hash: gwGz2ppxNd17Sx4omtwyZw==

根据报错的提示以及下面的一些提示可以大概看出是cookie的问题

二、解决办法

这可能由于某些原因在安装服务时没有正确配置注册项,一般重新安装RabbitMQ的服务

1.在重新安装RabbitMQ服务之前我们需要先杀死mq的进程

ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9 

2.安装RabbitMQ服务

3.在重新启动mq进程

rabbitmq-server -detached

4.查看mq进程的状态

[root@ct ~]#rabbitmqctl status
Status of node rabbit@ct
[{
     pid,27550},
 {
     running_applications,
     [{
     rabbitmq_management,"RabbitMQ Management Console","3.6.16"},
      {
     rabbitmq_management_agent,"RabbitMQ Management Agent","3.6.16"},
      {
     rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.6.16"},
      {
     rabbit,"RabbitMQ","3.6.16"},
      {
     amqp_client,"RabbitMQ AMQP Client","3.6.16"},
      {
     rabbit_common,
          "Modules shared by rabbitmq-server and rabbitmq-erlang-client",
          "3.6.16"},
      {
     xmerl,"XML parser","1.3.14"},
      {
     cowboy,"Small, fast, modular HTTP server.","1.0.4"},
      {
     ranch,"Socket acceptor pool for TCP protocols.","1.3.2"},
      {
     mnesia,"MNESIA  CXC 138 12","4.14.3"},
      {
     syntax_tools,"Syntax tools","2.1.1"},
      {
     ssl,"Erlang/OTP SSL application","8.1.3.1"},
      {
     os_mon,"CPO  CXC 138 46","2.4.2"},
      {
     compiler,"ERTS  CXC 138 10","7.0.4.1"},
      {
     cowlib,"Support library for manipulating Web protocols.","1.0.2"},
      {
     public_key,"Public key infrastructure","1.4"},
      {
     crypto,"CRYPTO","3.7.4"},
      {
     asn1,"The Erlang ASN1 compiler version 4.0.4","4.0.4"},
      {
     recon,"Diagnostic tools for production use","2.3.2"},
      {
     inets,"INETS  CXC 138 49","6.3.9"},
      {
     sasl,"SASL  CXC 138 11","3.0.3"},
      {
     stdlib,"ERTS  CXC 138 10","3.3"},
      {
     kernel,"ERTS  CXC 138 10","5.2"}]},
 {
     os,{
     unix,linux}},
 {
     erlang_version,
     "Erlang/OTP 19 [erts-8.3.5.3] [source] [64-bit] [smp:4:4] [async-threads:64] [hipe] [kernel-poll:true]\n"},
 {
     memory,
...............

可以看到现在的进程状态中没有了报错信息

5.再次创建消息队列用户

[root@ct ~]#  rabbitmqctl add_user openstack RABBIT_PASS                                                      
Creating user "openstack"    创建用户"openstack"

创建成功,问题解决。

你可能感兴趣的:(错误集,linux,openstack)