c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #21552
[Bug 711190] Re: Using the CherryPy file session backend causes errors on server restart
I have the same problem, with the released version 6.0.1 on Ubuntu
10.10. The error trace is
[10/Apr/2011:17:24:38] HTTP
Request Headers:
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: application/x-www-form-urlencoded
REFERER: http://localhost:28080/openerp/login?db=demo60&user=admin
HOST: localhost:28080
Content-Length: 57
ACCEPT-CHARSET: UTF-8,*
USER-AGENT: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.04 (lucid) Firefox/3.6.16
CONNECTION: keep-alive
COOKIE: session_id=afa0a84155bf212e306b43fbb3b8a8333796f90d; terp_db=demo60; terp_user=admin
Remote-Addr: 127.0.0.1
ACCEPT-LANGUAGE: en-us,en;q=0.5
ACCEPT-ENCODING: gzip,deflate
KEEP-ALIVE: 115
[10/Apr/2011:17:24:38] HTTP Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py", line 606, in respond
cherrypy.response.body = self.handler()
File "/usr/lib/pymodules/python2.6/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/var/local/software/tmp/openerp-web-6.0.1/openobject/tools/_expose.py", line 182, in func_wrapper
res = func(*args, **kw)
File "/var/local/software/tmp/openerp-web-6.0.1/openobject/controllers/_root.py", line 67, in default
if obj.has_new_modules():
AttributeError: 'NoneType' object has no attribute 'has_new_modules'
[10/Apr/2011:17:24:38] Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py", line 541, in run
self.respond(pi)
File "/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py", line 624, in respond
self.handle_error()
File "/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py", line 746, in handle_error
self.error_response()
File "/var/local/software/tmp/openerp-web-6.0.1/addons/openerp/controllers/root.py", line 35, in _cp_on_error
message = errorpage.render()
AttributeError: 'NoneType' object has no attribute 'render'
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/711190
Title:
Using the CherryPy file session backend causes errors on server
restart
Status in OpenERP Web Client:
Triaged
Bug description:
Hello,
We have run into this issue when deploying the OpenERP web client
behind Apache, where requests from clients are not necessarily served
by the same process every time. However, this error can be reproduced
using the shipped OpenERP development client. I give these steps
below, but simply suggesting that we don't use the file backend is not
a solution.
Steps to reproduce:
1) Add the following lines to openerp-web.cfg (tools.sessions.storage_path must be an existing directory):
[/]
tools.sessions.storage_type = 'file'
tools.sessions.storage_path = '/var/tmp/sessions'
2) Start the OpenERP web client development server.
3) In a browser, navigate to the web interface and log into a database. Open a list view (Sale Orders, for example).
4) Kill the server (i.e. Ctrl-C).
5) Start the server again.
6) Refresh the page in your browser.
Expected behaviour:
The current page will simply be re-displayed.
Actual behaviour:
The following traceback is sent through to the browser:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py", line 606, in respond
cherrypy.response.body = self.handler()
File "/usr/lib/pymodules/python2.6/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/dwa/openerp-6/web/openobject/tools/_expose.py", line 182, in func_wrapper
res = func(*args, **kw)
File "/home/dwa/openerp-6/web/openobject/controllers/_root.py", line 68, in default
if obj.has_new_modules():
AttributeError: 'NoneType' object has no attribute 'has_new_modules'
Refreshing the page again will cause this error to go away. However,
the following traceback is then sent through to the browser:
HTTP Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py", line 606, in respond
cherrypy.response.body = self.handler()
File "/usr/lib/pymodules/python2.6/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/dwa/openerp-6/web/openobject/tools/_expose.py", line 182, in func_wrapper
res = func(*args, **kw)
File "/home/dwa/openerp-6/web/openobject/controllers/_root.py", line 88, in default
return request.handler()
File "/usr/lib/pymodules/python2.6/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/utils.py", line 112, in wrapper
return fn(*args, **kw)
File "/home/dwa/openerp-6/web/openobject/tools/_expose.py", line 182, in func_wrapper
res = func(*args, **kw)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/execute.py", line 21, in index
return actions.execute(action, **data)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/actions.py", line 380, in execute
return action_executor(action, data)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/actions.py", line 268, in act_window
display_menu_tip=display_menu_tip)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/actions.py", line 85, in execute_window
return Form().create(params)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/utils.py", line 112, in wrapper
return fn(*args, **kw)
File "/home/dwa/openerp-6/web/openobject/tools/_expose.py", line 182, in func_wrapper
res = func(*args, **kw)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/form.py", line 195, in create
form = self.create_form(params, tg_errors)
File "/home/dwa/openerp-6/web/addons/openerp/controllers/form.py", line 186, in create_form
return tw.form_view.ViewForm(params, name="view_form", action="/openerp/form/save")
AttributeError: 'module' object has no attribute 'form_view'
The traceback is displayed in a purple box in the browser, with the
OpenERP interface in the background. If the traceback is dismissed,
then the interface is there as normal. However, clicking on any link
that use a list view (i.e. sidebar menu items or module links which
should display a dashboard) will cause it to reappear.
As far as we have determined, the only way to get rid of it is to
clear the session cookie in the browser, or to delete the session
information on the server. Neither of these should be necessary.
References