[Openstack] Ceilometer Api error in Juno

Eoghan Glynn eglynn at redhat.com
Mon Nov 17 13:46:41 UTC 2014


You don't need to delete the sqlite DB, just configure
the ceilometer.conf to use a mongodb connection URL.

However it seems like you don't have all the mongodb
client-side dependencies all installed.

BTW how did you install mongodb?

Looking at the Trusty packaging for python-ceilometer:

  http://packages.ubuntu.com/trusty-updates/python/python-ceilometer

I see that it depends on python-pymongo:

  http://packages.ubuntu.com/trusty/python-pymongo

which in turn depends on python-bson as expected:

  http://packages.ubuntu.com/trusty/python-bson

Can you check if those packages are installed?

  $ sudo dpkg -s python-pymongo

Cheers,
Eoghan

----- m channappa negalur <m.channappa.negalur at accenture.com> wrote:
> Hello Eoghan,
> 
> Thanks for your reply. I have installed Juno on Ubuntu 14.04 .
> 
> 1.How did you install ceilometer, using packages or direct from git?.
> Ans: I have installed it from Juno repsiotory.
> 
> 
> I want to configure ceilometer to use mongodb as a backend. Is it require to delete ceilometer.sqlite db  under /var/lib/ceilometer and also I need to remove it from the configuration /etc/ceilometer/ceilometer.conf.. ?
> 
> If your answer is yes, then it will start throwing error as I mentioned below and ceilometer-api will stop running and 8777 port will stop listening to ceilometer-api.
> 
> Please let me know how I can proceed further.
> 
> 
> This is the error I have received again.
> 
> ==> ceilometer-collector.log <==
> 2014-11-17 13:05:26.808 937 ERROR stevedore.extension [-] Could not load 'database': No module named bson.code
> 2014-11-17 13:05:26.809 937 ERROR stevedore.extension [-] No module named bson.code
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension Traceback (most recent call last):
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 162, in _load_plugins
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     verify_requirements,
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 123, in _load_one_plugin
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     verify_requirements,
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 180, in _load_one_plugin
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     obj = plugin(*invoke_args, **invoke_kwds)
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/ceilometer/dispatcher/database.py", line 41, in __init__
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     self.storage_conn = storage.get_connection_from_config(conf)
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/ceilometer/storage/__init__.py", line 82, in get_connection_from_config
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     return get_connection(url, namespace)
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/ceilometer/storage/__init__.py", line 93, in get_connection
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     mgr = driver.DriverManager(namespace, engine_name)
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/stevedore/driver.py", line 45, in __init__
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     verify_requirements=verify_requirements,
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 55, in __init__
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     verify_requirements)
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 170, in _load_plugins
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     self._on_load_failure_callback(self, ep, err)
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension   File "/usr/lib/python2.7/dist-packages/stevedore/driver.py", line 50, in _default_on_load_failure
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension     raise err
> 2014-11-17 13:05:26.809 937 TRACE stevedore.extension ImportError: No module named bson.code
> 
> 
> Regards,
> Malleshi CN
> 
> -----Original Message-----
> From: Eoghan Glynn [mailto:eglynn at redhat.com] 
> Sent: Monday, November 17, 2014 5:31 PM
> To: Channappa Negalur, M.
> Cc: openstack at lists.openstack.org
> Subject: Re: [Openstack] Ceilometer Api error in Juno
> 
> 
> Hi,
> 
> How did you install ceilometer, using packages or direct from git?
> 
> If using packages, what OS are you working on? (Fedora, Ubuntu, CentOS etc.)
> 
> Note that the bson.code module is provided by the python-bson package on Fedora, which is a dependency of python-pymongo, which is in turn required by the ceilometer packages.
> 
> I suspect there is a similar dependency structure on Ubuntu.
> 
> These dependencies are generally handled by the underlying package manager, i.e. the yum utility in the case of Fedora or CentOS.
> 
> Cheers,
> Eoghan 
> 
> ----- m channappa negalur <m.channappa.negalur at accenture.com> wrote:
> > Hello Geeks,
> > 
> > I have installed three node openstack Juno. I was configuring ceilometer using mongodb as back end.
> > 
> > I found my ceilometer-api is not starting and throwing some module error.
> > 
> > root at Control:/var/log/ceilometer# tail -50 ceilometer-api.log
> > 2014-11-15 12:02:02.124 23900 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 170, in _load_plugins
> > 2014-11-15 12:02:02.124 23900 TRACE ceilometer     self._on_load_failure_callback(self, ep, err)
> > 2014-11-15 12:02:02.124 23900 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/stevedore/driver.py", line 50, in _default_on_load_failure
> > 2014-11-15 12:02:02.124 23900 TRACE ceilometer     raise err
> > 2014-11-15 12:02:02.124 23900 TRACE ceilometer ImportError: No module 
> > named bson.code
> > 2014-11-15 12:02:02.124 23900 TRACE ceilometer
> > 2014-11-16 22:22:30.649 17570 CRITICAL ceilometer [-] ImportError: No 
> > module named bson.code
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer Traceback (most recent call last):
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/bin/ceilometer-api", line 10, in <module>
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     sys.exit(main())
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/cmd/api.py", line 23, in main
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     srv = app.build_server()
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/api/app.py", line 157, in build_server
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     app = load_app()
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/api/app.py", line 153, in load_app
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return deploy.loadapp("config:" + cfg_file)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return loadobj(APP, uri, name=name, **kw)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return context.create()
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return self.object_type.invoke(self)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 203, in invoke
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     app = context.app_context.create()
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return self.object_type.invoke(self)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return fix_call(context.object, context.global_conf, **context.local_conf)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     val = callable(*args, **kw)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/api/app.py", line 181, in app_factory
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return VersionSelectorApplication()
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/api/app.py", line 104, in __init__
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     self.v2 = setup_app(pecan_config=pc)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/api/app.py", line 68, in setup_app
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     storage.get_connection_from_config(cfg.CONF, 'metering'),
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/storage/__init__.py", line 82, in get_connection_from_config
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     return get_connection(url, namespace)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/ceilometer/storage/__init__.py", line 93, in get_connection
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     mgr = driver.DriverManager(namespace, engine_name)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/stevedore/driver.py", line 45, in __init__
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     verify_requirements=verify_requirements,
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 55, in __init__
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     verify_requirements)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 170, in _load_plugins
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     self._on_load_failure_callback(self, ep, err)
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer   File "/usr/lib/python2.7/dist-packages/stevedore/driver.py", line 50, in _default_on_load_failure
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer     raise err
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer ImportError: No module 
> > named bson.code
> > 2014-11-16 22:22:30.649 17570 TRACE ceilometer
> > 
> > 
> > Looking for some help..
> > 
> > Regards,
> > Malleshi CN
> > 
> > ________________________________
> > 
> > This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
> > ______________________________________________________________________
> > ________________
> > 
> > www.accenture.com




More information about the Openstack mailing list