UI respond me Internal Server Error (500)
- Dominant language
- Python
- Stars
- 345
- Forks
- 175
- PR merge metrics
- No merged PRs in 30d
Description
ERROR log show me Permission denied
but the file and directory all is 777
[root@ceph-mds1 calamari]# ll /var/log/calamari/info.log
-rwxrwxrwx 1 apache apache 0 Aug 5 12:48 /var/log/calamari/info.log
[root@ceph-mds1 calamari]# ll /var/log/calamari -d
drwxrwxrwx 2 apache apache 4096 Aug 5 12:48 /var/log/calamari
[root@ceph-mds1 calamari]
http_err.log:
[Thu Aug 04 23:59:49.221064 2016] [:error] [pid 3437] [remote 10.60.236.50:28] mod_wsgi (pid=3437): Exception occurred processing WSGI script '/opt/calamari/conf/calamari.wsgi'.
[Thu Aug 04 23:59:49.221440 2016] [:error] [pid 3437] [remote 10.60.236.50:28] Traceback (most recent call last):
[Thu Aug 04 23:59:49.221476 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 255, in **call**
[Thu Aug 04 23:59:49.221510 2016] [:error] [pid 3437] [remote 10.60.236.50:28] response = self.get_response(request)
[Thu Aug 04 23:59:49.221529 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 178, in get_response
[Thu Aug 04 23:59:49.221554 2016] [:error] [pid 3437] [remote 10.60.236.50:28] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Thu Aug 04 23:59:49.221595 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 220, in handle_uncaught_exception
[Thu Aug 04 23:59:49.221624 2016] [:error] [pid 3437] [remote 10.60.236.50:28] if resolver.urlconf_module is None:
[Thu Aug 04 23:59:49.221639 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 342, in urlconf_module
[Thu Aug 04 23:59:49.221662 2016] [:error] [pid 3437] [remote 10.60.236.50:28] self._urlconf_module = import_module(self.urlconf_name)
[Thu Aug 04 23:59:49.221679 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
[Thu Aug 04 23:59:49.221702 2016] [:error] [pid 3437] [remote 10.60.236.50:28] __import__(name)
[Thu Aug 04 23:59:49.221718 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_web-0.1-py2.7.egg/calamari_web/urls.py", line 20, in
[Thu Aug 04 23:59:49.221742 2016] [:error] [pid 3437] [remote 10.60.236.50:28] url(r'^api/v1/', include('calamari_rest.urls.v1')),
[Thu Aug 04 23:59:49.221758 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/django/conf/urls/**init**.py", line 25, in include
[Thu Aug 04 23:59:49.221781 2016] [:error] [pid 3437] [remote 10.60.236.50:28] urlconf_module = import_module(urlconf_module)
[Thu Aug 04 23:59:49.221799 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
[Thu Aug 04 23:59:49.221822 2016] [:error] [pid 3437] [remote 10.60.236.50:28] **import**(name)
[Thu Aug 04 23:59:49.221843 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_rest_api-0.1-py2.7.egg/calamari_rest/urls/v1.py", line 3, in
[Thu Aug 04 23:59:49.221870 2016] [:error] [pid 3437] [remote 10.60.236.50:28] import calamari_rest.views.v1
[Thu Aug 04 23:59:49.221888 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_rest_api-0.1-py2.7.egg/calamari_rest/views/v1.py", line 33, in
[Thu Aug 04 23:59:49.221916 2016] [:error] [pid 3437] [remote 10.60.236.50:28] from graphite.render.datalib import fetchData
[Thu Aug 04 23:59:49.221936 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/graphite/render/datalib.py", line 19, in
[Thu Aug 04 23:59:49.221973 2016] [:error] [pid 3437] [remote 10.60.236.50:28] from graphite.logger import log
[Thu Aug 04 23:59:49.221991 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/graphite/logger.py", line 75, in
[Thu Aug 04 23:59:49.222018 2016] [:error] [pid 3437] [remote 10.60.236.50:28] log = GraphiteLogger() # import-shared logger instance
[Thu Aug 04 23:59:49.222035 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/opt/calamari/venv/lib/python2.7/site-packages/graphite/logger.py", line 40, in **init**
[Thu Aug 04 23:59:49.222060 2016] [:error] [pid 3437] [remote 10.60.236.50:28] self.infoHandler = Rotater(self.infoLogFile,when="midnight",backupCount=1)
[Thu Aug 04 23:59:49.222076 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/usr/lib64/python2.7/logging/handlers.py", line 169, in **init**
[Thu Aug 04 23:59:49.222101 2016] [:error] [pid 3437] [remote 10.60.236.50:28] BaseRotatingHandler.**init**(self, filename, 'a', encoding, delay)
[Thu Aug 04 23:59:49.222143 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/usr/lib64/python2.7/logging/handlers.py", line 64, in **init**
[Thu Aug 04 23:59:49.222183 2016] [:error] [pid 3437] [remote 10.60.236.50:28] logging.FileHandler.**init**(self, filename, mode, encoding, delay)
[Thu Aug 04 23:59:49.222201 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/usr/lib64/python2.7/logging/**init**.py", line 902, in **init**
[Thu Aug 04 23:59:49.222226 2016] [:error] [pid 3437] [remote 10.60.236.50:28] StreamHandler.**init**(self, self._open())
[Thu Aug 04 23:59:49.222242 2016] [:error] [pid 3437] [remote 10.60.236.50:28] File "/usr/lib64/python2.7/logging/__init__.py", line 925, in _open
[Thu Aug 04 23:59:49.222267 2016] [:error] [pid 3437] [remote 10.60.236.50:28] stream = open(self.baseFilename, self.mode)
[Thu Aug 04 23:59:49.222295 2016] [:error] [pid 3437] [remote 10.60.236.50:28] IOError: [Errno 13] Permission denied: '/var/log/calamari/info.log'
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with calamari_web/urls.py and calamari_rest/urls/v1.py, then follow the import from calamari_rest/views/v1.py into Graphite's graphite/logger.py and its Rotater setup. Reproduce WSGI startup with the reported /var/log/calamari/info.log configuration; done means the application loads without the permission-denied traceback and the UI no longer returns HTTP 500.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100