Ask Your Question

Cloudkitty DB permission error on Mitaka

asked 2016-08-25 22:03:09 -0500

KotoriChannn gravatar image

updated 2016-08-29 01:50:27 -0500


I am trying to install Cloudkitty on OpenStack Mitaka. and got the db permission error. I will show my whole step that i did. Help me to solve the problem.

git clone git://
cd cloudkitty
python install

mkdir /etc/cloudkitty

I git cloned cloudkitty from github like this.

verbose = True
log_dir = /var/log/cloudkitty

rabbit_userid = guest
rabbit_password = guest
rabbit_hosts = controller:5672

username = cloudkitty
password = cloudkitty
tenant = services
region = RegionOne
url = http://controller:5000/v2.0

username = cloudkitty
password = cloudkitty
project_name = services
region = RegionOne
auth_url = http://controller:5000/v2.0
auth_plugin = password

connection = mysql://cloudkitty:cloudkitty@controller/cloudkitty

username = admin
password = adminpass from keystonerc_admin
tenant = admin
region = RegionOne
url = http://controller:5000/v2.0

username = cloudkitty
password = cloudkitty 
tenant = services
region = RegionOne
url = http://controller:5000

This is my /etc/cloudkitty/cloudkitty.conf file.

mysql -uroot -p
 CREATE DATABASE cloudkitty;
 GRANT ALL PRIVILEGES ON cloudkitty.* TO 'cloudkitty'@'controller' IDENTIFIED BY 'cloudkitty';

and i made "cloudkitty" database like this.

   # cloudkitty-dbsync upgrade

than, i tried to dbsync.

  Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
CRITI [cloudkitty] OperationalError: (_mysql_exceptions.OperationalError) (1044, "Access denied for user 'cloudkitty'@'' to database 'cloudkitty'")
Traceback (most recent call last):
  File "/bin/cloudkitty-dbsync", line 10, in <module>
  File "/usr/lib/python2.7/site-packages/cloudkitty/cli/", line 143, in main
  File "/usr/lib/python2.7/site-packages/cloudkitty/cli/", line 94, in upgrade
  File "/usr/lib/python2.7/site-packages/cloudkitty/cli/", line 91, in _version_change
  File "/usr/lib/python2.7/site-packages/cloudkitty/db/sqlalchemy/", line 27, in upgrade
    return migration.upgrade(config, revision)
  File "/usr/lib/python2.7/site-packages/cloudkitty/common/db/alembic/", line 37, in upgrade
    return alembic.command.upgrade(config, version or 'head')
  File "/usr/lib/python2.7/site-packages/alembic/", line 174, in upgrade
  File "/usr/lib/python2.7/site-packages/alembic/script/", line 397, in run_env
    util.load_python_file(self.dir, '')
  File "/usr/lib/python2.7/site-packages/alembic/util/", line 81, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/site-packages/alembic/util/", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/site-packages/cloudkitty/db/sqlalchemy/alembic/", line 25, in <module>
    env.run_migrations_online(target_metadata, version_table)
  File "/usr/lib/python2.7/site-packages/cloudkitty/common/db/alembic/", line 37, in run_migrations_online
    engine = db.get_engine()
  File "/usr/lib/python2.7/site-packages/cloudkitty/db/", line 32, in get_engine
    facade = _create_facade_lazily()
  File "/usr/lib/python2.7/site-packages/cloudkitty/db/", line 27, in _create_facade_lazily
    _FACADE = session.EngineFacade.from_config(cfg.CONF, sqlite_fk=True)
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/", line 1056, in from_config
    expire_on_commit=expire_on_commit, _conf=conf)
  File "/usr/lib/python2 ...
edit retag flag offensive close merge delete



Not Sure if thats related, Could you please check this bug reported thread

You may need to add [authinfos] section. Let us know if that works for you.

sunnyarora gravatar imagesunnyarora ( 2016-08-25 22:44:41 -0500 )edit

I solved this DB permission error, i created DB manually, and it works.

KotoriChannn gravatar imageKotoriChannn ( 2016-08-26 02:09:53 -0500 )edit

Hi, Could you please reply in answer Section giveing the steps you did and Close this Query. -Thanks

sunnyarora gravatar imagesunnyarora ( 2016-08-26 05:54:37 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-08-29 01:45:38 -0500

KotoriChannn gravatar image

updated 2016-08-29 01:49:25 -0500


just create 'cloudkitty' DB manually on "mysql -uroot -p". (don't follow DB create command on installation guide.) and the permission will apply without any problems.

mysql -uroot -p


CREATE USER cloudkitty@localhost identified by 'cloudkitty';

GRANT ALL PRIVILEGES ON cloudkitty.* to cloudkitty@localhost identified by 'cloudkitty';



It was simple, but annoying error. Hope this reply can help you.

edit flag offensive delete link more


did the following command


work without errors with your setup?

generalkalbasa gravatar imagegeneralkalbasa ( 2016-08-29 11:17:49 -0500 )edit

What error did you get when you run cloudkitty-storage-init?

KotoriChannn gravatar imageKotoriChannn ( 2016-09-01 23:35:59 -0500 )edit

if your problem is ERROR cloudkitty Unauthorized: The request you have made requires authentication. (HTTP 401), add "cloudkitty" account , rating service and endpoints first on keystone. This will solve the HTTP 401 auth error.

KotoriChannn gravatar imageKotoriChannn ( 2016-09-02 00:13:44 -0500 )edit

thank you, will try that as soon as i get to my lab

generalkalbasa gravatar imagegeneralkalbasa ( 2016-09-03 07:39:36 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2016-08-25 22:03:09 -0500

Seen: 314 times

Last updated: Aug 29 '16