Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Nova api failed Rabbit authentication

Hi,

the nova api module is failing not allowing the creation of new instances. The error seems to be related to the rabbit server authentication, however the credential are defined in the nova.conf and they work for the other modules.

(openstack) hypervisor list
+----+---------------------+-----------------+-----------------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP         | State |
+----+---------------------+-----------------+-----------------+-------+
|  1 | compute1            | QEMU            | 192.168.100.241 | up    |
+----+---------------------+-----------------+-----------------+-------+
(openstack) hypervisor show compute1
Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'amqp.exceptions.AccessRefused'> (HTTP 500) (Request-ID: req-7f402b55-fe57-4f83-8f32-6b5a328c1133)
(openstack) 


[root@controller ~]# grep rabbit /etc/nova/nova.conf
transport_url = rabbit://openstack:RABBIT_PASS@controller
# DEPRECATED: The messaging driver to use, defaults to rabbit. Other drivers
#rpc_backend=rabbit
# rabbit://USERNAME:PASSWORD@HOSTNAME:PORT/VIRTUAL_HOST
# The scheme can be either qpid or rabbit, the following sample shows
#             "transport_url": "rabbit://rabbit.example.com",
#             "transport_url": "rabbit://rabbit1.example.com",
#             "transport_url": "rabbit://rabbit2.example.com",
[oslo_messaging_rabbit]
# Deprecated group;name - DEFAULT;rabbit_durable_queues
# Deprecated group;name - [oslo_messaging_rabbit]/kombu_reconnect_timeout
# Deprecated group;name - DEFAULT;rabbit_host
#rabbit_host=localhost
# Deprecated group;name - DEFAULT;rabbit_port
#rabbit_port=5672
# Deprecated group;name - DEFAULT;rabbit_hosts
#rabbit_hosts=$rabbit_host:$rabbit_port
# Deprecated group;name - DEFAULT;rabbit_use_ssl
#rabbit_use_ssl=false
# Deprecated group;name - DEFAULT;rabbit_userid
#rabbit_userid=guest
# Deprecated group;name - DEFAULT;rabbit_password
#rabbit_password=guest
# Deprecated group;name - DEFAULT;rabbit_login_method
#rabbit_login_method=AMQPLAIN
# Deprecated group;name - DEFAULT;rabbit_virtual_host
#rabbit_virtual_host=/
#rabbit_retry_interval=1
# Deprecated group;name - DEFAULT;rabbit_retry_backoff
#rabbit_retry_backoff=2
#rabbit_interval_max=30
# Deprecated group;name - DEFAULT;rabbit_max_retries
#rabbit_max_retries=0
# names) are mirrored across all nodes, run: "rabbitmqctl set_policy HA
# Deprecated group;name - DEFAULT;rabbit_ha_queues
#rabbit_ha_queues=false
#rabbit_transient_queues_ttl=1800
#rabbit_qos_prefetch_count=0
# Deprecated group;name - DEFAULT;fake_rabbit
#fake_rabbit=false



  [root@controller rabbitmq]# rabbitmqctl cluster_status
Cluster status of node rabbit@controller ...
[{nodes,[{disc,[rabbit@controller]}]},
 {running_nodes,[rabbit@controller]},
 {cluster_name,<<"rabbit@controller">>},
 {partitions,[]},
 {alarms,[{rabbit@controller,[]}]}]
[root@controller rabbitmq]# rabbitmqctl authenticate_user openstack RABBIT_PASS
Authenticating user "openstack" ...
Success


=INFO REPORT==== 17-Nov-2017::16:12:48 ===
accepting AMQP connection <0.2035.0> (192.168.100.135:56124 -> 192.168.100.135:5672)

=INFO REPORT==== 17-Nov-2017::16:12:48 ===
Connection <0.2035.0> (192.168.100.135:56124 -> 192.168.100.135:5672) has a client-provided name: nova-api:1908:8da30385-8429-4dc4-a1fa-1e55e558eba0

=ERROR REPORT==== 17-Nov-2017::16:12:48 ===
Error on AMQP connection <0.2035.0> (192.168.100.135:56124 -> 192.168.100.135:5672, state: starting):
AMQPLAIN login refused: user 'openstack' - invalid credentials

=INFO REPORT==== 17-Nov-2017::16:12:48 ===
closing AMQP connection <0.2035.0> (192.168.100.135:56124 -> 192.168.100.135:5672 - nova-api:1908:8da30385-8429-4dc4-a1fa-1e55e558eba0)

Cheers!