首页 > 代码库 > glance无法正常启动
glance无法正常启动
笔者日前部署openstack-ocata遇到一坑 glance服务无法正常启动
首先就是服务正常使用然后好好的,好好的 突然之间glance就不嫩用了!
查一下是服务没有启动,手动启动一下,发现提示服务重启次数太多,然后就自己挂了
● openstack-glance-api.service - OpenStack Image Service (code-named Glance) API server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-api.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Thu 2017-07-13 15:12:24 CST; 313ms ago Process: 81979 ExecStart=/usr/bin/glance-api (code=exited, status=1/FAILURE) Main PID: 81979 (code=exited, status=1/FAILURE) Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-api.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-api.service failed. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-api.service holdoff time over, scheduling restart. Jul 13 15:12:24 node01 systemd[1]: start request repeated too quickly for openstack-glance-api.service Jul 13 15:12:24 node01 systemd[1]: Failed to start OpenStack Image Service (code-named Glance) API server. Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-api.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-api.service failed. ● openstack-glance-registry.service - OpenStack Image Service (code-named Glance) Registry server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-registry.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Thu 2017-07-13 15:12:24 CST; 319ms ago Process: 81980 ExecStart=/usr/bin/glance-registry (code=exited, status=1/FAILURE) Main PID: 81980 (code=exited, status=1/FAILURE) Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-registry.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-registry.service failed. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-registry.service holdoff time over, scheduling restart. Jul 13 15:12:24 node01 systemd[1]: start request repeated too quickly for openstack-glance-registry.service Jul 13 15:12:24 node01 systemd[1]: Failed to start OpenStack Image Service (code-named Glance) Registry server. Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-registry.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-registry.service failed.
于是
#grep ‘fail‘ /lib/systemd/system/openstack-glance-api.service Restart=on-failure #sed -i ‘/fail/ s/^/#/g‘ /lib/systemd/system/openstack-glance-api.service #systemctl daemon-reload
再次重启服务,报错信息变成
● openstack-glance-api.service - OpenStack Image Service (code-named Glance) API server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-api.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2017-07-13 15:18:42 CST; 10s ago Process: 83673 ExecStart=/usr/bin/glance-api (code=exited, status=1/FAILURE) Main PID: 83673 (code=exited, status=1/FAILURE) Jul 13 15:18:41 node01 systemd[1]: Started OpenStack Image Service (code-named Glance) API server. Jul 13 15:18:41 node01 systemd[1]: Starting OpenStack Image Service (code-named Glance) API server... Jul 13 15:18:42 node01 glance-api[83673]: ERROR: Unable to locate paste config file for glance-api. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-api.service: main process exited, code=exited, status=1/FAILURE Jul 13 15:18:42 node01 systemd[1]: Unit openstack-glance-api.service entered failed state. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-api.service failed. ● openstack-glance-registry.service - OpenStack Image Service (code-named Glance) Registry server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-registry.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2017-07-13 15:18:42 CST; 10s ago Process: 83674 ExecStart=/usr/bin/glance-registry (code=exited, status=1/FAILURE) Main PID: 83674 (code=exited, status=1/FAILURE) Jul 13 15:18:41 node01 systemd[1]: Started OpenStack Image Service (code-named Glance) Registry server. Jul 13 15:18:41 node01 systemd[1]: Starting OpenStack Image Service (code-named Glance) Registry server... Jul 13 15:18:42 node01 glance-registry[83674]: ERROR: Unable to locate paste config file for glance-registry. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-registry.service: main process exited, code=exited, status=1/FAILURE Jul 13 15:18:42 node01 systemd[1]: Unit openstack-glance-registry.service entered failed state. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-registry.service failed.
发现无法找到paste文件,再次回头来看看glance-api.conf 发现这么一行
#If the paste configuration file is not found, the service will not start. # …………………… # (string value) #config_file = glance-api-paste.ini
那么找找这个文件呢
#rpm -ql openstack-glance|grep glance-api-paste.ini > /dev/null # echo $? 1
木有,煤油,麻油!!就是找不到了哦!难怪找不到
于是乎
ln -s/usr/share/glance/glance-api-dist-paste.ini /usr/share/glance/glance-api-paste.ini ln -s/usr/share/glance/glance-registry-dist-paste.ini /usr/share/glance/glance-registry-paste.ini
再次重启服务,一切正常了>>>>>
本文出自 “NB小菜鸟” 博客,请务必保留此出处http://309692348.blog.51cto.com/728319/1947228
glance无法正常启动
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。