graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #00128
[Question #89138]: Centos 5.4, couple problems
New question #89138 on Graphite:
https://answers.launchpad.net/graphite/+question/89138
I have a bunch of questions, but on the plus side, once we get this stuff going you'll have a Centos guide you can cut and paste on the wiki. :) I have this setup on a virtual machine so I've blown it away and started fresh a couple times to make sure.
Here are my steps so far:
-------------------------------------------
Centos 5.4 Setup
notes:
- There are issues with 0.9.4, so, I don't suggest using it.
Warning:
- Using external (EPEL) rpm repo for python packages that are not supported by Centos repos.
Steps:
(install packages needed for graphite)
yum install bzr python-crypto python-paramiko python-twisted-core python-sqlite2 python-memcached Django pyOpenSSL python-simplejson python-zope-interface
(checkout bzr somewhere handy: )
cd /opt/bzr
bzr checkout lp:graphite
cd graphite
./check-dependencies.py
(The only thing you should see is the whisper module is not installed. If you see more dependencies not met, you are on your own. )
cd whisper
python setup.py install
cd ..
./check-dependencies.py
(make sure whisper install worked)
vi setup.cfg
(change dir to whatever dir you want, i'm using oldschool /usr/local/graphite)
python setup.py install
cd carbon
vi setup.cfg
(change dir to whatever, i'm using /usr/local/graphite/carbon)
python setup.py install
cd ..
./misc/generate-apache-config.py --install-root=/usr/local/graphite
(BUG?* Warning default on this program is still /usr/local/graphite not /opt/graphite)
(* I might need to change the lib dir as well, cuz this doesn't work atm)
cp graphite-vhost.conf /etc/httpd/conf.d/
cd /usr/local/graphite/webapp/graphite
(* warning: change path below to your install dirs)
export PYTHONPATH=$PYTHONPATH:/usr/local/graphite/webapp
cd /usr/local/graphite/webapp/graphite/
python manage.py syncdb
cd /usr/local/graphite
(* This is not a great idea, but we're just getting it up and running)
chown apache:apache storage/ -R
cd /usr/local/graphite/carbon/conf
cp carbon.conf.example carbon.con
cp storage-schemas.conf.example storage-schemas.conf
(edit to your tastes)
(*BUG? carbon.conf LOCAL_DATA_DIR needs to be updated with user supplied install dir maybe a setup.cfg in the ~carbon dir)
-------------------------------------------
Okay, so. here is where I am now.
1) I can't get carbon-cache to start.
./carbon-cache.py
Traceback (most recent call last):
File "./carbon-cache.py", line 47, in ?
from carbon.conf import settings
ImportError: No module named carbon.conf
-------------------------------------------
2) The generated graphite-vhost.conf seams wrong, here is what mine looks like:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/usr/local/graphite//webapp"
<Location "/">
SetHandler python-program
PythonPath "['/usr/local/graphite/webapp'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE web.settings
PythonDebug Off
PythonAutoReload Off
</Location>
<Location "/content/">
SetHandler None
</Location>
<Location "/media/">
SetHandler None
</Location>
Alias /media/ "/usr/lib/python2.4/site-packages/django/contrib/admin/media/"
ErrorLog /usr/local/graphite/storage/log/webapp-error.log
CustomLog /usr/local/graphite/storage/log/webapp-access.log common
</VirtualHost>
The error i get: (/usr/local/graphite/storage/logs/webapp-error.log)
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: Traceback (most recent call last):
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n result = object(req)
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 228, in handler\n return ModPythonHandler()(req)
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 191, in __call__\n self.load_middleware()
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 33, in load_middleware\n for middleware_path in settings.MIDDLEWARE_CLASSES:
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 269, in __getattr__\n self._setup()
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 40, in _setup\n self._wrapped = Settings(settings_module)
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 75, in __init__\n raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
[Sat Nov 07 17:34:33 2009] [error] [client 192.168.1.65] PythonHandler django.core.handlers.modpython: ImportError: Could not import settings 'web.settings' (Is it on sys.path? Does it have syntax errors?): No module named web.settings
I tried changing the directories around to
/usr/local/graphite/webapp/graphite
and such, but nothing i tried worked.
3) The init scripts to start/stop services are missing atm.
-------------------------------------------
Now, the good news, Is that if I run
./run-graphite-devel-server.py /usr/local/graphite/
(Which btw i didn't know what the heck this was)
I see that it's running something on port 8080, so I connected, and , it works!
I see the graphite composer, and it looks pretty good. The Stuff under Tree's is now populated which is the problem I was having with 0.9.4 ..
I think it's very close to working, and once I get it working I'll clean up my guide a bit, and hopefully it will help someone out. The carbon-relay stuff (which I knew nothing about) seams very cool. I can test this with multiple VMs and look forward to doing so.
Thanks in advance.
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.