发表于 2018-6-1 09:23:43

openstack 错误集锦

  在创建用户时报
  #openstack user create --password-prompt neutron
  User Password:
  Repeat User Password:
  The request you have made requires authentication. (HTTP 401) (Request-ID: req-6750cf88-b2b0-4f07-89fa-
  解决方法
  把admin-token中的admin-token环境变量去掉
  # echo $OS_TOKEN
  d55a8891f4adb5796f32
  # unset OS_TOKEN
  # echo $OS_TOKEN
  # openstack user create --password-prompt neutron
  User Password:
  Repeat User Password:
  +-----------+----------------------------------+
  | Field   | Value                            |
  +-----------+----------------------------------+
  | domain_id | default                        |
  | enabled   | True                           |
  | id      | 8004b1a254674184a47000058b28cb8c |
  | name      | neutron                        |
  +-----------+----------------------------------+
  若有token时可以删除和查看用户但是不能创建用户。原因待查询
  问题二
  若在创建虚拟机时在控制节点上出现schduler.log
  AggregateRamFilter returned 0 hosts
  返回值为0说明内存不够。加内存即可
  问题三
  创建云硬盘和云主机失败。已经做完ceph和opstack对接
  查看cinder 的错误
2016-10-13 17:53:28.978 1618 WARNING cinder.context [-] Arguments dropped when creating context: {u'user': None, u'tenant': None, u'user_identity': u'- - - - -'}
2016-10-13 17:53:29.371 1618 WARNING cinder.context [-] Arguments dropped when creating context: {u'user': None, u'tenant': None, u'user_identity': u'- - - - -'}
2016-10-13 17:53:42.034 1618 WARNING cinder.context [-] Arguments dropped when creating context: {u'user': u'cfb18f549d654be69cc4ba0ff146df89', u'tenant': u'6addc301cb9245c39a8c226ec303eeb1', u'user_identity': u'cfb18f549d654be69cc4ba0ff146df89 6addc301cb9245c39a8c226ec303eeb1 - - -'}
2016-10-13 17:53:42.042 1618 WARNING cinder.scheduler.filters.capacity_filter Insufficient free space for volume provision allocated 10093 GB, allow provisioned 8331.0 GB
2016-10-13 17:53:42.049 1618 ERROR cinder.scheduler.flows.create_volume Failed to schedule_create_volume: No valid host was found.
2016-10-13 17:53:42.906 1618 WARNING cinder.context [-] Arguments dropped when creating context: {u'user': None, u'tenant': None, u'user_identity': u'- - - - -'}  问题分析貌似是ceph存储满了。查看ceph存储空间

# ceph df
GLOBAL:
    SIZE       AVAIL      RAW USED   %RAW USED
    16748G   16601G         146G          0.87
POOLS:
    NAME            ID   USED       %USED   MAX AVAIL   OBJECTS
    data            0         0         0         8295G         0
    metadata      1         0         0         8295G         0
    rbd             2         0         0         8295G         0
    images          3      28535M      0.17         8295G      3587
    volumes         4      37022M      0.22         8295G      9473
    volumes_ssd   5         0         0         8295G         0
    compute         6         0         0         8295G         0  查看副本数
#ceph osd pool get rbd size
size: 2  经过计算ceph可用量为8300G左右。实际使用了70G.
  到控制台处查看所有云硬盘的使用量查看已经分出去了多余8000G的容量导致创建云硬盘失败。
  问题四
  情景客户在创建4c 16G规格的虚拟机时报错创建两个2C8G规格的云主机并无报错。查看log
vim /var/log/nova/scheduler.log
2016-11-05 01:30:28.286 6368 INFO nova.scheduler.filter_scheduler Attempting to build 1 instance(s) uuids:
2016-11-05 01:30:28.427 6368 INFO nova.filters Filter AggregateRamFilter returned 0 hosts
2016-11-05 01:30:28.428 6368 WARNING nova.scheduler.driver Setting instance to ERROR state.  于是看出计算节点的资源原来是有的计算节点cpu充足内存不够有的内存不够cpu却充足。所以现在可以创建两个2C 8G的云主机却不能创建1台4C16G的云主机。
  问题四创建虚拟机失败libvirtd的问题
  打开nova的debug。看到一个错误
                                                                              此时以为是cpu不支持虚拟化后来看到宿主机是物理机然后放弃了这一想法。看下libvirtd服务的状态
systemctl status -l libvirtd.service
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2016-09-20 19:28:16 CST; 1 day 20h ago
   Docs: man:libvirtd(8)
         http://libvirt.org
Main PID: 8360 (libvirtd)
   CGroup: /system.slice/libvirtd.service
         └─8360 /usr/sbin/libvirtd --listen
Sep 22 13:51:07 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 13:55:45 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 14:05:59 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 14:07:57 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 14:23:45 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 14:41:55 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 14:56:29 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 15:17:18 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 15:19:11 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 15:32:50 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed out
Sep 22 15:51:57 zp2cp010 libvirtd: internal error: Cannot probe for supported suspend types
Sep 22 15:51:57 zp2cp010 libvirtd: Failed to get host power management capabilities
Sep 22 15:52:22 zp2cp010 libvirtd: error from service: GetMachineByPID: Activation of org.freedesktop.machine1 timed out
Sep 22 15:52:27 zp2cp010 libvirtd: End of file while reading data: Input/output error
Sep 22 15:52:47 zp2cp010 libvirtd: error from service: GetMachineByPID: Activation of org.freedesktop.machine1 timed out
Sep 22 15:52:47 zp2cp010 libvirtd: error from service: GetMachineByPID: Activation of org.freedesktop.machine1 timed out
Sep 22 15:52:47 zp2cp010 libvirtd: error from service: GetMachineByPID: Activation of org.freedesktop.machine1 timed out
Sep 22 15:52:48 zp2cp010 libvirtd: internal error: Cannot probe for supported suspend types
Sep 22 15:52:48 zp2cp010 libvirtd: Failed to get host power management capabilities
Sep 22 15:53:54 zp2cp010 libvirtd: Activation of org.freedesktop.machine1 timed  发现是libvirt服务出问题了。于是想到了重启谁知道重启并没解决问题。于是google看下
  解决方法
systemctl restart dbus-org.freedesktop.machine1.service
systemctl restartlibvirtd.service  再看libvirt的状态
Hint: Some lines were ellipsized, use -l to show in full.
# systemctl status libvirtd.service
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2016-12-29 16:51:53 CST; 3s ago
   Docs: man:libvirtd(8)
         http://libvirt.org
Main PID: 1494879 (libvirtd)
   Memory: 17.1M
   CGroup: /system.slice/libvirtd.service
         ├─   3813 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libv...
         ├─   3814 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libv...
         └─1494879 /usr/sbin/libvirtd
Dec 29 16:51:53 node-1 systemd: Starting Virtualization daemon...
Dec 29 16:51:53 node-1 libvirtd: libvirt version: 1.2.17, package: 13.el7_2.4 (CentOS BuildSystem <http://bugs.cent...os.org)
Dec 29 16:51:53 node-1 libvirtd: Module /usr/lib64/libvirt/connection-driver/libvirt_driver_lxc.so not accessible
Dec 29 16:51:53 node-1 systemd: Started Virtualization daemon.
Dec 29 16:51:53 node-1 dnsmasq: read /etc/hosts - 2 addresses
Dec 29 16:51:53 node-1 dnsmasq: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses  问题解决!
  问题四
  由于网络原因创建不成功查看nova-computer的log
2017-03-20 11:23:52.283 52305 INFO nova.virt.libvirt.driver Creating image
2017-03-20 11:23:52.451 52305 ERROR nova.compute.manager Instance failed to spawn
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager Traceback (most recent call last):
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager    File &quot;/usr/lib/python2.6/site-packages/nova/compute/manager.py&quot;, line 1853, in _spawn
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager    File &quot;/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py&quot;, line 2464, in spawn
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager    File &quot;/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py&quot;, line 3865, in to_xml
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager    File &quot;/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py&quot;, line 3654, in get_guest_config
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager    File &quot;/usr/lib/python2.6/site-packages/nova/virt/libvirt/vif.py&quot;, line 384, in get_config
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager    _(&quot;Unexpected vif_type=%s&quot;) % vif_type)
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager NovaException: Unexpected vif_type=binding_failed
2017-03-20 11:23:52.451 52305 TRACE nova.compute.manager
2017-03-20 11:23:52.452 52305 WARNING nova.compute.resource_tracker 'list' object has no attribute 'get'
2017-03-20 11:23:52.528 52305 AUDIT nova.compute.manager Terminating instance
2017-03-20 11:23:53.071 52305 ERROR nova.virt.libvirt.driver [-] During wait destroy, instance disappeared.
2017-03-20 11:23:53.266 52305 ERROR nova.compute.manager Error: Unexpected vif_type=binding_failed  看到“Unexpected vif_type=binding_failed” 的错误一般是网络问题所以看了下neutron-linuxbridge-agent的状态发现服务没启动手动起下服务就好了
  至此问题解决
  问题五:
  在搭建openstack ha时 当图形化界面预览 image的资源时,下面是解决思路:

  1、使用glance 命令查看是否能获取到镜像
root@node-1 share]# glance image-list
+--------------------------------------+--------+
| ID                                 | Name   |
+--------------------------------------+--------+
| d7bfbd76-2796-48bc-a0e9-6925ac15254c | cirros |
+--------------------------------------+--------+  2、尝试nova是否能获取 image
  root@node-1 share]# nova image-list
  若不能获取则是在# vim /etc/glance/glance-api.conf
  registry_host = 192.168.11.63##此处填写 vip即 管理网的虚拟ip
  问题六:
  删除域
