我正在使用apache httpd服务器运行CKAN。所以,当我在ckan中启用saml2扩展时。我在apache日志中遇到以下错误,并看到"内部服务器错误"在网页上。
[Sun Jun 18 20:08:35.073897 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] mod_wsgi (pid=2604): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot be loaded as Python module.
[Sun Jun 18 20:08:35.073908 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] mod_wsgi (pid=2604): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
[Sun Jun 18 20:08:35.073922 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] Traceback (most recent call last):
[Sun Jun 18 20:08:35.073934 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/etc/ckan/default/apache.wsgi", line 11, in <module>
[Sun Jun 18 20:08:35.073954 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] application = loadapp('config:%s' % config_filepath)
[Sun Jun 18 20:08:35.073961 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Sun Jun 18 20:08:35.073974 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] return loadobj(APP, uri, name=name, **kw)
[Sun Jun 18 20:08:35.073979 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Sun Jun 18 20:08:35.073987 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] return context.create()
[Sun Jun 18 20:08:35.073992 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Sun Jun 18 20:08:35.074012 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] return self.object_type.invoke(self)
[Sun Jun 18 20:08:35.074017 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Sun Jun 18 20:08:35.074025 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] return fix_call(context.object, context.global_conf, **context.local_conf)
[Sun Jun 18 20:08:35.074030 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
[Sun Jun 18 20:08:35.074039 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] val = callable(*args, **kw)
[Sun Jun 18 20:08:35.074043 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/root/ckan/lib/default/src/ckan/ckan/config/middleware/__init__.py", line 48, in make_app
[Sun Jun 18 20:08:35.074052 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] **app_conf)
[Sun Jun 18 20:08:35.074057 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/root/ckan/lib/default/src/ckan/ckan/config/middleware/pylons_app.py", line 113, in make_pylons_stack
[Sun Jun 18 20:08:35.074065 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] who_parser.parse(open(app_conf['who.config_file']))
[Sun Jun 18 20:08:35.074069 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib/ckan/default/lib/python2.7/site-packages/repoze/who/config.py", line 86, in parse
[Sun Jun 18 20:08:35.074079 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] obj = self._makePlugin(name, IPlugin, options)
[Sun Jun 18 20:08:35.074090 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib/ckan/default/lib/python2.7/site-packages/repoze/who/config.py", line 42, in _makePlugin
[Sun Jun 18 20:08:35.074118 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] obj = obj(**options)
[Sun Jun 18 20:08:35.074127 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/root/ckan/lib/default/src/pysaml2/src/saml2/s2repoze/plugins/sp.py", line 663, in make_plugin
[Sun Jun 18 20:08:35.074137 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] virtual_organization=virtual_organization)
[Sun Jun 18 20:08:35.074142 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/root/ckan/lib/default/src/pysaml2/src/saml2/client_base.py", line 102, in __init__
[Sun Jun 18 20:08:35.074149 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] self.users = Population(identity_cache)
[Sun Jun 18 20:08:35.074154 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/root/ckan/lib/default/src/pysaml2/src/saml2/population.py", line 12, in __init__
[Sun Jun 18 20:08:35.074162 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] self.cache = Cache(cache)
[Sun Jun 18 20:08:35.074166 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/root/ckan/lib/default/src/pysaml2/src/saml2/cache.py", line 26, in __init__
[Sun Jun 18 20:08:35.074174 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] self._db = shelve.open(filename, writeback=True, protocol=2)
[Sun Jun 18 20:08:35.074178 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib64/python2.7/shelve.py", line 239, in open
[Sun Jun 18 20:08:35.074186 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] return DbfilenameShelf(filename, flag, protocol, writeback)
[Sun Jun 18 20:08:35.074190 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib64/python2.7/shelve.py", line 223, in __init__
[Sun Jun 18 20:08:35.074196 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
[Sun Jun 18 20:08:35.074201 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib64/python2.7/anydbm.py", line 85, in open
[Sun Jun 18 20:08:35.074207 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] return mod.open(file, flag, mode)
[Sun Jun 18 20:08:35.074211 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib64/python2.7/dbhash.py", line 19, in open
[Sun Jun 18 20:08:35.074218 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] return bsddb.hashopen(file, flag, mode)
[Sun Jun 18 20:08:35.074223 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] File "/usr/lib64/python2.7/bsddb/__init__.py", line 366, in hashopen
[Sun Jun 18 20:08:35.074230 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] d.open(file, db.DB_HASH, flags, mode)
[Sun Jun 18 20:08:35.074246 2017] [wsgi:error] [pid 2604] [client 10.164.136.102:16035] DBAccessError: (13, 'Permission denied')
答案 0 :(得分:1)
用户httpd似乎正在运行,因为它没有读取或写入who.in中sid_store或identity_cache指定的位置的权限。我怀疑它是后者,但我不确定没有检查代码。