Problem description
OpenStack J Version Centos7 deployment
Restart service when not to come, the log is not error, to glance services as an example, as follows:
# systemctl start Openstack-glance-api.service openstack-glance-registry.serviceJob forOpenstack-glance-api.service failed. See' systemctl status Openstack-glance-api.service 'and' Journalctl-xn ' forDetails.# systemctl Status Openstack-glance-api.serviceOpenstack-glance-api.service-openstack Image Service (code-named Glance) API Server loaded:loaded (/usr/lib/systemd/s Ystem/openstack-glance-api.service; Enabled) active:failed (result:start-limit) since Sat -- -- One A: -: +EDT; +S ago Process:11841Execstart=/usr/bin/glance-api (code=exited, status=1/failure) Main PID:11841(Code=exited, status=1/failure) Jul One A: -: +node- thesystemd[1]: Failed to start OpenStack Image Service (code-named Glance) API server. Jul One A: -: +node- thesystemd[1]: Unit Openstack-glance-api.service entered failed state. Jul One A: -: +node- thesystemd[1]: Openstack-glance-api.service holdoff time over, scheduling restart. Jul One A: -: +node- thesystemd[1]: Stopping OpenStack Image Service (code-named Glance) API server ... Jul One A: -: +node- thesystemd[1]: Starting OpenStack Image Service (code-named Glance) API server ... Jul One A: -: +node- thesystemd[1]: Openstack-glance-api.service start request repeated too quickly, refusing to start. Jul One A: -: +node- thesystemd[1]: Failed to start OpenStack Image Service (code-named Glance) API server. Jul One A: -: +node- thesystemd[1]: Unit Openstack-glance-api.service entered failed state.
Error analysis
Before MARIADB does not come is similar error, but journalctl -xn
after input, will display configuration error, correction my.cnf
can but glance report this error how to solve? I haven't done anything yet, he said connected too fast, helpless under the thought of "Restart try, not on the points." Restart it, restart also useless, then remove the glance components, delete the database, delete Keystone link again, the result is still no eggs.
Similar to this service can not get the situation, according to personal experience to make the following summary
1. Configuration document error, revised configuration document, start again 2. Related folder/file permissions have problems, view permissions, modify permissions errors resolved
Because I am the root permission to operate, so the synchronization of the database is often used is glance-manage db_sync
not a problem, synchronization is successful, the problem can not find the cause of the crash, Google did not find. When I entered the su -s /bin/sh -c "glance-manage db_sync" glance
Fox tail finally revealed, synchronization error, error message:
Traceback (most recent): File"/usr/bin/glance-manage", lineTen,inch<module> Sys.exit (Main ()) File"/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line273,inchMain Log.setup (' glance ') File"/usr/lib/python2.7/site-packages/glance/openstack/common/log.py", line460,inchSetup _setup_logging_from_conf (product_name, version) File"/usr/lib/python2.7/site-packages/glance/openstack/common/log.py", line529,inch_setup_logging_from_conf FileLog = Logging.handlers.WatchedFileHandler (logpath) File"/usr/lib64/python2.7/logging/handlers.py", line392,inch__init__ logging. filehandler.__init__ (self, filename, mode, encoding, delay) File"/usr/lib64/python2.7/logging/__init__.py", line902,inch__init__ streamhandler.__init__ (Self, Self._open ()) File"/usr/lib64/python2.7/logging/__init__.py", line925,inch_open stream = open (Self.basefilename, Self.mode) IOError: [Errno -] Permission denied:'/var/log/glance/api.log '
api.log
Permissions have a problem, view
# ll /var/log/glance/api.log 1147831122:25 /var/log/glance/api.log
Sure enough, change it to glance Group glance, sync again, restart again, OK
# chown -R glance:glance /var/log/glance/api.log# su -s /bin/sh -c "glance-manage db_sync" glance# systemctl start openstack-glance-api.service
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Openstack-glance-api.service start request repeated too quickly, refusing to start