openstack domain set heat --disable
openstack domain delete heat  问题七:

  安装o版openstack,创建vm,在nova-conductor.log 出现这个错误
  No host-to-cell mapping found for selected host. Setup is incomplete.
  运行
  nova-manage cell_v2 discover_hosts
  解决!
  

  问题五:
  Oenstack N版本搭建ceilometer 时 使用 ceilometer--debug meter-list 时报404 错误,查看
/var/log/httpd/ceilometer_error.log报
Target WSGI script not found or unable to stat: /var/www/cgi-bin/ceilometer  使用以下方法解决
  
mkdir -p /var/www/cgi-bin/ceilometer
cp /usr/lib/python2.7/site-packages/ceilometer/api/app.wsgi /var/www/cgi-bin/ceilometer/app  参考链接:https://ask.openstack.org/en/question/98661/httpnotfound-http-404-error-when-run-ceilometer-meter-list/
  问题六:
  同步glance数据库时报错,并且没有同步成功
  
  root@controller ~]# su -s /bin/sh -c &quot;glance-manage db_sync&quot; glance
  Option &quot;verbose&quot; from group &quot;DEFAULT&quot; is deprecated for removal.Its value may be silently ignored in the future.
  /usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:1241: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacade
  expire_on_commit=expire_on_commit, _conf=conf)
  

  此时要看看下glance 数据库对应的授权用户glance的密码, 密码不支持特殊字符!!!
  问题七:
  Openstack   Ocata 版本在centos7.4 环境下,安装完后,打不开dashboard,因为是用ansible 安装的,所以,配置文件没有问题,奇怪的是 在centos7.2上没有此问题,下面看log
