在AWS上设置CKAN - 500内部服务器错误

时间:2013-07-24 21:19:05

标签: python apache amazon-web-services wsgi ckan

我正在尝试使用此处发布的路线在AWS上设置基本的CKAN网站:https://github.com/okfn/ckan/wiki/How-to-Install-CKAN-2.0-from-source-on-Ubuntu-12.04-on-EC2#create-ckan-users

在完成本教程后,我正坐在这里盯着500 Internal Server Error页面。长号。

我是使用Python进行Web应用程序的新手,并且还没有真正理解wsgi脚本,所以请原谅我,如果我遗漏了一些明显的东西。这是我的错误日志中的回溯。任何关于我应该看的地方的提示都将非常感激。干杯。

>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] mod_wsgi (pid=13943): Target WSGI script '/home/ubuntu/public_html/mysite.com/pyenv/bin/mothership.py' can$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] mod_wsgi (pid=13943): Exception occurred processing WSGI script '/home/ubuntu/public_html/mysite.com/pyenv$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] Traceback (most recent call last):
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]   File "/home/ubuntu/public_html/mysite.com/pyenv/bin/mothership.py", line 10, in <module>
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]     fileConfig(config_filepath)
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]   File "/home/ubuntu/public_html/mysite.com/pyenv/lib/python2.7/site-packages/paste/script/util/logging_co$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]     handlers = _install_handlers(cp, formatters)
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]   File "/home/ubuntu/public_html/mysite.com/pyenv/lib/python2.7/site-packages/paste/script/util/logging_co$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]     h = apply(klass, args)
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] TypeError: __init__() takes at most 2 arguments (5 given)
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] mod_wsgi (pid=13942): Target WSGI script '/home/ubuntu/public_html/mysite.com/pyenv/bin/mothership.py' can$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] mod_wsgi (pid=13942): Exception occurred processing WSGI script '/home/ubuntu/public_html/mysite.com/pyenv$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] Traceback (most recent call last):
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]   File "/home/ubuntu/public_html/mysite.com/pyenv/bin/mothership.py", line 10, in <module>
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]     fileConfig(config_filepath)
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]   File "/home/ubuntu/public_html/mysite.com/pyenv/lib/python2.7/site-packages/paste/script/util/logging_co$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]     handlers = _install_handlers(cp, formatters)
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]   File "/home/ubuntu/public_html/mysite.com/pyenv/lib/python2.7/site-packages/paste/script/util/logging_co$
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253]     h = apply(klass, args)
>[Wed Jul 24 21:02:40 2013] [error] [client 192.245.194.253] TypeError: __init__() takes at most 2 arguments (5 given)

1 个答案:

答案 0 :(得分:3)

This mailing thread seems to be the answer。 (我通过谷歌搜索部分追溯来找到它。)

您的配置ini文件中的日志记录配置。日志记录需要看起来像这样:

args = ("/var/log/ckan/[yoursite.com]/ckan.log", "a", 20000000, 9)