Installation problem

Asked by Dejan Tolj

I have followed the installation instructions, managed to download all dependencies on Fedora 9 however when I open up the webpage http://localhost/graphite I get a 500 Internal Server Error. I also received a SeLinux warning about port 25 which I enabled.
I am not sure if this is an Apache setup problem or the application itself
Is this correct DocumentRoot "/usr/local/graphite//webapp" ?

This is what I see in the webapp-error.log

[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] mod_python (pid=6509, interpreter='graphite', phase='PythonHandler', handler='django.core.handlers.modpython'): Application error
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] ServerName: 'graphite'
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] DocumentRoot: '/usr/local/graphite/webapp'
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] URI: '/graphite'
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] Location: '/'
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] Directory: None
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] Filename: '/usr/local/graphite/webapp/graphite'
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] PathInfo: ''
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] Traceback (most recent call last):
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent)
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg)
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg)
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 177, in handler\n return ModPythonHandler()(req)
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 150, in __call__\n response = self.get_response(request)
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py", line 126, in get_response\n return callback(request, **param_dict)
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/django/views/defaults.py", line 88, in server_error\n t = loader.get_template(template_name) # You need to create a 500.html template.
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/django/template/loader.py", line 79, in get_template\n source, origin = find_template_source(template_name)
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] File "/usr/lib/python2.5/site-packages/django/template/loader.py", line 72, in find_template_source\n raise TemplateDoesNotExist, name
[Mon Aug 25 10:35:31 2008] [error] [client 127.0.0.1] TemplateDoesNotExist: 500.html

Question information

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

That's the generic "something is wrong" error, to get a better idea of what is actually going on you need to turn on the debug flag. To do this add a "DEBUG = True" line to /usr/local/graphite/webapp/local_settings.py and restart apache. After you do this, try to view the main page again and you should see a detailed stacktrace. If you can post the stacktrace I'll be able to help you resolve the problem.

Revision history for this message
Dejan Tolj (dejan1) said :
#2

Thanks for your response.
I have turned on debugging and this is what I get:

IOError at /graphite
[Errno 13] Permission denied: '/usr/local/graphite/storage/log/info.log'
Request Method: GET
Request URL: http://localhost/graphite
Exception Type: IOError
Exception Value: [Errno 13] Permission denied: '/usr/local/graphite/storage/log/info.log'
Exception Location: /usr/lib/python2.5/logging/__init__.py in __init__, line 770

I have created the info.log file and disabled SeLinux since it was complaining about httpd accessing files from a non-standard location. The page loads now flawlessly.

Now how do I build the database using Default settings?
I ran:
sudo python manage.py syncdb

Could not import web.local_settings, using defaults!
Loading 'initial_data' fixtures...
No fixtures found.

Revision history for this message
Best chrismd (chrismd) said :
#3

If you are using 0.9.3 you should not need to do this step manually, as it should be taken care of when you run post-install.py. The output of your syncdb command indicates that the database is already setup and there is nothing else for it to do. Also if the database were not setup the main page would give an error instead of displaying properly. So all you should need to do now is send some data to carbon and maybe create a user account or two.

Revision history for this message
Dejan Tolj (dejan1) said :
#4

Hi,
i had to copy the extjs folder to graphite install, seems like it dosnt like sym links.

[Mon Aug 25 20:53:44 2008] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /usr/local/graphite/webapp/content/js/extJS, referer: http://localhost/composer/?

Revision history for this message
Dejan Tolj (dejan1) said :
#5

Thanks chrismd, that solved my question.