OpenStack报错解决文档
目录一、KeyStone服务
二、Placement服务
三、Nova摆设完毕后启动系统
四、查抄单元和放置API是否乐成工作发现未找到主机名
五、Placement列出可用的资源类和特征报错
六、进入dashboard表现无法加载实例
七、dashboard controller拒绝了我们的毗连哀求
记录一些本身搭建OpenStack时遇到的报错以及解决方法。
Linux 版本OpenStack版本CentOS7Train 一、KeyStone服务
遇到安装KeyStone组件报错
# yum -y install openstack-keystone httpd mod_wsgi
Error: Package: python2-qpid-proton-0.22.0-1.el7.x86_64 (centos-openstack-queens)
Requires: qpid-proton-c(x86-64) = 0.22.0-1.el7
Available: qpid-proton-c-0.14.0-2.el7.x86_64 (extras)
qpid-proton-c(x86-64) = 0.14.0-2.el7
Available: qpid-proton-c-0.17.0-4.el7.x86_64 (centos-openstack-queens)
qpid-proton-c(x86-64) = 0.17.0-4.el7
Available: qpid-proton-c-0.22.0-1.el7.x86_64 (centos-openstack-queens)
qpid-proton-c(x86-64) = 0.22.0-1.el7
Installing: qpid-proton-c-0.37.0-1.el7.x86_64 (epel)
qpid-proton-c(x86-64) = 0.37.0-1.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
解决方案:
# yum install -y python2-qpid-proton-0.22.0-1.el7.x86_64 二、Placement服务
安装OpenStack-placement-api时遇到没有这个软件包
解决方法:
在阿里云官网上进入CentOS源地址:
centos-7-cloud-x86_64安装包下载_开源镜像站-阿里云 (aliyun.com)
重新配置一个yum源
# yum install openstack-placement-api
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
No package openstack-placement-api available.
Error: Nothing to do # vim /etc/yum.repos.d/openstack.repo
name=openstack-train
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-train/
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
gpgcheck=1
# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: openstack-train
Cleaning up list of fastest mirrors
Other repos take up 186 M of disk space (use --verbose for details)
# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
openstack-train | 3.0 kB00:00:00
openstack-train/primary_db | 1.2 MB00:00:05
repo id repo name status
openstack-train openstack-train 3,168
repolist: 3,168
三、Nova摆设完毕后启动系统
net_mlx5: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)
PMD: net_mlx4: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
PMD: net_mlx4: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx4)
net_mlx5: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)
PMD: net_mlx4: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
PMD: net_mlx4: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx4)
# 解决方法:
实验 yum install -y libibverbs
# yum install -y libibverbs 四、查抄单元和放置API是否乐成工作发现未找到主机名
# nova-status upgrade check
+------------------------------------------------------------------+
| Upgrade Check Results |
+------------------------------------------------------------------+
| Check: Cells v2 |
| Result: Failure |
| Details: No host mappings found but there are compute nodes. Run |
| command 'nova-manage cell_v2 simple_cell_setup' and then |
| retry. |
+------------------------------------------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+------------------------------------------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success |
| Details: None |
+------------------------------------------------------------------+
| Check: Cinder API |
| Result: Success |
| Details: None |
+------------------------------------------------------------------+
解决方案:
这种多半是因为盘算节点服务没有启动而导致的,查抄盘算节点nova组件服务是否正常后,在控制节点实验 nova-manage cell_v2 simple_cell_setup 命令即可规复
# nova-manage cell_v2 simple_cell_setup
Cell0 is already setup
# nova-status upgrade check
+--------------------------------+
| Upgrade Check Results |
+--------------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Cinder API |
| Result: Success |
| Details: None |
+--------------------------------+
五、Placement列出可用的资源类和特征报错
# openstack --os-placement-api-version 1.2 resource class list --sort-column name
Expecting value: line 1 column 1 (char 0)
解决方案:
①.给Apache授权(修改配置文件)
②.重启httpd服务
# vim /etc/httpd/conf.d/00-placement-api.conf
Listen 8778
<VirtualHost *:8778>
WSGIProcessGroup placement-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess placement-api processes=3 threads=1 user=placement group=placement
WSGIScriptAlias / /usr/bin/placement-api
<IfVersion >= 2.4>
ErrorLogFormat "%M"
</IfVersion>
ErrorLog /var/log/placement/placement-api.log
#SSLEngine On
#SSLCertificateFile ...
#SSLCertificateKeyFile ...
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
Alias /placement-api /usr/bin/placement-api
<Location /placement-api>
SetHandler wsgi-script
Options +ExecCGI
WSGIProcessGroup placement-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>
# systemctl restart httpd.service 再次尝试:
# openstack --os-placement-api-version 1.2 resource class list --sort-column name
+----------------------------+
| name |
+----------------------------+
| DISK_GB |
| FPGA |
| IPV4_ADDRESS |
| MEMORY_MB |
| MEM_ENCRYPTION_CONTEXT |
| NET_BW_EGR_KILOBIT_PER_SEC |
| NET_BW_IGR_KILOBIT_PER_SEC |
| NUMA_CORE |
| NUMA_MEMORY_MB |
| NUMA_SOCKET |
| NUMA_THREAD |
| PCI_DEVICE |
| PCPU |
| PGPU |
| SRIOV_NET_VF |
| VCPU |
| VGPU |
| VGPU_DISPLAY_HEAD |
+----------------------------+
# openstack --os-placement-api-version 1.6 trait list --sort-column name
+---------------------------------------+
| name |
+---------------------------------------+
| COMPUTE_DEVICE_TAGGING |
| COMPUTE_GRAPHICS_MODEL_CIRRUS |
| COMPUTE_GRAPHICS_MODEL_GOP |
| COMPUTE_GRAPHICS_MODEL_NONE |
| COMPUTE_GRAPHICS_MODEL_QXL |
| COMPUTE_GRAPHICS_MODEL_VGA |
| COMPUTE_GRAPHICS_MODEL_VIRTIO |
| COMPUTE_GRAPHICS_MODEL_VMVGA |
| COMPUTE_GRAPHICS_MODEL_XEN |
| COMPUTE_IMAGE_TYPE_AKI |
| COMPUTE_IMAGE_TYPE_AMI |
| COMPUTE_IMAGE_TYPE_ARI |
... ...
六、进入dashboard表现无法加载实例
1.解决方案:
①.进入MySQL:手动设定最大毗连次数,最大毗连次数设置为500
②.我们可以看到默认的最大毗连次数是214,我们手动修改到500
mysql -u root -p
MariaDB [(none)]> show global variables like '%max_conn%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| extra_max_connections | 1 |
| max_connect_errors | 100 |
| max_connections | 214 |
+-----------------------+-------+
3 rows in set (0.01 sec)
MariaDB [(none)]> set global max_connections=500
MariaDB [(none)]> show global variables like '%max_conn%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| extra_max_connections | 1 |
| max_connect_errors | 100 |
| max_connections | 594 |
+-----------------------+-------+
3 rows in set (0.002 sec)
2.解决方法(二):
①.手动修改配置文件,设置最大毗连数
# vim /usr/lib/systemd/system/mariadb.service
Type=notify
User=mysql
Group=mysql
LimitNOFILE=10000 ==>添加上
LimitNPROC=10000 ==>添加上
# systemctl --system daemon-reload
# systemctl restart mariadb.service
# mysql -u root -p
MariaDB [(none)]> show global variables like '%max_conn%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| extra_max_connections | 1 |
| max_connect_errors | 100 |
| max_connections | 4096|
+-----------------------+-------+
3 rows in set (0.012 sec)
七、dashboard controller拒绝了我们的毗连哀求
https://img-blog.csdnimg.cn/675d2ed886f14d10be05913ab70244d3.png
1.解决方案:
①.在C:\Windows\System32\drivers\etc\目录下,修改hosts文件
②.添加上"控制节点IP地址 和控制节点的主机名",作为主机名和IP地址之间的映射文件
https://img-blog.csdnimg.cn/26fdd1f1d4434fda81b3ddd437e7debd.png
这个时候我们就发现可以从dashboard访问实例控制台
https://img-blog.csdnimg.cn/ee959c002dfb459eb72b7874d1563b75.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]