ansible - rabbitmq :在预检查阶段检查每个 rabbit 主机名是否唯一地解析为正确的 IP 地址
问题描述
我正在尝试按照此链接在运行 CentOS 8.3.2011 的虚拟机上部署 OpenStack ,但在运行命令时我在预检查阶段遇到错误:
kolla-ansible -i ./all-in-one prechecks
错误消息是:
TASK [rabbitmq : Check if each rabbit hostname resolves uniquely to the proper IP address] *****************************failed: [localhost] (item=[{'cmd': ['getent', 'ahostsv4', 'localhost'], 'stdout': '127.0.0.1 STREAM localhost\n127.0.0.1 DGRAM \n127.0.0.1 RAW \n127.0.0.1 STREAM \n127.0.0.1 DGRAM \n127.0.0.1 RAW \n192.168.56.103 STREAM \n192.168.56.103 DGRAM \n192.168.56.103 RAW ', 'stderr': '', 'rc': 0, 'start': '2021-05-28 07:48:12.453408', 'end': '2021-05-28 07:48:12.455955', 'delta': '0:00:00.002547', 'changed': False, 'invocation': {'module_args': {'_raw_params': 'getent ahostsv4 localhost', 'warn': True, '_uses_shell': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stderr_lines': [], 'failed': False, 'item': 'localhost', 'ansible_loop_var': 'item'}, '127.0.0.1 STREAM localhost']) => {"ansible_loop_var": "item", "changed": false, "item": [{"ansible_loop_var": "item", "changed": false, "cmd": ["getent", "ahostsv4", "localhost"], "delta": "0:00:00.002547", "end": "2021-05-28 07:48:12.455955", "failed": false, "invocation": {"module_args": {"_raw_params": "getent ahostsv4 localhost", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": true}}, "item": "localhost", "rc": 0, "start": "2021-05-28 07:48:12.453408", "stderr": "", "stderr_lines": [], "stdout": "127.0.0.1 STREAM localhost\n127.0.0.1 DGRAM \n127.0.0.1 RAW \n127.0.0.1 STREAM \n127.0.0.1 DGRAM \n127.0.0.1 RAW \n192.168.56.103 STREAM \n192.168.56.103 DGRAM \n192.168.56.103 RAW "}, "127.0.0.1 STREAM localhost"], "msg": "Hostname has to resolve uniquely to the IP address of api_interface"}
我怎样才能解决这个问题?
解决方案
编辑/etc/hosts
文件。注释掉上面的两行,并根据你的 ip 输入 localhost
[root@localhost ~]# cat /etc/hosts
#127.0.0.1 localhost
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.122.73 localhost
[root@localhost ~]#
推荐阅读
- c# - 运行json代码时出错不会转换
- node.js - 如何使用 sendgrid 检查节点 js 中是否存在电子邮件
- sql - How to union a data set with a specific rule
- c++ - 结束迭代器在非连续 C++ 容器中指向哪里?
- rust - 在谓词失败后,在迭代器中获取一个额外元素的规范方法是什么?
- codenameone - 标签内的视频
- mysql - 如何对某类商品进行打折?
- javascript - Amplify 使“加载资源失败:服务器响应状态为 400”错误
- c# - EF Core 5 - 为每个标识列添加 Alter ColumnStatements 的新迁移
- python - 在 Python OpenCV 中访问 IP 摄像机 Teledye