glance-manage db_sync errror [closed]

asked 2014-12-01 17:32:45 -0600

LightMan gravatar image

updated 2014-12-01 21:04:13 -0600

dbaxps gravatar image

su -s /bin/sh -c "glance-manage db_sync" glance Password: su: Authentication failure

glance-manage db_sync

Traceback (most recent call last):
  File "/usr/bin/glance-manage", line 6, in <module>
    from glance.cmd.manage import main
  File "/usr/lib/python2.7/dist-packages/glance/cmd/", line 43, in <module>
    from glance.common import config
  File "/usr/lib/python2.7/dist-packages/glance/common/", line 34, in <module>
    help=_('Partial name of a pipeline in your paste configuration '
  File "/usr/lib/python2.7/dist-packages/glance/openstack/common/", line 132, in _lazy_gettext
    return Message(msg, domain=domain)
  File "/usr/lib/python2.7/dist-packages/glance/openstack/common/", line 168, in __new__
    msgtext = Message._translate_msgid(msgid, domain)
  File "/usr/lib/python2.7/dist-packages/glance/openstack/common/", line 207, in _translate_msgid
    system_locale = locale.getdefaultlocale()
  File "/usr/lib/python2.7/", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.7/", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: en_ZM

What can i do to resolve this?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by LightMan
close date 2014-12-05 20:27:21.821269

2 answers

Sort by ยป oldest newest most voted

answered 2014-12-01 21:15:50 -0600

dbaxps gravatar image

updated 2014-12-04 00:02:11 -0600

You may add to $HOME/.bashrc && relogin :

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

or just export for particular session
Please verify glance database connection string in /etc/glance/glance-api.conf

edit flag offensive delete link more


I remember doing something like this but gave me the same error.Let me try again

LightMan gravatar imageLightMan ( 2014-12-02 00:43:39 -0600 )edit

tried all the suggestions but not working?

LightMan gravatar imageLightMan ( 2014-12-03 18:31:39 -0600 )edit

when i run: su -s /bin/sh -c "glance-manage db_sync" glance output: CRITICAL glance [-] ValueError: invalid literal for int() with base 10: ''

How can i resolve this?

LightMan gravatar imageLightMan ( 2014-12-03 19:12:22 -0600 )edit

I made sure everything suggested here was done.It Worked.Thanks So Much

LightMan gravatar imageLightMan ( 2014-12-05 20:29:47 -0600 )edit

I wanted to mark this question Solved but i mistakenly closed it with a reason of it being a duplicate question.

LightMan gravatar imageLightMan ( 2014-12-06 00:58:20 -0600 )edit

answered 2014-12-02 03:21:34 -0600

updated 2014-12-02 03:24:12 -0600


you must have not provided grant privileges to the database at the time of creating glance database.


grant all privileges on glance.* to 'glance'@'localhost' identified by 'GLANCE DBPASS'

grant all privileges on glance.* to 'glance'@'%' identified by 'GLANCE DBPASS'

edit flag offensive delete link more


i did grant all privileges on glance.

LightMan gravatar imageLightMan ( 2014-12-05 02:52:28 -0600 )edit

your all other service must be up and running simultaneously..

just simply restart all the services.

PradeepNaik gravatar imagePradeepNaik ( 2014-12-05 02:54:31 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-12-01 17:32:45 -0600

Seen: 2,097 times

Last updated: Dec 04 '14