Ceilometer launch error with ceilometer-collector - python

I am trying to install Ceilometer for collecting Swift usage data and having a bunch of problems. I am following the link below to install and run Ceilometer for Swift:
http://docs.openstack.org/developer/ceilometer/install/manual.html#installing-manually
I am stuck at step 9 i.e. when I try to launch ceilometer-collector, I get the following error:
**# ceilometer-collector
Traceback (most recent call last):
File "/usr/local/bin/ceilometer-collector", line 6, in <module>
from ceilometer.collector.service import collector
File "/usr/local/lib/python2.7/dist-packages/ceilometer/collector/service.py", line 26, in <module>
from ceilometer.service import prepare_service
File "/usr/local/lib/python2.7/dist-packages/ceilometer/service.py", line 27, in <module>
from ceilometer.openstack.common import gettextutils
File "/usr/local/lib/python2.7/dist-packages/ceilometer/openstack/common/gettextutils.py", line 34, in <module>
from babel import localedata
ImportError: No module named babel**
I have following some questions:
1) What does the option set in step 8.1 in the link above? I mean in /etc/ceilometer/ceilometer.conf, there're no Swift options for *_control_exchange
2) Has anyone successfully installed Ceilometer for Swift? Any step-by-step guide would be immensely helpful as the link above is generic for manual installation.
My configuration is the following:
Management server running the collector, data store, central agent, 2 proxy servers and 3 storage nodes. Everything is running on OpenStack Grizzly on 64-bit Ubuntu 12.04.

The place for more information would be developer documentation http://docs.openstack.org/developer/ceilometer/measurements.html#object-storage-swift
Also check the official project page https://wiki.openstack.org/wiki/Ceilometer
Feel free to join the developer mailing list and posting the feature request if you think more matrix needed.
Hope it helps.

here is a post with trouble shooting for Ceilometer Havana on SLES 11 SP3, http://zqfan.github.io/openstack/2014/03/18/enable-swift-meter-on-suse/
the message "ImportError: No module named babel" means you have not installed the depended python lib.
Swift sample is sent by a ceilometer middleware, which is happen in API request, so I think there is no such swift_control_exchage option

Related

Security issues downloading application for MacOS - "library load disallowed by system policy"

I recently created an application using Pyinstaller, and have bundled it correctly. It theoretically should be able to work on other macbooks now. However, I have tried zipping the application, storing it on Google Drive, and then downloading and running it on my own and other macbooks. I have hit a security issue:
Traceback (most recent call last):
File "_pyinstaller_hooks_contrib/hooks/rthooks/pyi_rth_certifi.py", line 13, in <module>
File "PyInstaller/loader/pyimod03_importers.py", line 531, in exec_module
File "ssl.py", line 98, in <module>
ImportError: dlopen(/Users/a/Downloads/main/_ssl.cpython-37m-darwin.so, 2): no suitable image found. Did find:
/Users/a/Downloads/main/_ssl.cpython-37m-darwin.so: code signature in (/Users/a/Downloads/main/_ssl.cpython-37m-darwin.so) not valid for use in process using Library Validation: library load disallowed by system policy
[50024] Failed to execute script pyi_rth_certifi
Any ideas on how to overcome this would be really appreciated! Thank you.
I have resolved the issue and thought I'd share my answer! Before distributing the app, on MacOS you have to codesign it.
This is the site that helped me: https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing.
Hope this eventually helps someone.

Import error on first-party library with dev_appserver.py

On Ubuntu 16.04, am suddenly getting import errors from the local GAE development server.
The local dev server starts up, including the admin interface, but app no longer loads.
Native python imports of the same library on same machine (in this case "from google.cloud import datastore") work fine.
The GAE standard app does run when deployed, but development just got a little challenging.
google-cloud is version 0.27.0
gcloud components is 172.0.1
python is Anaconda 2.7.13
GAE is standard
I have confirmed to the best of my middling abilities that $PATH is correct for all named libraries.
I have removed and re-added all the named libraries to no effect.
cachetools(2.0.1) it should probably be noted, is installed as a dependency of the google cloud libraries, so I don't think this is addressable through requirements.txt or "libraries" in app.yaml.
I did recently go through a cycle of removing and adding libraries to fix a problem with apache_beam 2.0.1, so I may have jacked up something else, but am not sure where to look.
Suggestions deeply appreciated. Full traceback (from admin, same as from app):
Traceback (most recent call last):
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/request_handler.py", line 232, in handle_interactive_request
exec(compiled_code, self._command_globals)
File "<string>", line 1, in <module>
File "/home/brian/anaconda3/lib/python2.7/site-packages/google/cloud/datastore/__init__.py", line 61, in <module>
from google.cloud.datastore.client import Client
File "/home/brian/anaconda3/lib/python2.7/site-packages/google/cloud/datastore/client.py", line 23, in <module>
from google.cloud.client import ClientWithProject
File "/home/brian/anaconda3/lib/python2.7/site-packages/google/cloud/client.py", line 27, in <module>
from google.oauth2 import service_account
File "/home/brian/anaconda3/lib/python2.7/site-packages/google/oauth2/service_account.py", line 79, in <module>
from google.auth import jwt
File "/home/brian/anaconda3/lib/python2.7/site-packages/google/auth/jwt.py", line 49, in <module>
import cachetools
ImportError: No module named cachetools
The stacktrace indicates you're running the libraries from the local system installation (the site-packages dir), not from your app.
For standard env GAE apps you need to install the dependencies inside your app and they will be uploaded to GAE together with your app code.
More specifically you need to use the -t <your_app_lib_dir> option for the pip installation. From Installing a third-party library:
Use pip (version 6 or later) with the -t <directory> flag to copy the libraries into the folder you created in the previous
step. For example:
pip install -t lib/ <library_name>
I addressed my problem through the requirements.txt file in app root directory.
I had: google-cloud==0.22.0
and changed it to: google-cloud==0.27.0
which fixed it.

