2012-05-22 82 views
0

最近我們的一個應用服務器出現故障,重啓時,Python燒杯模塊停止生成緩存文件。燒杯1.5.1不創建緩存文件

我得到的錯誤是:

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']) 

但是當我訪問這個可怕的ctory,那裏沒有緩存文件。

誰能想到爲什麼燒杯會突然拋出這個錯誤?這可能是某種權限錯誤嗎?

+0

也許新的燒杯不適用於掛架我有另一個麻煩,然後用pip和pip安裝掛架獲取最新的貼紙。 – Denis

+0

林不願意改變燒杯版本的東西,它以前工作,但現在它似乎已經因爲某種原因 – JackalopeZero

回答

0

我不知道究竟是什麼造成了這種情況,某種服務器重置我猜測,但我設法破解程序,並強制它在燒杯目錄中創建一個新的保存文件。