最近、アプリ サーバーの 1 つがダウンし、再起動したときに Python Beaker モジュールがキャッシュ ファイルの生成を停止しました。
私が得ているエラーは次のとおりです。
Error - <type 'exceptions.KeyError'>: 'ver'
URL: http://127.0.0.1:3002/menuadmin/
File '/opt/csw/lib/python2.6/site-packages/WebError-0.10.1-py2.6.egg/weberror/errormiddleware.py', line 162 in __call__
app_iter = self.application(environ, sr_checker)
File '/opt/csw/lib/python2.6/site-packages/Beaker-1.5.1-py2.6.egg/beaker/middleware.py', line 73 in __call__
return self.app(environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/Beaker-1.5.1-py2.6.egg/beaker/middleware.py', line 152 in __call__
return self.wrap_app(environ, session_start_response)
File '/opt/csw/lib/python2.6/site-packages/repoze.who-1.0.18-py2.6.egg/repoze/who/middleware.py', line 107 in __call__
app_iter = app(environ, wrapper.wrap_start_response)
File '/opt/csw/lib/python2.6/site-packages/inm-1.0.0dev_r2361-py2.6.egg/inm/middleware/middlewarecomponents.py', line 40 in _GroupsMiddleware
return app(environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/inm-1.0.0dev_r2361-py2.6.egg/inm/middleware/middlewarecomponents.py', line 121 in _AIMSStackedUserMiddleware
return app(environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/pulse-0.1.2-py2.6.egg/pulse/middleware.py', line 183 in __call__
return self.app(environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/middleware.py', line 131 in __call__
response = self.app(environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/wsgiapp.py', line 125 in __call__
response = self.dispatch(controller, environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/wsgiapp.py', line 324 in dispatch
return controller(environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/menuadmin-0.9.7dev_r0-py2.6.egg/menuadmin/lib/base.py', line 18 in __call__
return WSGIController.__call__(self, environ, start_response)
File '/opt/csw/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/controllers/core.py', line 217 in __call__
response = self._inspect_call(self.__before__)
File '/opt/csw/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/controllers/core.py', line 107 in _inspect_call
result = self._perform_call(func, args)
File '/opt/csw/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/controllers/core.py', line 60 in _perform_call
return func(**args)
File '/opt/csw/lib/python2.6/site-packages/menuadmin-0.9.7dev_r0-py2.6.egg/menuadmin/controllers/admin.py', line 27 in __before__
mcm.checkout()
File '/opt/csw/lib/python2.6/site-packages/menuadmin-0.9.7dev_r0-py2.6.egg/menuadmin/controllers/pagecache.py', line 35 in checkout
ver = cm.get('ver')
File '/opt/csw/lib/python2.6/site-packages/Beaker-1.5.1-py2.6.egg/beaker/cache.py', line 222 in get
return self._get_value(key, **kw).get_value()
File '/opt/csw/lib/python2.6/site-packages/Beaker-1.5.1-py2.6.egg/beaker/container.py', line 257 in get_value
raise KeyError(self.key)
KeyError: 'ver'
モジュールをさかのぼって調べたところ、キャッシュ ディレクトリは次のとおりです。
cache_dir = /opt/pyapps/menuadmin/data
キャッシュを作成するコード (pagecache.py と呼ばれるメイン アプリケーションのコントローラー モジュール):
cm = Cache('page_cache',type='ext:memcached',url=config['beaker.session.url'],data_dir=config['pylons.cache_dir'])
しかし、このディレクトリにアクセスすると、そこにはキャッシュ ファイルがありません。
ビーカーが突然このエラーをスローする理由を誰か考えられますか? おそらく何らかの権限エラーでしょうか?