nova/cinder等组件报连不上 rabbitmq

这篇具有很好参考价值的文章主要介绍了nova/cinder等组件报连不上 rabbitmq。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

问题现象:

# kubectl logs nova-compute-g4pnl -n openstack -c nova-compute
...
+ exec nova-compute --config-file /etc/nova/nova.conf --config-file /tmp/pod-shared/nova-vnc.ini --config-dir /opt/nova-compute/conf
Deprecated: Option "notification_format" from group "DEFAULT" is deprecated. Use option "notification_format" from group "notifications".
2023-07-11 20:06:08.393 1617 INFO os_vif [-] Loaded VIF plugins: linux_bridge, noop, ovs
2023-07-11 20:06:08.500 1617 WARNING oslo_config.cfg [req-fc476544-5edf-461a-bb5a-f3f8aee4bffe - - - - -] Deprecated: Option "heartbeat_in_pthread" from group "oslo_messaging_rabbit" is deprecated for removal.  Its value may be silently ignored in the future.
2023-07-11 20:06:08.530 1617 CRITICAL nova [req-fc476544-5edf-461a-bb5a-f3f8aee4bffe - - - - -] Unhandled error: amqp.exceptions.AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
2023-07-11 20:06:08.530 1617 ERROR nova Traceback (most recent call last):
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/bin/nova-compute", line 10, in <module>
2023-07-11 20:06:08.530 1617 ERROR nova     sys.exit(main())
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/nova/cmd/compute.py", line 59, in main
2023-07-11 20:06:08.530 1617 ERROR nova     topic=compute_rpcapi.RPC_TOPIC)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/nova/service.py", line 256, in create
2023-07-11 20:06:08.530 1617 ERROR nova     periodic_interval_max=periodic_interval_max)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/nova/service.py", line 115, in __init__
2023-07-11 20:06:08.530 1617 ERROR nova     conductor_api.wait_until_ready(context.get_admin_context())
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/nova/conductor/api.py", line 68, in wait_until_ready
2023-07-11 20:06:08.530 1617 ERROR nova     timeout=timeout)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/nova/baserpc.py", line 58, in ping
2023-07-11 20:06:08.530 1617 ERROR nova     return cctxt.call(context, 'ping', arg=arg_p)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/rpc/client.py", line 179, in call
2023-07-11 20:06:08.530 1617 ERROR nova     transport_options=self.transport_options)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/transport.py", line 128, in _send
2023-07-11 20:06:08.530 1617 ERROR nova     transport_options=transport_options)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 682, in send
2023-07-11 20:06:08.530 1617 ERROR nova     transport_options=transport_options)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 626, in _send
2023-07-11 20:06:08.530 1617 ERROR nova     msg.update({'_reply_q': self._get_reply_q()})
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 607, in _get_reply_q
2023-07-11 20:06:08.530 1617 ERROR nova     conn = self._get_connection(rpc_common.PURPOSE_LISTEN)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 598, in _get_connection
2023-07-11 20:06:08.530 1617 ERROR nova     purpose=purpose)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/common.py", line 425, in __init__
2023-07-11 20:06:08.530 1617 ERROR nova     self.connection = connection_pool.create(purpose)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/pool.py", line 146, in create
2023-07-11 20:06:08.530 1617 ERROR nova     return self.connection_cls(self.conf, self.url, purpose)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 627, in __init__
2023-07-11 20:06:08.530 1617 ERROR nova     self.ensure_connection()
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/oslo_messaging/_drivers/impl_rabbit.py", line 744, in ensure_connection
2023-07-11 20:06:08.530 1617 ERROR nova     self.connection.ensure_connection(errback=on_error)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/kombu/connection.py", line 383, in ensure_connection
2023-07-11 20:06:08.530 1617 ERROR nova     self._ensure_connection(*args, **kwargs)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/kombu/connection.py", line 439, in _ensure_connection
2023-07-11 20:06:08.530 1617 ERROR nova     callback, timeout=timeout
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/kombu/utils/functional.py", line 325, in retry_over_time
2023-07-11 20:06:08.530 1617 ERROR nova     return fun(*args, **kwargs)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/kombu/connection.py", line 866, in _connection_factory
2023-07-11 20:06:08.530 1617 ERROR nova     self._connection = self._establish_connection()
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/kombu/connection.py", line 801, in _establish_connection
2023-07-11 20:06:08.530 1617 ERROR nova     conn = self.transport.establish_connection()
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 128, in establish_connection
2023-07-11 20:06:08.530 1617 ERROR nova     conn.connect()
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 329, in connect
2023-07-11 20:06:08.530 1617 ERROR nova     self.drain_events(timeout=self.connect_timeout)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 523, in drain_events
2023-07-11 20:06:08.530 1617 ERROR nova     while not self.blocking_read(timeout):
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 529, in blocking_read
2023-07-11 20:06:08.530 1617 ERROR nova     return self.on_inbound_frame(frame)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/amqp/method_framing.py", line 53, in on_frame
2023-07-11 20:06:08.530 1617 ERROR nova     callback(channel, method_sig, buf, None)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 536, in on_inbound_method
2023-07-11 20:06:08.530 1617 ERROR nova     method_sig, payload, content,
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/amqp/abstract_channel.py", line 143, in dispatch_method
2023-07-11 20:06:08.530 1617 ERROR nova     listener(*args)
2023-07-11 20:06:08.530 1617 ERROR nova   File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 666, in _on_close
2023-07-11 20:06:08.530 1617 ERROR nova     (class_id, method_id), ConnectionError)
2023-07-11 20:06:08.530 1617 ERROR nova amqp.exceptions.AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
2023-07-11 20:06:08.530 1617 ERROR nova 
  1. 检查 rabbitmq 集群状态:
