Results 1 to 2 of 2

Thread: MongoDB Issue with Python 2.7

  1. #1

    MongoDB Issue with Python 2.7

    I have, more or less, successfully built Python2.7 from source, installed all of the "Stuff" and have everything but Carbon finally working. At least now I know Carbon isn't not working due to the Python version

    However, I am getting an error in the broker, with MongoDB that I didn't see when running Shinken under Python 2.6.6.

    Code:
    [1455689765] WARNING: [broker-master] Cannot import logstore-mongodb..module : cannot import name Connection
    [1455689765] WARNING: [broker-master] Trying to load '/var/lib/shinken/modules/logstore-mongodb' as an (very-)old-style s
    hinken "module" : by adding its path to sys.path. This can be (very) bad in case of name conflicts within the files part
    of /var/lib/shinken/modules/logstore-mongodb and others top-level python modules; I'll try to limit that.
    [1455689765] ERROR: [broker-master] Could not import bare 'module.py' from /var/lib/shinken/modules/logstore-mongodb : ca
    nnot import name Connection
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/Shinken-2.4.2-py2.7.egg/shinken/modulesmanager.py", line 114, in try_very_
    bad_load
        return importlib.import_module('module')
      File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
        __import__(name)
      File "/var/lib/shinken/modules/logstore-mongodb/module.py", line 51, in <module>
        from pymongo import Connection
    ImportError: cannot import name Connection
    Looking this up, "Connection" seems to be depreciated. Any ideas?

    == John ==

  2. #2
    Member
    Join Date
    May 2013
    Location
    France - Valence
    Posts
    91
    What are your system and Shinken and modules versions ?

    I do not understand why you built Python 2.7 from sources ... and what it is about Carbon ?

    You problem seems to be because your pymong library is too old ... pymongo3 and mongodb3 are required for the mongo-logs module ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •