在Redhat 6上,我正在尝试使用Apache和WSGI运行Web应用程序(CKAN)。我已经成功安装并配置了应用程序,但每次我点击网址时,都会收到内部服务器错误。堆栈跟踪如下。如果你有线索,请帮忙。
[Sat Jan 17 14:01:39 2015] [error] mod_wsgi (pid=22322): Target WSGI script '/usr/ckanenv/src/ckan/apache1.wsgi' cannot be loaded as Python module.
[Sat Jan 17 14:01:39 2015] [error] mod_wsgi (pid=22322): Exception occurred processing WSGI script '/usr/ckanenv/src/ckan/apache1.wsgi'.
[Sat Jan 17 14:01:39 2015] [error] Traceback (most recent call last):
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/src/ckan/apache1.wsgi", line 9, in <module>
[Sat Jan 17 14:01:39 2015] [error] application = loadapp('config:%s' % config_filepath)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Sat Jan 17 14:01:39 2015] [error] return loadobj(APP, uri, name=name, **kw)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Sat Jan 17 14:01:39 2015] [error] return context.create()
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Sat Jan 17 14:01:39 2015] [error] return self.object_type.invoke(self)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Sat Jan 17 14:01:39 2015] [error] return fix_call(context.object, context.global_conf, **context.local_conf)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/paste/deploy/util.py", line 56, in fix_call
[Sat Jan 17 14:01:39 2015] [error] val = callable(*args, **kw)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/src/ckan/ckan/config/middleware.py", line 110, in make_app
[Sat Jan 17 14:01:39 2015] [error] who_parser.parse(open(app_conf['who.config_file']))
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/repoze/who/config.py", line 80, in parse
[Sat Jan 17 14:01:39 2015] [error] obj = self._makePlugin(name, IPlugin, options)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/repoze/who/config.py", line 39, in _makePlugin
[Sat Jan 17 14:01:39 2015] [error] obj = obj(**options)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/repoze/who/plugins/openid/__init__.py", line 57, in make_identification_plugin
[Sat Jan 17 14:01:39 2015] [error] sreg_optional = sreg_optional)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/repoze/who/plugins/openid/identification.py", line 87, in __init__
[Sat Jan 17 14:01:39 2015] [error] self.store = filestore.FileOpenIDStore(store_file_path)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/openid/store/filestore.py", line 150, in __init__
[Sat Jan 17 14:01:39 2015] [error] self._setup()
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/openid/store/filestore.py", line 158, in _setup
[Sat Jan 17 14:01:39 2015] [error] _ensureDir(self.nonce_dir)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib/python2.6/site-packages/openid/store/filestore.py", line 104, in _ensureDir
[Sat Jan 17 14:01:39 2015] [error] os.makedirs(dir_name)
[Sat Jan 17 14:01:39 2015] [error] File "/usr/ckanenv/lib64/python2.6/os.py", line 157, in makedirs
[Sat Jan 17 14:01:39 2015] [error] mkdir(name, mode)
[Sat Jan 17 14:01:39 2015] [error] OSError: [Errno 13] Permission denied: '/tmp/sstore/nonces'
答案 0 :(得分:0)
您需要以具有适当权限的用户身份运行CKAN实例,或者您可以为用户添加给定目录的权限。