root@rabbitmq-0:/# rabbitmqctl cluster_status
Cluster status of node rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local ...
Basics

Cluster name: rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local

Disk Nodes

rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local
rabbit@rabbitmq-1.rabbitmq-discovery.openstack.svc.cluster.local
rabbit@rabbitmq-2.rabbitmq-discovery.openstack.svc.cluster.local

Running Nodes

rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local
rabbit@rabbitmq-1.rabbitmq-discovery.openstack.svc.cluster.local
rabbit@rabbitmq-2.rabbitmq-discovery.openstack.svc.cluster.local

Versions

rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local: RabbitMQ 3.8.0 on Erlang 22.1.5
rabbit@rabbitmq-1.rabbitmq-discovery.openstack.svc.cluster.local: RabbitMQ 3.8.0 on Erlang 22.1.5
rabbit@rabbitmq-2.rabbitmq-discovery.openstack.svc.cluster.local: RabbitMQ 3.8.0 on Erlang 22.1.5

Alarms

(none)

Network Partitions

(none)

Listeners

Node: rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@rabbitmq-0.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@rabbitmq-1.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@rabbitmq-1.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@rabbitmq-1.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 15672, protocol: http, purpose: HTTP API
Node: rabbit@rabbitmq-2.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@rabbitmq-2.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Node: rabbit@rabbitmq-2.rabbitmq-discovery.openstack.svc.cluster.local, interface: [::], port: 15672, protocol: http, purpose: HTTP API

Feature flags

Flag: drop_unroutable_metric, state: enabled
Flag: empty_basic_get_metric, state: enabled
Flag: implicit_default_bindings, state: enabled
Flag: quorum_queue, state: enabled
Flag: virtual_host_metadata, state: enabled

集群状态是好的

  1. 检查用户
root@rabbitmq-0:/# rabbitmqctl list_users
Listing users ...

root@rabbitmq-0:/#

缺少用户

  1. 新增用户,通过其它环境查看用户名,并增加用户,密码可以在当前环境 nova 的配置文件中获取:
    示例:
[root@node-1 ~]# kubectl get cm nova-etc -n openstack -o yaml | grep transport_url
    transport_url = rabbit://rabbitmq:yHkxhtkD@rabbitmq.openstack.svc.cluster.local:5672/

rabbitmq是用户名;yHkxhtkD是密码。

root@rabbitmq-0:/# rabbitmqctl add_user rabbitmq
Adding user "rabbitmq" ...
Password: yHkxhtkD
root@rabbitmq-0:/# 
  1. 之后再次检查问题 pod,发现 rabbitmq 用户权限问题,解决方法如下:
    新增 vhost
root@rabbitmq-0:/# rabbitmqctl add_vhost /
Adding vhost "/" ...

设置权限

root@rabbitmq-0:/# rabbitmqctl set_permissions rabbitmq ".*" ".*" ".*"
Setting permissions for user "rabbitmq" in vhost "/" ...
root@rabbitmq-0:/#

