graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #02493
Re: [Question #194705]: Unable to start HTTPD. Getting: (13)Permission denied: httpd: could not open error log file /opt/graphite/storage/log/webapp/error.log.
Question #194705 on Graphite changed:
https://answers.launchpad.net/graphite/+question/194705
Status: Open => Answered
Daniel Lawrence proposed the following answer:
Hello,
This error occurs when the user that is running the wsgi script is not
the owner of the /opt/graphite/storage/log/webapp/error.log file, I was
able to replicate what looks to be the same error and fix it by changing
the ownership of the /opt/graphite/storage/log/webapp/error.log file to
www-data ( as that is the user that is running my apache2 process ).
from /opt/graphite/storage/log/webapp/error.log
mod_wsgi (pid=9365): Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=9365): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'.
Traceback (most recent call last):
File "/opt/graphite/conf/graphite.wsgi", line 14, in <module>
from graphite.logger import log
File "/opt/graphite/webapp/graphite/logger.py", line 75, in <module>
log = GraphiteLogger() # import-shared logger instance
File "/opt/graphite/webapp/graphite/logger.py", line 40, in __init__
self.infoHandler = Rotater(self.infoLogFile,when="midnight",backupCount=1)
File "/usr/lib/python2.7/logging/handlers.py", line 171, in __init__
BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay)
File "/usr/lib/python2.7/logging/handlers.py", line 65, in __init__
logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib/python2.7/logging/__init__.py", line 897, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python2.7/logging/__init__.py", line 916, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/opt/graphite/storage/log/webapp/info.log'
$ ps -ef | grep 9365
www-data 9365 9357 0 19:52 ? 00:00:00 (wsgi:graphite) -k start
The Fix
$ sudo chown www-data /opt/graphite/storage/log/webapp/*.log
Let me know if that fixes the issue.
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.