← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 711190] Re: Using the CherryPy file session backend causes errors on server restart

 

Check in the openerp-web.cfg file if you have the next lines:


tools.sessions.on = True
tools.sessions.persistent = False


Best Regards

-- 
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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client-web/+bug/711190/+subscriptions


References