[Openstack] Ceilometer Api error in Juno

m.channappa.negalur at accenture.com m.channappa.negalur at accenture.com
Mon Nov 17 18:18:21 UTC 2014


Hello Eoghan,

I have installed mongodb using below command as per the document.

1. apt-get install mongodb-server   ( this case mongodb will not be installed)

2. apt-get install mongodb   :  if I use this , mongodb-server will automatically installed as a dependencies.  

I tried both way and still I was getting the error.

Packages installed :

root at Control:/home/oss# dpkg -l | grep -i ceilometer
ii  ceilometer-agent-central             2014.2-0ubuntu1~cloud0                all          ceilometer central agent
ii  ceilometer-agent-notification        2014.2-0ubuntu1~cloud0                all          ceilometer notification agent
ii  ceilometer-alarm-evaluator           2014.2-0ubuntu1~cloud0                all          Ceilometer alarm evaluator
ii  ceilometer-alarm-notifier            2014.2-0ubuntu1~cloud0                all          Ceilometer notification agent
ii  ceilometer-api                       2014.2-0ubuntu1~cloud0                all          ceilometer api service
ii  ceilometer-collector                 2014.2-0ubuntu1~cloud0                all          ceilometer collector service
ii  ceilometer-common                    2014.2-0ubuntu1~cloud0                all          ceilometer common files
ii  python-ceilometer                    2014.2-0ubuntu1~cloud0                all          ceilometer python libraries
ii  python-ceilometerclient              1.0.10-0ubuntu1~cloud0                all          Client library for Openstack ceilometer server.

root at Control:/home/oss# dpkg -l | grep -i mongodb
ii  mongodb-clients                      1:2.4.9-1ubuntu2                      amd64        object/document-oriented database (client apps)
ii  mongodb-server                       1:2.4.9-1ubuntu2                      amd64        object/document-oriented database (server package)

root at Control:/home/oss# sudo dpkg -s python-pymongo
dpkg-query: package 'python-pymongo' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.


If I use mongodb below packages will be installed, but not the  " python-pymongo".

root at Control:/home/oss# apt-get install mongodb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  binutils cpp cpp-4.8 gcc gcc-4.8 libasan0 libatomic1 libboost-dev
  libboost1.54-dev libc-dev-bin libc6-dev libcloog-isl4 libgcc-4.8-dev
  libgomp1 libisl10 libitm1 libmpc3 libmpfr4 libstdc++-4.8-dev libtsan0
  linux-libc-dev manpages-dev mongodb-dev
Suggested packages:
  binutils-doc cpp-doc gcc-4.8-locales gcc-multilib make autoconf automake1.9
  libtool flex bison gdb gcc-doc gcc-4.8-multilib gcc-4.8-doc libgcc1-dbg
  libgomp1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg libtsan0-dbg
  libbacktrace1-dbg libquadmath0-dbg binutils-gold libboost-doc
  libboost1.54-doc libboost-atomic1.54-dev libboost-chrono1.54-dev
  libboost-context1.54-dev libboost-coroutine.54-dev
  libboost-date-time1.54-dev libboost-exception1.54-dev
  libboost-filesystem1.54-dev libboost-graph1.54-dev
  libboost-graph-parallel1.54-dev libboost-iostreams1.54-dev
  libboost-locale1.54-dev libboost-log.54-dev libboost-math1.54-dev
  libboost-mpi1.54-dev libboost-mpi-python1.54-dev
  libboost-program-options1.54-dev libboost-python1.54-dev
  libboost-random1.54-dev libboost-regex1.54-dev
  libboost-serialization1.54-dev libboost-signals1.54-dev
  libboost-system1.54-dev libboost-test1.54-dev libboost-thread1.54-dev
  libboost-timer1.54-dev libboost-wave1.54-dev libboost1.54-tools-dev
  libmpfrc++-dev libntl-dev glibc-doc libstdc++-4.8-doc
The following NEW packages will be installed:
  binutils cpp cpp-4.8 gcc gcc-4.8 libasan0 libatomic1 libboost-dev
  libboost1.54-dev libc-dev-bin libc6-dev libcloog-isl4 libgcc-4.8-dev
  libgomp1 libisl10 libitm1 libmpc3 libmpfr4 libstdc++-4.8-dev libtsan0
  linux-libc-dev manpages-dev mongodb mongodb-dev
0 upgraded, 24 newly installed, 0 to remove and 19 not upgraded.
Need to get 26.5 MB of archives.
After this operation, 185 MB of additional disk space will be used.

If I won't delete sqlite db, all ceilometer data will be stored in sqlitedb. If I am wrong correct me , because I can see the size of the file increasing  .

root at Control:/var/lib/ceilometer# du -sh *
312K    ceilometer.sqlite
root at Control:/var/lib/ceilometer#


Thanks for your assistance.

Regards,
Malleshi CN


-----Original Message-----
From: Eoghan Glynn [mailto:eglynn at redhat.com] 
Sent: Monday, November 17, 2014 7:17 PM
To: Channappa Negalur, M.
Cc: openstack at lists.openstack.org
Subject: RE: [Openstack] Ceilometer Api error in Juno


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