Can't start carbon-cache.py

Asked by Sam Weber

Here are all the steps I've taken in attempting to install Graphite:

Fresh install of Ubuntu 12.04.4

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git

git clone https://github.com/graphite-project/graphite-web.git
git clone https://github.com/graphite-project/carbon.git
git clone https://github.com/graphite-project/whisper.git
git clone https://github.com/graphite-project/ceres.git

cd graphite-web/
sudo python setup.py install
cd ..

cd carbon
sudo python setup.py install
cd ..

cd whisper
sudo python setup.py install
cd ..

cd ceres
sudo python setup.py install

cd /opt/graphite/conf
sudo cp carbon.conf.example carbon.conf
sudo cp storage-schemas.conf.example storage-schemas.conf

$ /opt/graphite/bin/carbon-cache.py start
Traceback (most recent call last):
  File "/opt/graphite/bin/carbon-cache.py", line 28, in <module>
    from carbon.util import run_twistd_plugin
ImportError: No module named carbon.util

---------------------

I tried a variety of things in trying to work this issue:

Did the same steps starting with a 14.04 VM. Same problem.

Google searches: "No module named carbon.util", astonishingly, gets no hits.

Installed pip, python build headers, build-essential to get this: "sudo pip install 'Twisted<12.0'" to work. After successful installation, same error.

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Jason Dixon
Solved:
Last query:
Last reply:
Revision history for this message
Best Jason Dixon (jason-dixongroup) said :
#1

There appears to be a bug in master. You probably want to use 0.9.12 or install from the 0.9.x branch.

https://github.com/graphite-project/carbon/issues/276

Revision history for this message
Sam Weber (samweber01) said :
#2

Tried the 0.9.x branch using the following procedure:

cd /opt
sudo rm -rf graphite

Went to the graphite-web, whisper, and carbon directories and executed "git checkout 0.9.x" (ceres has no 0.9.x branch).

Rebuilt in each directory with "sudo python setup.py install"

In conf directory, copied carbon.conf.example and storage-schemas.conf.example to .conf equivalents.

$ sudo /opt/graphite/bin/carbon-cache.py start
Starting carbon-cache (instance a)
Traceback (most recent call last):
  File "/opt/graphite/bin/carbon-cache.py", line 32, in <module>
    run_twistd_plugin(__file__)
  File "/opt/graphite/lib/carbon/util.py", line 90, in run_twistd_plugin
    config.parseOptions(twistd_options)
  File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 614, in parseOptions
    usage.Options.parseOptions(self, options)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/usage.py", line 266, in parseOptions
    self.subOptions.parseOptions(rest)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/usage.py", line 276, in parseOptions
    self.postOptions()
  File "/opt/graphite/lib/carbon/conf.py", line 256, in postOptions
    os.mkdir(logdir)
OSError: [Errno 2] No such file or directory: '/opt/graphite/storage/log/carbon-cache/carbon-cache-a'

Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#3

Sam, please run
mkdir -p /opt/graphite/storage/log/carbon-cache/carbon-cache-a

Revision history for this message
Sam Weber (samweber01) said :
#4

Thanks. carbon-cache.py now starts up. On to the remaining setup tasks.

<pre>
$ ps aux | grep carbon
root 7211 0.0 0.7 144312 15500 ? Sl 17:27 0:00 /usr/bin/python /opt/graphite/bin/carbon-cache.py start
sweber 7214 0.0 0.0 9392 928 pts/0 S+ 17:28 0:00 grep --color=auto carbon
</pre>

Revision history for this message
Sam Weber (samweber01) said :
#5

Thanks Jason Dixon, that solved my question.