0

尝试在 apache2 上部署 ckan 2.0 后出现以下问题。这是来自 apache 的日志:

tail -f /var/log/apache2/demo.ckan.net.error.log
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]     return context.create()
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]   File "/home/ubuntu-ckan-last/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]     return self.object_type.invoke(self)
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]   File "/home/ubuntu-ckan-last/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]     return fix_call(context.object, context.global_conf, **context.local_conf)
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]   File "/home/ubuntu-ckan-last/pyenv/lib/python2.6/site-packages/paste/deploy/util.py", line 56, in fix_call
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]     val = callable(*args, **kw)
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]   File "/home/ubuntu-ckan-last/pyenv/src/ckan/ckan/config/middleware.py", line 104, in make_app
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1]     who_parser.parse(open(app_conf['who.config_file']))
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] KeyError: 'who.config_file'

我关注了有关如何在 apache 或 nginx 上部署 ckan 2.1a 实例的最新文档...

谢谢 !

4

1 回答 1

1

该错误表明它无法找到who.config_file您的 CKAN 配置文件(例如 std.ini):

 [app:main]
 ...
 who.config_file = %(here)s/who.ini

然而,这是访问此配置文件的代码中的第一点,因此它表明配置文件更重要。

检查您的 wsgi 脚本文件是否包含正确的配置文件路径。该行如下所示:

config_file = '/usr/local/demo.ckan.net/pyenv/src/ckan/development.ini'
于 2013-04-03T17:11:28.400 回答