设置 rabbitmq 用户 administrator tag

root@rabbitmq-0:/# rabbitmqctl set_user_tags rabbitmq administrator
Setting tags for user "rabbitmq" to [administrator] ...
root@rabbitmq-0:/#

再次检查问题 pod,可以正常连接 rabbitmq,并启动成功。文章来源地址https://www.toymoban.com/news/detail-570201.html

到了这里,关于nova/cinder等组件报连不上 rabbitmq的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • idea 链接mysql连不上

    打开文件 修改内容 搜索:jdk.tls.disabledAlgorithms 修改 链接地址 在链接后面添加 ?useSSL=false

    2024年02月09日
    浏览(36)
  • 关于mobax连不上虚拟机

    当时仅主机模式配置虚拟机,已经vi ifconfig-ens33设置了IP地址以及static之类的配置了,也ci /etc/resolv.conf修改了dns了,但就是连不上mobax,结果后来发现是因为我没有重启! 需要service network restart才能生效的嘛我去,唉心累

    2024年02月08日
    浏览(41)
  • 微软浏览器连不上网络

    针对微软浏览器连不上网络,但其他浏览器仍能连上网络 控制面板 - 网络和Internet - Internet 选项 - 连接 - 局域网设置 - 取消代理服务器

    2024年02月17日
    浏览(41)
  • vscode连不上虚拟机,一直密码错误

    最近在做毕设,但是vscode使用连接不上虚拟机,我以为是网络配置的问题,一顿查阅没找到原因。 后来查了一下ssh的日志,发现ssh有消息,但是也提示密码错误。 没找到密码配置格式什么的,经查看sshd配置文件发现,原来是只允许秘钥登录,把prohibit-password修改为yes即可

    2024年01月23日
    浏览(41)
  • springboot项目使用websocket一直连不上

    最近想给自己手里的springboot项目加上使用websocket的功能,于是查网上的教程发现引入下面的依赖。 引入后加上WebSocketConfig配置类文件就算是完成了,配置类内容如下: 然后写websocket的服务类,网上一大堆这里不啰嗦了。 然而遇到一个问题就是前端建立websocket连接死活连不上

    2024年02月11日
    浏览(36)
  • 【解决】websocket ws连不上或无法连接

    大致报错内容如图: WebSocket 连接失败的原因有很多,主要有以下几点: 服务器端没有正确配置 WebSocket,导致客户端无法连接。 网络问题,如网络不稳定,网络延迟等,导致客户端无法连接。 客户端代码有问题,导致无法正确连接服务器。 服务器端的防火墙设置不当,导致

    2024年02月12日
    浏览(46)
  • 台式电脑连不上wifi怎么办

    简介:有些网友想给自己的台式电脑连接无线wifi上网,但是发现自己的电脑上没有相应的无线上网设置,不知道台式电脑连不上wifi怎么办?下面小编就教下大家台式电脑无法连接wifi的原因和解决方法。 更多 一键重装系统 教程在这里 工具/原料 系统版本:windows7系统 品牌型号

    2024年02月09日
    浏览(51)
  • 家里的WiFi连不上?我们可以自行修复么?

    一般情况下,家里的WIFI连不上,首先确认路由器是否工作正常:检查路由器的电源灯是否开启,检查网络连接灯是否闪烁。 确认无线设备是否正常:检查无线设备(如手机)的WiFi功能是否开启,检查无线设备的WiFi信号强度是否正常,检查无线设备的连接是否锁定在正确的无

    2024年02月09日
    浏览(44)
  • ssh连接没问题,今天竟然连不上了

    之前虚拟机ssh连接没问题,今天竟然连不上了。 打开虚拟机 ip a 网卡ens33没有ip root@ubuntu:/home/ww# ip addr 1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/

    2024年02月08日
    浏览(48)
  • 电脑连不上5GWiFi解决办法:更新驱动

    首先我先按照电脑连不上5GWiFi怎么办,修改了首选频带,没用 查看自己电脑是否支持5G:WiFi处的网络和Internet设置 - 更改适配器选项 - WLAN - 右键 - 属性 - 配置 无线工作频带802.11a (5GHz) 802.11b (2.4GHz)802.11g (2.4GHz ) 802.11n (2.4/5GHz) 802.11ac (2.4/5GHz),有上述5GHz的就支持

    2024年02月11日
    浏览(100)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包