Missing Python Packaging Tools on Python Interpreter - Django

I've been working on a basic Django project and I deployed it to AWS Elastic Beanstalk. I'm not sure if that's causing this, but I'm just telling you this so that you know what I might have been done with my project. Then, my python project interpreter got kinda messy and when I try to run the application it started to give me some errors about missing packages. After that, I checked my project interpreter, and it was like this:
Then, I tried to install the required packages using PyCharm, however, it kept giving me the error below. I also tried to build some of those packages manually, like Django, on my own terminal but the error was same. Further, I was able to install packages on other python versions on my mac, which sorta tells I might have messed my default python interpreter somehow.
40:357: execution error: Traceback (most recent call last): File
"/var/folders/f1/k7c234sx5fn9j84yt130_znr0000gn/T/tmp2zDEZTpycharm-management/pip-9.0.1/setup.py",
line 6, in
from setuptools import setup, find_packages File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/setuptools/init.py",
line 12, in
import setuptools.version File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/setuptools/version.py",
line 1, in
import pkg_resources File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/pkg_resources/init.py",
line 72, in
import packaging.requirements File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/packaging/requirements.py",
line 59, in
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") TypeError: call() takes exactly 2 arguments (1 given) (1)
I'd really appreciate any help here and please ask me if any extra detail is needed to answer this question before downvoting.
pip install setuptools==33.1.1

Portable python with Kivy designer

I'm operating on a windows 7 machine but because I don't have admin rights, I needed to use a portable version of python.
I'm following these two tutorials:
https://kivy.org/docs/installation/installation-windows.html#
https://github.com/kivy/kivy-designer
I was able to get kivy installed to my portable python path and I'm running into trouble with the 2nd tutorials
garden install filebrowser
I checked my installed modules and it says that I have kivy-garden:
['argh==0.26.1', 'docutils==0.12', 'gitdb==0.6.4', 'gitpython==1.0.1', 'jedi==0.9.0', 'kivy-garden==0.1.4', 'kivy.deps.glew== 0.1.4', 'kivy.deps.gstreamer==0.1.5', 'kivy.deps.sdl2==0.1.12', 'kivy==1.9.1', 'lxml==3.3.4', 'matplotlib==1.3.1', 'numpy==1.8.1', 'pandas==0.11.0', 'pathtools==0.1.2', 'pil==1.1.7', 'pip==8.0.2', 'py2exe==0.6.9', 'pycairo==1.8.10', 'pygame==1.9.1','pygments==2.1', 'pygobject==2.28.3', 'pygoocanvas==0.14.2', 'pygtk==2.24.0', 'pygtksourceview==2.10.1', 'pyodbc==3.0.7', 'pyparsing==2.0.1', 'pypiwin32==219', 'pyrsvg==2.32.1', 'pyserial==2.7', 'pywin32==218', 'pyyaml==3.11', 'requests==2.9.1', 'scipy==0.13.3', 'setuptools==19.4', 'six==1.10.0', 'smmap==0.9.0', 'watchdog==0.8.3', 'wheel==0.26.0']
I tried to launch the designer's main.py without the file browser and I get the following error:
Traceback (most recent call last):
File "C:\Sources\Portable_Python_2.7.6.1\kivy-designer-master\main.py", line 2, in <module>
from designer.app import DesignerApp
File "C:\Sources\Portable_Python_2.7.6.1\kivy-designer-master\designer\app.py", line 28, in <module>
from kivy.garden.filebrowser import FileBrowser
ImportError: No module named filebrowser
Which it appears I cannot do unless I install the filebrowser.
Has anyone run into this before? I don't care if I don't have a file browser, I really just want the Kivy Designer to work because I'm still learning Python GUI modeling and having a designer would make it so much easier. Many of the tutorials I've looked at talk about using the Kivy.bat, but I have searched everywhere and when you using the installation on windows, a Kivy.bat is never created.

[qpid]qpid-python client doesn't work for qpid-0.22

I have installed qpid-0.22 on sles11 sp2 X86_64, the broker works fine.
Then I installed qpid-python client and set the env variable.
PYTHONPATH=/home/zdx/qpid/qpid-0.22/python/:/usr/local/lib/python2.7:/usr/local/lib/python2.7/site-packages:/home/zdx/qpid/qpid-0.22/python
But the python client doesn't work, including qpid-config tool and qpid-python client test examples.
When I ran this kind of script, it showed following exception:
Traceback (most recent call last):
File "/usr/local/bin/qpid-config", line 31, in
from qpid.messaging import Connection
File "/usr/local/lib/python2.7/site-packages/qpid/init.py", line 20, in
import connection
File "/usr/local/lib/python2.7/site-packages/qpid/connection.py", line 20, in
import datatypes, session
File "/usr/local/lib/python2.7/site-packages/qpid/session.py", line 26, in
from ops import Command, MessageTransfer
ImportError: cannot import name MessageTransfer
It indicate that class or module MessageTransfer does not exist in ops module,
and I look into the python module ops.py, there is none class MessageTransfer.
what is the problem with it? thanks.
Even though you installed the command line tools properly, sometimes you will get this error.
This means that you need to install the python-qpid bindings and their libraries.
If you have epel repository in your /etc/yum.repos.d/ , You can directly install the package by using yum like this.
# yum search python-qpid
In search results, select package according to your Operating system (32-bit/64-bit).
And then install the package.
# yum install python-qpid..... (python-qpid-proton.x86_64, etc..)
If you don't have epel, first get epel into your /etc/yum.repos.d/ and then install the package

Categories