Carbon exceptions.NameError longwhisper

Asked by JP Pozzi

Hello,

I try to install graphite + carbon + whisper for graphing Shinken data and I get a problem, carbos has creates directories for hosts/services but no data is written in the files. Example in the "/opt/graphite/storage/whisper/k2000/Memory" directory are some files with zero bytes :

-rw-r--r-- 1 root root 0 2013-01-19 17:28 ram_used_crit.wsp
-rw-r--r-- 1 root root 0 2013-01-19 17:28 ram_used_warn.wsp
-rw-r--r-- 1 root root 0 2013-01-19 17:28 ram_used.wsp
-rw-r--r-- 1 root root 0 2013-01-19 17:28 swap_used_crit.wsp
-rw-r--r-- 1 root root 0 2013-01-19 17:28 swap_used_warn.wsp
-rw-r--r-- 1 root root 0 2013-01-19 17:28 swap_used.wsp

The console log contains many Python Tracebacks like :

Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.6/dist-packages/twisted/python/threadpool.py", line 207, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/opt/graphite/lib/carbon/writer.py", line 158, in writeForever
    writeCachedDataPoints()
  File "/opt/graphite/lib/carbon/writer.py", line 118, in writeCachedDataPoints
    whisper.create(dbFilePath, archiveConfig, xFilesFactor, aggregationMethod, settings.WHISPER_SPARSE_CREATE)
  File "/usr/local/lib/python2.6/dist-packages/whisper.py", line 336, in create
    archiveCount = struct.pack(longwhisper.pyFormat, len(archiveList))
exceptions.NameError: global name 'longwhisper' is not defined

I don't know why the "longwhisper" format is not found:
missing package ?
bad version match ?
..... my fault (bad parameters .....)?

Regards

JP P

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
JP Pozzi
Solved:
Last query:
Last reply:
Revision history for this message
JP Pozzi (jp-pozzi) said :
#1

Hello,

I don't know why but the file "/usr/local/lib/python2.6/dist-packages/whisper.py" was actually containing the line :

archiveCount = struct.pack(longwhisper.pyFormat, len(archiveList))

but the original source not !!!
I copy the original source to "/usr/local/lib/python2.6/dist-packages/" and the messages vanished, the files are now "growing" as they should.

Something weird should happen while building ou installing ???

JP P