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>
-->