openstack常见问题

1 ERROR: 'NoneType' object has no attribute 'rstrip'

使用nova list命令查看时出错:

root@cloud:~# nova list --all-tenants |grep ACTIVE |awk -F '|' '{print $5}' |awk -F '=' '{print$2}'
ERROR: 'NoneType' object has no attribute 'rstrip'
查看原因是设置:

export OS_AUTH_URL=http://cloud:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
修改成:

export OS_AUTH_URL="http://192.168.1.11:5000/v2.0/"
export OS_SERVICE_ENDPOINT="http://192.168.1.11:35357/v2.0"
export OS_SERVICE_TOKEN=123456

2 InternalServerError: An unexpected error prevented the server from fulfilling your request. 

root@openstack-ctl-k:~# nova service-list
ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-ddee1cae-380c-4fef-8b2d-109a79dc03a9)

Bad response code while validating token: 500

原因:

身份认证服务信息没给全,问题就出在配置环境变量的shell脚本上,少添加了

export OS_IDENTITY_API_VERSION=3

3 Too many connections

产生这种问题的原因是:

连接数超过了 MySQL 设置的值,与 max_connections 和 wait_timeout 都有关系。wait_timeout 的值越大,连接的空闲等待就越长,这样就会造成当前连接数越大。

解决思路:

修改MySQL配置文件/etc/my.cnf,设置成max_connections=1000,wait_timeout=5。如果没有此项设置可以自行添加,修改后重启MySQL服务即可。要不经常性报此错误,则要对服务器作整体性能优化

1临时解决方法 
由于我的mysql没有/etc/my.cnf文件,所以我就用临时方法解决一下 
1)查看连接数

mysql>  show variables like 'max_connections'; 
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+
1 row in set (0.01 sec)

2)设置连接数

mysql> set GLOBAL max_connections=1000; 
Query OK, 0 rows affected (0.00 sec)
--查看
mysql>  show variables like "max_connections";
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 1000  |
+-----------------+-------+
1 row in set (0.00 sec)

4 kvm从一台服务器复制到另一台启动时出错

root@ubuntu:/var/lib/libvirt/images# virsh start k8s_master
error: Failed to start domain k8s_master
error: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: invpcid, bmi2, avx2, bmi1, movbe, fma
这是由于CPU信息不兼容造成的,可以修改xml的配置文件,使其兼容:

  <cpu mode='custom' match='exact'>
    <model fallback='allow'>IvyBridge</model>
  </cpu>
<!--
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Haswell-noTSX</model>
  </cpu>
-->




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值