RabbitMQ consumer connection is refused when trying to read notifications
Hi, I followed the video and the steps provided in this video link and the consumer connection is being refused. https://www.openstack.org/videos/summits/denver-2019/nova-versioned-notifica... /etc/nova/nova.conf file changes.. [notifications] notify_on_state_change=vm_state default_level=INFO notification_format=both [oslo_messaging_notifications] driver=messagingv2 transport_url=rabbit://guest:guest@10.30.8.57:5672/ topics=notification retry=-1 The python consume code is as follows (followed the example provided in the video: transport = oslo_messaging.get_notification_transport( cfg.CONF, url='rabbit://guest:guest@10.30.8.57:5672/') targets = [ oslo_messaging.Target(topic='versioned_notifications'), ] Am I missing any other configuration in any of the services in OpenStack? Let me know if you need any other info. /anil.
Hi, Can someone please provide some clue on this issue? /anil. On Thu, Jul 16, 2020 at 2:41 PM Anil Jangam <anilj.mailing@gmail.com> wrote:
Hi,
I followed the video and the steps provided in this video link and the consumer connection is being refused.
https://www.openstack.org/videos/summits/denver-2019/nova-versioned-notifica...
/etc/nova/nova.conf file changes.. [notifications] notify_on_state_change=vm_state default_level=INFO notification_format=both
[oslo_messaging_notifications] driver=messagingv2 transport_url=rabbit://guest:guest@10.30.8.57:5672/ topics=notification retry=-1
The python consume code is as follows (followed the example provided in the video: transport = oslo_messaging.get_notification_transport( cfg.CONF, url='rabbit://guest:guest@10.30.8.57:5672/') targets = [ oslo_messaging.Target(topic='versioned_notifications'), ]
Am I missing any other configuration in any of the services in OpenStack?
Let me know if you need any other info.
/anil.
On Thu, Jul 16, 2020 at 14:41, Anil Jangam <anilj.mailing@gmail.com> wrote:
Hi,
I followed the video and the steps provided in this video link and the consumer connection is being refused. https://www.openstack.org/videos/summits/denver-2019/nova-versioned-notifica...
/etc/nova/nova.conf file changes.. [notifications] notify_on_state_change=vm_state default_level=INFO notification_format=both
[oslo_messaging_notifications] driver=messagingv2 transport_url=rabbit://guest:guest@10.30.8.57:5672/ topics=notification retry=-1
The python consume code is as follows (followed the example provided in the video: transport = oslo_messaging.get_notification_transport( cfg.CONF, url='rabbit://guest:guest@10.30.8.57:5672/') targets = [ oslo_messaging.Target(topic='versioned_notifications'), ]
Does the 'rabbit://guest:guest@10.30.8.57:5672/' URL is a valid one in your deployment? Especially regarding the authentication. E.g. does 'sudo rabbitmqctl list_users' returns guest as a valid user? Does 'sudo rabbitmqctl authenticate_user guest guest' returns 'success'? In general if your nova deployment works (e.g. you can boot servers with nova) then your nova.conf [DEFAULT]/transport_url has a valid message bus config. And by default the notifications also uses that connection. However with [oslo_messaging_notifications]/transport_url you can redefine which message bus the notifications are emitted to. This could be important as by default (since cells v2) nova uses at least two message bus connection one between the API services and the super conductors and another for cell1 (and a separate one for each cell) between the cell conductors and and the computes in that cell[1]. So nova services emit the notification to the message bus they use therefore by default not all the notification is emitted to the same bus. In my demo I reconfigured [oslo_messaging_notifications]/transport_url for each nova service to point to the same message bus (the on at the API level) and connected the demo script to that bus. [1] https://docs.openstack.org/nova/latest/user/cellsv2-layout.html
Am I missing any other configuration in any of the services in OpenStack?
You don't need to change the configuration of other OpenStack service to make the demo script work.
Let me know if you need any other info.
/anil.
Cheers, gibi
participants (2)
-
Anil Jangam
-
Balázs Gibizer