报错
[root@compute ~]# systemctl start libvirtd.service openstack-nova-compute.service
Job for openstack-nova-compute.service failed because the control process exited with error code. See "systemctl status openstack-nova-compute.service" and "journalctl -xe" for details.● openstack-nova-compute.service - OpenStack Nova Compute Server
Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2022-03-02 20:22:30 PST; 1min 48s ago
Process: 1897 ExecStart=/usr/bin/nova-compute (code=exited, status=1/FAILURE)
Main PID: 1897 (code=exited, status=1/FAILURE)Mar 02 20:22:30 compute systemd[1]: openstack-nova-compute.service: main process exited, code=exited, status=1/FAILURE
Mar 02 20:22:30 compute systemd[1]: Failed to start OpenStack Nova Compute Server.
Mar 02 20:22:30 compute systemd[1]: Unit openstack-nova-compute.service entered failed state.
Mar 02 20:22:30 compute systemd[1]: openstack-nova-compute.service failed.
Mar 02 20:22:30 compute systemd[1]: openstack-nova-compute.service holdoff time over, scheduling restart.
Mar 02 20:22:30 compute systemd[1]: Stopped OpenStack Nova Compute Server.
Mar 02 20:22:30 compute systemd[1]: start request repeated too quickly for openstack-nova-compute.service
Mar 02 20:22:30 compute systemd[1]: Failed to start OpenStack Nova Compute Server.
Mar 02 20:22:30 compute systemd[1]: Unit openstack-nova-compute.service entered failed state.
Mar 02 20:22:30 compute systemd[1]: openstack-nova-compute.service failed.
(1)按照网上说的 ,找控制节点rabbitmq日志/var/log/rabbitmq/下的日志,没有发现有error
(2)进入计算节点的/var/log/nova/目录,没有日志文件
(3)进入控制节点的/var/log/nova/目录,查看所有的nova日志,没有异常
(4)查看5672端口,处于被监控状态
(5)增加了rabbit的访问配置
这些还是不行,我想是不是openstack服务安装。在计算节点控制台敲入openstack命令,报错了。
[root@compute ~]# openstack
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.10.2) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
Traceback (most recent call last):
File "/usr/bin/openstack", line 6, in <module>
from openstackclient.shell import main
File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 22, in <module>
from osc_lib.api import auth
File "/usr/lib/python2.7/site-packages/osc_lib/api/auth.py", line 19, in <module>
from keystoneauth1.loading import base
File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/__init__.py", line 13, in <module>
from keystoneauth1.loading import adapter
File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/adapter.py", line 13, in <module>
from keystoneauth1 import adapter
File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 16, in <module>
from keystoneauth1 import session
File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 25, in <module>
import requests
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 94, in <module>
from urllib3.exceptions import DependencyWarning
ImportError: cannot import name DependencyWarning
这个错误我熟啊,就是python的包冲突了。
使用以下方式解决了。
[root@compute ~]# wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
--2022-03-02 20:27:18-- https://bootstrap.pypa.io/pip/2.7/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.0.175, 151.101.64.175, 151.101.128.175, ...
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.0.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1908226 (1.8M) [text/x-python]
Saving to: ‘get-pip.py’100%[=============================================================================================================>] 1,908,226 376KB/s in 16s
2022-03-02 20:27:56 (117 KB/s) - ‘get-pip.py’ saved [1908226/1908226]
You have new mail in /var/spool/mail/root
[root@compute ~]# python get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting pip<21.0
Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 21 kB/s
Collecting wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, wheel
Successfully installed pip-20.3.4 wheel-0.37.1
[root@compute ~]# pip uninstall urllib3 -y
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Found existing installation: urllib3 1.10.2
Uninstalling urllib3-1.10.2:
Successfully uninstalled urllib3-1.10.2
[root@compute ~]# pip uninstall chardet -y
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Found existing installation: chardet 3.0.4
Uninstalling chardet-3.0.4:
Successfully uninstalled chardet-3.0.4
[root@compute ~]# pip install requests
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (2.19.1)
Collecting chardet<3.1.0,>=3.0.2
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 199 kB/s
Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python2.7/site-packages (from requests) (2.5)
Collecting urllib3<1.24,>=1.21.1
Downloading urllib3-1.23-py2.py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 81 kB/s
Installing collected packages: chardet, urllib3
ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
oslo-vmware 2.31.0 requires PyYAML>=3.12, but you'll have pyyaml 3.10 which is incompatible.
os-brick 2.5.10 requires eventlet!=0.18.3,!=0.20.1,>=0.18.2, but you'll have eventlet 0.20.1 which is incompatible.
Successfully installed chardet-3.0.4 urllib3-1.23文章来源:https://www.toymoban.com/news/detail-437476.html
然后再启动服务就成功了。文章来源地址https://www.toymoban.com/news/detail-437476.html
[root@compute ~]# openstack
(openstack) exit
[root@compute ~]# systemctl start libvirtd.service openstack-nova-compute.service
[root@compute ~]#
到了这里,关于计算节点systemctl status openstack-nova-compute.service起不来的解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!