Ask Your Question
0

Ceilometer meter-list throws an 500 error

asked 2017-03-06 06:09:34 -0500

DarkKnight gravatar image

I ran out of disk space, thanks to resource hungry mongodb. To clear the space, i deleted all the contents under the data directory of mongodb "/var/lib/mongodb" in my case.

Now, after restarting the ceilometer services, all my ceilometer CLI commands are giving a 500 error.

Upon checking the logs, here is what i found.

2017-03-06 17:22:37.600 31112 DEBUG ceilometer.storage [-] looking for 'mongodb' driver in 'ceilometer.metering.storage' get_connection /usr/lib/python2.7/site-pac
kages/ceilometer/storage/__init__.py:99
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks [-] Failed to connect to db, purpose metering retry later: command SON([('authenticate', 1), ('user', u'ce
ilometer'), ('nonce', u'3d7e46ae1fc574d2'), ('key', u'39d8c9a497a313e5a8801bea33785ef8')]) on namespace ceilometer.$cmd failed: auth failed
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks Traceback (most recent call last):
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/ceilometer/api/hooks.py", line 62, in get_connection
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     return storage.get_connection_from_config(cfg.CONF, purpose)
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/ceilometer/storage/__init__.py", line 88, in get_connection_from_
config
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     return _inner()
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/retrying.py", line 68, in wrapped_f
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     return Retrying(*dargs, **dkw).call(f, *args, **kw)
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     return _inner()
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/retrying.py", line 68, in wrapped_f
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     return Retrying(*dargs, **dkw).call(f, *args, **kw)
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/retrying.py", line 229, in call
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     raise attempt.get()
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/retrying.py", line 261, in get
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     six.reraise(self.value[0], self.value[1], self.value[2])
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/retrying.py", line 217, in call
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/ceilometer/storage/__init__.py", line 86, in _inner
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     return get_connection(url, namespace)
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks   File "/usr/lib/python2.7/site-packages/ceilometer/storage/__init__.py", line 101, in get_connection
2017-03-06 17:22:37.603 31112 ERROR ceilometer.api.hooks     return ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-03-28 04:58:14 -0500

DarkKnight gravatar image

So yes indeed the ceilometer database got deleted when i cleared everything under the /var/lib/mongodb folder

Now, for the ceilometer sample collection to happen properly, here is what I did.

1) Ensure that the "/var/lib/mongodb " is owned by mongodb user and mongodb group.

2) Connect to the mongodb using the mongo client.

3) create database using "use ceilometer"

4) Create a user with the desired password " db.createUser({ user: "ceilometer", pwd: "ceilometer123", roles: [ "readWrite", "dbAdmin" ] }) ";

Now restart the mongodb and the ceilometer services using systemctl.

edit flag offensive delete link more
0

answered 2017-03-24 07:29:20 -0500

yprokule gravatar image

@DarkKnight - looks like U've deleted the ceilometer db :( Try to login to mongo and check list of available databases. E.g:

mongo --host <ip>
show dbs

if there is no ceilometer db - re-create it. Not sure maybe ceilometer-upgrade command will help U with this.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-03-06 06:09:34 -0500

Seen: 260 times

Last updated: Mar 28 '17