Cannot serve directory ar/wwwml/  google后,发现是个bug ,解决方法:
vim /etc/httpd/conf.d/openstack-dashboard.conf
添加
WSGIApplicationGroup %{GLOBAL}  参考链接:

  https://bugs.launchpad.net/horizon/+bug/1737092
  问题八
  当控制节点做了HA后, novnc会刷新三次匹配到一次,原因是:
  当我们通过dashboard通过novnc访问控制台的时候,获取到的token值是固定的,然后会轮询到3个controller节点进行token验证,而这3个controller节点上对同一个实例的token值是不同的;log如下
INFO nova.consoleauth.manager Checking Token: 57b251e6-852d-4869-bc0b-1c50aef57a25, False  N版的解决方法:


enabled = true
memcache_servers = 192.168.0.141:11211,192.168.0.142:11211,192.168.0.143:11211
backend = oslo_cache.memcache_pool  O版的解决方法:
memcache_servers = 10.10.48.111:11211,10.10.48.112:11211,10.10.48.113:11211
enabled = true
backend = oslo_cache.memcache_pool
expiration_time=600  注意, N版和O版的写法不一样分别是memcached_servers 和memcache_servers
  数据库做了Galera集群后,发现下面的log
Could not increase number of max_open_files to more than 1024 (request: 24107)  初步判段为文件的打开数太小了,于是在
vim /etc/security/limits.conf##添加下面 内容
* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
mysql soft nofile65535
mysql hard nofile 65535
###
vim/usr/lib/systemd/system/mariadb.service ## 为mysql指定文件打开数
LimitNOFILE=65535
LimitNPROC=65535  重启数据库即可。
  在多region环境下,在利用heat做资源编排时报找不到资源的错误。
  解决方法:
# grep egion_name_for_services /etc/heat/heat.conf
#region_name_for_services = <None>
把region_name_for_services = 改成对应的region
重启服务即可Openstack 技术交流群:580078423
希望大家入群多多交流
页: [1]
查看完整版本: openstack 错误集锦