carbon-persister.py can't find module graphite

Asked by Dimitry Braznichenko

When running the carbon-agent.py, I just found that the cache runs just fine, but the persister.py goes defunct right away. Upon running it on its own, (python carbon-persister.py), it shows error saying the following:

[dev-intern@test01 carbon]$ python carbon-persister.py
Traceback (most recent call last):
  File "carbon-persister.py", line 18, in <module>
    from graphite import whisper
ImportError: No module named graphite

Where is this module 'graphite' supposed to be, and what reason can there be for me not having it? I ran the install correctly, I believe. Do I need to run install.py again??

~Dimitry

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Dimitry Braznichenko
Solved:
Last query:
Last reply:
Revision history for this message
Dimitry Braznichenko (dimab0) said :
#1

re-running install.py as root...

Revision history for this message
chrismd (chrismd) said :
#2

Did you run install.py as root? If not that would explain the problem because it attempts to install some python modules in your system's site-packages which requires root privileges. I would re-run install.py as root and capture the output to a file somewhere. If it does not work after that, then send me the file with the output from the installer. This is a known issue that I plan on fixing in the next release (probably out later today), the installer needs some minor changes to make non-root installations work.

Revision history for this message
Dimitry Braznichenko (dimab0) said :
#3

I have re-run install.py. This is not fixing the problem. I am also confused because the tgz file downloaded from your site contained carbon-agent.py, carbon/, etc...but after the install.py goes through successfully, all of these files exist in under usr/local/graphite/ - the problem is that when I try to run carbon-agent.py from usr/local/graphite/carbon/ now, nothing runs at all and no logs are created. However, I can run the carbon-agent.py from the extracted tgz directory and the agend and cache will start, but the persister will crash because it doesn't find graphite module.

Should the agent be able to start from usr/local/graphite/carbon/ ??

Revision history for this message
chrismd (chrismd) said :
#4

The 0.9.2 install process requires a couple of manual steps after running install.py to setup permissions, etc. They are listed in the INSTALL file, which is mentioned when the install script completes. I have made a lot of improvements to the installer for the upcoming 0.9.3 release, which I am working on finalizing this afternoon. You can either go through the manual steps in the INSTALL file if you want to get 0.9.2 going right away, or wait until later today for me to post the 0.9.3 release (which has a lot of bug fixes, so I would recommend waiting for this).

I will add a comment to this question to let you know when I have release 0.9.3.

Revision history for this message
Dimitry Braznichenko (dimab0) said :
#5

I have actually made some progress on this issue...turns out that carbon-persister.py probably needed some special persmissions to be able to write data, so running it under the same user as apache fixed the errors I was getting somehow. However, this still is not writing the data that my client says it is 'sending' to the whisper directory. I now do, however, have 6 graphs titled 'avgUpdateTime', 'committedPoints', 'creates', 'errors', 'pointsPerUpdate', and 'updateOperations' all under the whisper directory, with paths like carbon.agents.test01.avgUpdateTime etc. I am running the example-client.py, so where are my 'system.loadavg_1min.wsp' files?

Revision history for this message
Dimitry Braznichenko (dimab0) said :
#6

Alright! Got everything working, it seems. I had persister running on different username than agent and cache. Now all seems to work. Are those 6 graphs inherent to graphite? What do they display?

Revision history for this message
chrismd (chrismd) said :
#7

Good to hear you got it working, hopefully the 0.9.3 release will prove to be less painful (should be done in an hour or so). The carbon.agents.<hostname>.* graphs are carbon's internal processing stats, useful for monitoring carbon if it processes a lot of data. Some of these metrics require an in-depth explanation, which I need to put up on the wiki.