CKAN error: Server Error 500

人盡茶涼 提交于 2019-12-19 10:29:33

问题


When I visit a page of a CKAN site, I get an error: "Server Error" with status 500:

How do I work out what went wrong?

And how do I get help?


回答1:


This error could mean lots of things. (Technically, there was an exception during the server's handling of your request.)

Your server log will tell you what happened. In most cases you can see it in this file:

/var/log/apache2/ckan_default.error.log

The details of one error look like this:

[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195] Traceback (most recent call last):
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]   File "/var/ckan/wsgi_app.py", line 8, in 
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]     fileConfig(config_filepath)
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]   File "/home/co/ckan/lib/python2.7/site-packages/paste/script/util/logging_config.py", line 85, in fileConfig
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]     handlers = _install_handlers(cp, formatters)
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]   File "/home/co/ckan/lib/python2.7/site-packages/paste/script/util/logging_config.py", line 158, in _install_handlers
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]     h = apply(klass, args)
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]   File "/usr/lib/python2.7/logging/handlers.py", line 118, in __init__
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]     BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]   File "/usr/lib/python2.7/logging/handlers.py", line 65, in __init__
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]     logging.FileHandler.__init__(self, filename, mode, encoding, delay)
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]   File "/usr/lib/python2.7/logging/__init__.py", line 897, in __init__
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]     StreamHandler.__init__(self, self._open())
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]   File "/usr/lib/python2.7/logging/__init__.py", line 916, in _open
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195]     stream = open(self.baseFilename, self.mode)
[Sat Sep 28 10:50:14 2013] [error] [client 81.102.118.195] IOError: [Errno 13] Permission denied: '/var/log/ckan/ckan.log'

i.e. it starts with "Traceback" and ends with a line <error-type>: <message>.

When asking for help, supply all of these lines - don't just say you have a "500 Server Error".

You could ask here on StackOverflow, using the tag #ckan. Alternatively join the ckan-dev email list and ask there.



来源:https://stackoverflow.com/questions/44074462/ckan-error-server-error-500

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!