Carbon writing to root directory?

Asked by David Gordon

Hi All,

I've got a working Graphite 0.9.10 setup, but am seeing something weird. Most of my metrics happily write to subdirectories of /app/graphite/storage/whisper - as you'd expect. However, a subset of metrics are being written to the root directory ("/"). Anyone have any idea what could cause such a problem?

I was originally running carbon-cache as root - I discovered this problem as part of migrating it to a non-privileged user - it now logs a lot of errors due to lack of permissions..

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
David Gordon
Solved:
Last query:
Last reply:
Revision history for this message
David Gordon (dave-gordon-2) said :
#1

To elaborate a little..

Imagine I have a metric: one.two.three

Most of the time they're being written to /app/graphite/storage/whisper/one/two/three.wsp. Some of the time they are going to /one/two/three.wsp

Revision history for this message
David Gordon (dave-gordon-2) said :
#2

..getting carbon console logs such as:

19/06/2013 17:39:33 :: Unhandled Error
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/twisted/python/threadpool.py", line 210, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib64/python2.6/site-packages/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
  File "/app/graphite/lib/carbon/writer.py", line 158, in writeForever
    writeCachedDataPoints()
--- <exception caught here> ---
  File "/app/graphite/lib/carbon/writer.py", line 124, in writeCachedDataPoints
    whisper.update_many(dbFilePath, datapoints)
  File "/usr/lib/python2.6/site-packages/whisper.py", line 537, in update_many
    fh = open(path,'r+b')
exceptions.IOError: [Errno 13] Permission denied: '/one/two/three.wsp'

Revision history for this message
Boopathi Rajaa (boopathi) said :
#3

Even I have the same problem.

When I initially used carbon daemons, it was storing them as root
When I configured carbon.conf to run as user=graphite, I got the same error,

exceptions.IOERROR: Permission denied.

But, for me, the case was, the metrics path didn't change.

Revision history for this message
David Gordon (dave-gordon-2) said :
#4

The issue was that something was sending metrics beginning with a ".".