graphite-project / carbon

Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend.
http://graphite.readthedocs.org/
Apache License 2.0
1.51k stars 490 forks source link

[Q] carbon creates.log missing #937

Closed itinneed2022 closed 2 years ago

itinneed2022 commented 2 years ago

I've installed Graphite and Carbon on RHEL7 using Python3. The /opt/graphite/storage/whisper/carbon/agents directory is empty and at opt/graphite/storage/log/carbon-cache/carbon-cache-a/ I do not have a creates.log. I'm sending data to the ports but nothing seems to populate.

The most recent error in /opt/graphite/storage/log/carbon-cache/carbon-cache-a/console.log is: 22/06/2022 10:34:39 :: Error creating carbon.agents.server1-a.cache.queues: [Errno 2] No such file or directory: '/opt/graphite/storage/whisper/carbon/agents/server1-a/cache/queues.wsp' 22/06/2022 10:34:39 :: "[Errno 13] Permission denied: '/opt/graphite/storage/whisper/carbon/agents/server1-a'" 22/06/2022 10:34:39 :: Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/twisted/python/threadpool.py", line 261, in <lambda> ctx, func, *args, **kw File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 117, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 82, in callWithContext return func(*args, **kw) File "/opt/graphite/lib/carbon/writer.py", line 191, in writeForever writeCachedDataPoints() --- <exception caught here> --- File "/opt/graphite/lib/carbon/writer.py", line 142, in writeCachedDataPoints state.database.create(metric, archiveConfig, xFilesFactor, aggregationMethod) File "/opt/graphite/lib/carbon/database.py", line 145, in create self.sparse_create, self.fallocate_create) File "/usr/local/lib/python3.6/site-packages/whisper-1.2.0-py3.6.egg/whisper.py", line 504, in create with open(path, 'wb', BUFFERING) as fh: builtins.FileNotFoundError: [Errno 2] No such file or directory: '/opt/graphite/storage/whisper/carbon/agents/server1-a/cache/size.wsp'

I tried changing the directories permissions but that hasn't seem to do anything. even opening it up to 777 and setting SELinux to permissive hasn't helped.

deniszh commented 2 years ago

Hi @itinneed2022

Error is quite self-descriptive - please check if path /opt/graphite/storage/whisper/carbon/agents/nettrenddevapp01-a/cache/ exists and it's writable for carbon. Logs says that "[Errno 13] Permission denied", so, looks like it's not.

itinneed2022 commented 2 years ago

@deniszh I created it and set the owner of all the folders to carbon:carbon.

That created /opt/graphite/storage/whisper/carbon/agents/server1-a/cache/size.wsp, however there is still not a creates.log file in /opt/graphite/storage/log/carbon-cache/carbon-cache-a/.

I started the carbon-a daemon in debug mode and I did not see an error. What is supposed to create the /opt/graphite/storage/log/carbon-cache/carbon-cache-a/creates.log file?