New Installation: Web Page Does Not Load - 500 Error Returned

Asked by Barry Friedman

A new graphite installation. The carbon and whisper components are working, however the website will not load. Have verified the default page loads without the graphite.conf file present, however the introduction of the graphite.conf file, breaks the website.

Including the error_log entries when the page access is attempted:

[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] mod_wsgi (pid=15930): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'.
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] Traceback (most recent call last):
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib/python2.6/site-packages/whitenoise/base.py", line 119, in __call__
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] return self.application(environ, start_response)
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 219, in __call__
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] self.load_middleware()
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 43, in load_middleware
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] mod = import_module(mw_module)
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] __import__(name)
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/opt/graphite/webapp/graphite/middleware.py", line 1, in <module>
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] from graphite.logger import log
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/opt/graphite/webapp/graphite/logger.py", line 87, in <module>
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] log = GraphiteLogger() # import-shared logger instance
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/opt/graphite/webapp/graphite/logger.py", line 40, in __init__
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] level = logging.INFO,
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/opt/graphite/webapp/graphite/logger.py", line 65, in _config_logger
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] handler = Rotater(log_file, when=when, backupCount=backupCount)
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib64/python2.6/logging/handlers.py", line 164, in __init__
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay)
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib64/python2.6/logging/handlers.py", line 64, in __init__
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] logging.FileHandler.__init__(self, filename, mode, encoding, delay)
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib64/python2.6/logging/__init__.py", line 835, in __init__
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] StreamHandler.__init__(self, self._open())
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] File "/usr/lib64/python2.6/logging/__init__.py", line 854, in _open
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] stream = open(self.baseFilename, self.mode)
[Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] IOError: [Errno 13] Permission denied: '/opt/graphite/storage/log/webapp/info.log'

Any assistance would be appreciated.

Thank you,
Barry

Question information

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

> [Fri Oct 16 19:28:14 2015] [error] [client 10.239.40.32] IOError: [Errno 13] Permission denied: '/opt/graphite/storage/log/webapp/info.log'

make sure your webserver can write to that file/location

Revision history for this message
Barry Friedman (bmfriedman) said :
#2

No. Permissions do not appear to be the issue:

$ ll
total 0
-rwxrwxr-- 1 grphadm tivoli 0 Oct 13 14:02 exception.log
-rwxrwxr-- 1 grphadm tivoli 0 Oct 13 14:02 info.log
$ echo "Test write" >> info.log
$ ll
total 4
-rwxrwxr-- 1 grphadm tivoli 0 Oct 13 14:02 exception.log
-rwxrwxr-- 1 grphadm tivoli 11 Oct 16 15:42 info.log
$ tail info.log
Test write
$ whoami
grphadm
$

Revision history for this message
Piotr Popieluch (piotr1212) said :
#3

you run your webserver as the "grphadm" user?

Revision history for this message
Barry Friedman (bmfriedman) said :
#4

Yes. We run the server as grphadm. I found an issue with the web server file directory structure, selinux and permissions on two files. The web page published after these were corrected.

Thank you for your suggestion and assistance,
Barry