Openstack Kilo安装错误汇总

来新公司的差不多一周多的时间在Centos下安装openstack kilo,使用的文档是官方的2015年10月的英文文档,希望大家别把文档搞错了,我之前因为使用了老版本的中文文档,被坑到了。因为kilo的版本更新,很多命令已经逐渐被废弃了,所以建议使用最新版本。

错误1:

配置Apache HTTP server时,
systemctl start httpd.service报错如下:
Job for httpd.service failed. See ‘systemctl status httpd.service’ and ‘journalctl -xn’ for details.

执行systemctl -l status httpd.service,显示如下:
Dec 03 13:06:52 controller httpd[31108]: AH00526: Syntax error on line 5 of /etc/httpd/conf.d/wsgi-keystone.conf:
Dec 03 13:06:52 controller httpd[31108]: Invalid command ‘group=keystone’, perhaps misspelled or defined by a module not included in the server configuration
Dec 03 13:06:52 controller systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 03 13:06:52 controller kill[31110]: kill: cannot find process “”
Dec 03 13:06:52 controller systemd[1]: httpd.service: control process exited, code=exited status=1
Dec 03 13:06:52 controller systemd[1]: Failed to start The Apache HTTP Server.
Dec 03 13:06:52 controller systemd[1]: Unit httpd.service entered failed state.

然后编辑/etc/httpd/conf.d/wsgi-keystone.conf,发现’group=keystone’这一行是和前面的连在一起的,如果从官方文档直接复制的话,就会另起一行,注意有两处’group’都是这样。
改好以后重启,又报错如下:
Dec 03 13:46:00 controller httpd[31653]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:5000
Dec 03 13:46:00 controller httpd[31653]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:5000
Dec 03 13:46:00 controller httpd[31653]: no listening sockets available, shutting down
Dec 03 13:46:00 controller httpd[31653]: AH00015: Unable to open logs
Dec 03 13:46:00 controller systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
这是因为我之前按照中文的老版本文档已经安装了一次keystone,占用了这个地址,所以要将原来的停用,输入systemctl disable openstack-keystone再输入systemctl stop openstack-keystone,之后openstack-service status发现这个service已经active了,systemctl start httpd.service也OK了。

错误2:

这个错误超级宇宙无敌的坑死我了……啊啊啊啊!
主要问题就是输入openstack命令后,都报error
ERROR: openstack The request you have made requires authentication. (HTTP 401)
原因就是我上一个错误里面改ADMIN_TOKEN,但是却没有重启Apache,因为keystone是在Apache运行的,所以需要重启。
重启命令:systemctl restart httpd
然后就好了,害的我还重置了keystone数据库,耗了大半个下午,然后又得重新弄openstack了。命苦啊,但是一开始遇到的错误越多,以后就会越顺利的额!

错误3:

执行上传镜像的命令:

glance image-create --name "cirros-0.3.4-x86_64" --file /tmp/images/
cirros-0.3.4-x86_64-disk.img \
--disk-format qcow2 --container-format bare --visibility public --
Progress

出现了下面这个问题:
Invalid OpenStack Identity credentials.
然后,我就各种查网上,大多数人说是glance配置问题,然而我查了两三遍也没找到错误,抱着准备再次求救大神的准备,我重启了一下glance-api,执行了以下命令:

systemctl restart  openstack-glance-api
source admin-openrc.sh

然后再上传就好了呢!!!
[root@controller wn]# glance image-create --name "cirros-0.3.4-x86_64" --file /tmp/images/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress
[=============================>] 100%
+——————+————————————–+
| Property | Value |
+——————+————————————–+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2015-12-04T05:19:51Z |
| disk_format | qcow2 |
| id | 4c68a077-dbf8-460b-8a51-d142d32b2dfc |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.4-x86_64 |
| owner | 4bbba9b45a054efaa91c18edf8136fe0 |
| protected | False |
| size | 13287936 |
| status | active |
| tags | [] |
| updated_at | 2015-12-04T05:19:52Z |
| virtual_size | None |
| visibility | public |

错误4:

启动计算节点的时候,发生错误
命令:

systemctl enable openstack-nova-api.service openstack-nova-cert.service\
openstack-nova-consoleauth.service openstack-nova-scheduler.service \
openstack-nova-conductor.service openstack-nova-novncproxy.service

错误:Failed to issue method call: No such file or directory
原因是,这里面service太多,复制粘贴格式有点问题,
如果systemctl enable openstack-nova-api.service openstack-nova-cert.service就没有问题。
因此,师傅建议我手敲代码,-> ->!

错误5:

systemctl start openstack-nova-compute.service输入后无响应
/var/log/nova/nova-compute.log输出日志报错是这样的:
ERROR oslo_messaging._drivers.impl_rabbit [req-3525190d-3afc-4f8d-9c5b-81392e4b4e3d - - - - -] AMQP server controller:5672 closed the connection. Check login credentials: Socket closed

原因:执行rabbitmqctl list_users,发现我的rabbitmq没有添加openstack用户,但是配置文件中用的这个用户,因此要使用以下命令添加用户rabbitmqctl add_user openstack RABBIT_PASS,设置权限rabbitmqctl set_permissions openstack ".*" ".*" ".*",之后重启openstack-service restart,然后就能启动nova compute了!!!

附:警告1
输入nova endpoints后发现会出现各种warning
WARNING: nova has no endpoint in ! Available endpoints for this service:
然后网上找了说,此警告不影响安装,可以忽略

错误6:

在添加网络组建的时候,在安装配置计算结点的验证部分,输入neutron agent-list时,报错如下:
Unable to establish connection to http://controller:9696/v2.0/agents.json
原因是我按照步骤注释了/etc/neutron/neutron.conf中的mysql的connection,因为我的安装是all-in-one,所有结点都装在一个电脑上,所以不能关闭数据库,因此取消注释,然后重启neutron,执行openstack-service restart neutron,然后就好了。

错误7:

安装了cinder volume后,在dashboard中无法基于创建新卷来创建vm
查看日志报错是
ERROR oslo_messaging.rpc.dispatcher [req-c37f8814-3655-43a2-86a2-8cd456a6c15b b316af41f3544050a0955a8b6c138562 4bbba9b45a054efaa91c18edf8136fe0 - - -] Exception during message handling: [Errno 13] Permission denied: ‘/var/lock/cinder’
解决方法是在cinder.conf中把所有的lock_path的配置注释掉,就好了。因为我之前创建了几个错误的vm,而lock_path是用来防止高并发的,所以要注释掉才能解锁释放。

安装完毕!

云计算小白,安装这个真的有点累,一开始出错了都不知道在哪边看log,现在总算能自己看看log了,以上列出来的是比较棘手的问题。后面我还会po出后台命令训练遇到的一些问题。

你可能感兴趣的:(Openstack云计算)