[TRUNK] Error when go to a server with cached db_name

Bug #1318253 reported by Nhomar - Vauxoo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

How to reproduce.

- Start server with -r test1
- Login with db_name1 on host localhost:8069.
- Stop Server.
- GO to other browser.
- Run the server with other user i.e.: -r test2
- Create a new db called db_name2
- Go to previous browse (not the one you just vreated the db).

What I got,

This message appear on browser:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

This traceback on server (see the wrong db_name):

2014-05-10 21:57:01,312 15555 ERROR db_name1 werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/service/server.py", line 273, in app
    return self.app(e, s)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/service/wsgi_server.py", line 215, in application
    return application_unproxied(environ, start_response)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/service/wsgi_server.py", line 201, in application_unproxied
    result = handler(environ, start_response)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py", line 1102, in __call__
    return self.dispatch(environ, start_response)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py", line 1079, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py", line 1231, in dispatch
    ir_http = request.registry['ir.http']
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py", line 220, in registry
    return openerp.modules.registry.RegistryManager.get(self.db) if self.db else None
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/modules/registry.py", line 269, in get
    update_module)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/modules/registry.py", line 299, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/modules/loading.py", line 282, in load_modules
    graph.add_module(cr, 'base', force)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/modules/graph.py", line 88, in add_module
    self.add_modules(cr, [module], force)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/modules/graph.py", line 129, in add_modules
    self.update_from_db(cr)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/modules/graph.py", line 77, in update_from_db
    ' WHERE name IN %s',(tuple(additional_data),)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/sql_db.py", line 156, in wrapper
    return f(self, *args, **kwargs)
  File "/home/nhomar/Instancias/trunk/server-trunk/openerp/sql_db.py", line 221, in execute
    res = self._obj.execute(query, params)
ProgrammingError: permission denied for relation ir_module_module

What do I expect:

I expect cache cleaned and login and password screen for new db_name.

Regards.

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

Just For the records:

Starting the server with --db-filter=db_name2 the problem doesn't happend then IMHO the solution may be an "Explicit" error message that says that at least on logger.

I still consider tis a little bug (with lower priority) but a bug at the end of the day.

Regards.

Revision history for this message
Gustavo Adrian Marino (gamarino) wrote : Re: [Bug 1318253] Re: [TRUNK] Error when go to a server with cached db_name
Download full text (4.5 KiB)

Nhomar:
Most probably it will not be fixed.

Try the attached patch
Regards

Gustavo Adrian Marino

Mobile: +54 911 5498 2515

Email: <email address hidden>

Skype: gustavo.adrian.marino

2014-05-10 19:10 GMT-03:00 Nhomar - Vauxoo <email address hidden>:

> Just For the records:
>
> Starting the server with --db-filter=db_name2 the problem doesn't
> happend then IMHO the solution may be an "Explicit" error message that
> says that at least on logger.
>
> I still consider tis a little bug (with lower priority) but a bug at the
> end of the day.
>
> Regards.
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Server.
> https://bugs.launchpad.net/bugs/1318253
>
> Title:
> [TRUNK] Error when go to a server with cached db_name
>
> Status in OpenERP Server:
> New
>
> Bug description:
> How to reproduce.
>
> - Start server with -r test1
> - Login with db_name1 on host localhost:8069.
> - Stop Server.
> - GO to other browser.
> - Run the server with other user i.e.: -r test2
> - Create a new db called db_name2
> - Go to previous browse (not the one you just vreated the db).
>
> What I got,
>
> This message appear on browser:
>
> Internal Server Error
>
> The server encountered an internal error and was unable to complete
> your request. Either the server is overloaded or there is an error in
> the application.
>
> This traceback on server (see the wrong db_name):
>
> 2014-05-10 21:57:01,312 15555 ERROR db_name1 werkzeug: Error on request:
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py",
> line 177, in run_wsgi
> execute(self.server.app)
> File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py",
> line 165, in execute
> application_iter = app(environ, start_response)
> File
> "/home/nhomar/Instancias/trunk/server-trunk/openerp/service/server.py",
> line 273, in app
> return self.app(e, s)
> File
> "/home/nhomar/Instancias/trunk/server-trunk/openerp/service/wsgi_server.py",
> line 215, in application
> return application_unproxied(environ, start_response)
> File
> "/home/nhomar/Instancias/trunk/server-trunk/openerp/service/wsgi_server.py",
> line 201, in application_unproxied
> result = handler(environ, start_response)
> File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py",
> line 1102, in __call__
> return self.dispatch(environ, start_response)
> File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py",
> line 1079, in __call__
> return self.app(environ, start_wrapped)
> File "/usr/local/lib/python2.7/dist-packages/werkzeug/wsgi.py", line
> 579, in __call__
> return self.app(environ, start_response)
> File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py",
> line 1231, in dispatch
> ir_http = request.registry['ir.http']
> File "/home/nhomar/Instancias/trunk/server-trunk/openerp/http.py",
> line 220, in registry
> return openerp.modules.registry.RegistryManager.get(self.db) if
> self.db else None
> File
> "/home/nhomar/Instancias/trunk/server-trunk/openerp/modules/registry.py",
> line 2...

Read more...

Revision history for this message
ben Hier (benniehier) wrote :

I think it's a major issue.

 If the DB changes all anonymous users that previously were on the server see this error. It happens to my clients who want to visit the odoo generated website.

in General:
If odoo generates a website it must be reachable and not generating some totally unclear message that looks like an idiot has created the website.

People want to see a nice well designed website and not this error page:
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Temporary browser solution I figured out:
removing the cookies helps, but I cannot tell all my customers to remove cookies when the system needs another DB (e.g. after an update).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.