config parameter --no-database-list error

Bug #922024 reported by Ferdinand
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Committed
Low
OpenERP Publisher's Warranty Team
Odoo Web (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Web Team

Bug Description

setting this parameter to false raises db access error
* web works somehow after ignoring the message
* GTK no access possible

Tags: maintenance

Related branches

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Dr. Ferdinand ,

I have checked this issue with trunk as well as stable but
I did not get any error so would you please provide more
information regarding this issue like Trace back or Video.

Thanks and waiting for reply!

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Ferdinand (office-chricar) wrote :

I get this error message if I do not enter a database name, which is the case if I open the link from bookmarks

https://<my_ip>/web/webclient/home

Your version of OpenERP is unsupported. Support & maintenance services are available here: OpenERP Entreprise.
OpenERP Server Error
Client Traceback (most recent call last):
  File "/srv/openerp/instances/trunk/openerp-web/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/srv/openerp/instances/trunk/openerp-web/addons/web/controllers/main.py", line 292, in get_list
    dbs = proxy.list()
  File "/srv/openerp/instances/trunk/openerp-web/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/srv/openerp/instances/trunk/openerp-web/addons/web/common/http.py", line 609, in send
    raise fault

Server Access denied.

Changed in openobject-server:
status: Incomplete → New
affects: openobject-server → openerp-web
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello ,

--no-database-list not working with new web ,
Currently -list_db is replaced by --no-database-list
and when you used --no-database-list web give a
following trace back.

Client Traceback (most recent call last):
  File "/home/jir/workspace/trunk6/new_openerp-web/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/home/jir/workspace/trunk6/new_openerp-web/addons/web/controllers/main.py", line 292, in get_list
    dbs = proxy.list()
  File "/home/jir/workspace/trunk6/new_openerp-web/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/home/jir/workspace/trunk6/new_openerp-web/addons/web/common/openerplib/main.py", line 80, in send
    return getattr(service, method)(*args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
server Access denied.

Thank you!

Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Low
status: New → Confirmed
summary: - config parameter list_db = False error
+ config parameter --no-database-list error
Revision history for this message
Ferdinand (office-chricar) wrote :

will the parameter name be changed also in the rc file ?

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> * web works somehow after ignoring the message

Ah yes, that's a fun one: the actual login works, but the db-management screen (which really is created and loaded at the same time) does not correctly handle not being allowed to list databases, and that's the error you can see. Hence the webclient working correctly after you dismiss the error message.

Changed in openerp-web:
status: Confirmed → In Progress
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Should be fixed in trunk as of revision <email address hidden> for the web client

You may want to add a section of the GTK client as well, if it does not work at all.

Changed in openerp-web:
status: In Progress → Fix Released
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

(well I did it).

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Xavier,

This issue does not affect to GTK client.
So I am closing this issue for GTK client.
Currently Gtk working fine.

Thank you!

Changed in openobject-client:
status: New → Invalid
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> This issue does not affect to GTK client. So I am closing this issue for GTK client. Currently Gtk working fine.

Are you sure about that?

because when I start the server with `--no-database-list` and connect to it with the GTK client (latest trunk) I get "Could not connect to server!" error in the login dialog using netrpc (xml-rpc works).

If I just remove the flag on server, things work correctly.

Changed in openobject-client:
status: Invalid → New
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Xavior,

You are right, I missed to check with net-rpc.
Currently in gtk --no-database-list working with xml-rpc not with net-rpc.
So I am confirming this issue for GTK client.

Thank you!

Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Low
status: New → Confirmed
tags: added: maintenance
Revision history for this message
Ravi Gohil (OpenERP) (rgo-openerp) wrote :

Hello,

I checked the issue and found that this issue should be fixed from server side. What I found in my investigation is,
with --no-database-list option, 'AccessDenied' exception is raised from(/server/openerp/service/web_services.py, line#319) and with xmlrpc, it is handled at /server/openerp/wsgi/core.py, line#133 by setting faultCode as 'AccessDenied' which is passed to GTK-Client and GTK-Client handles this faultCode(by checking, if e.faultCode == 'AccessDenied') and returns None.

But in case of netrpc, after raising AccessDenied, a string is returned as 'AccessDenied Access denied.' by server(file server/openerp/service/netrpc_server.py, line#99) and this string will be set as faultCode by GTK-Client(file client/bin/tiny_socket.py, line#108), and this fault code isn't handled by GTK-Client and will not return any thing.

So, on the basis of my above investigation, I am assigning this to server and will propose a fix soon by passing correct faultCode from server.

Thanks.

affects: openobject-client → openobject-server
Changed in openobject-server:
assignee: OpenERP sa GTK client R&D (openerp-dev-gtk) → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Ravi Gohil (OpenERP) (rgo-openerp) wrote :

Hello,

This issue has been fixed in,
Branch: lp:~openerp-dev/openobject-server/6.1-opw-578621-rgo
Rev Id: <email address hidden>
Rev No: 4265

Changed in openobject-server:
status: Confirmed → Fix Committed
Revision history for this message
Carlos Fonseca - 3RP (ccarly) wrote :

SO: Ubuntu 10.12
Build: 1061
Openerp v7.0

Starting openerp server with --no-database-list not working with new web

https://....//#menu_id=106&action=94

BUG:

Client Traceback (most recent call last):
  File "/home/openerp/source/web/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/home/openerp/source/web/addons/web/controllers/main.py", line 708, in get_list
    return db_list(req)
  File "/home/openerp/source/web/addons/web/controllers/main.py", line 87, in db_list
    dbs = proxy.list()
  File "/home/openerp/source/web/addons/web/session.py", line 28, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/home/openerp/source/web/addons/web/session.py", line 95, in send
    raise xmlrpclib.Fault('AccessDenied', str(e))

Server Access denied.

Revision history for this message
Carlos Fonseca - 3RP (ccarly) wrote :

SOLUTION

Replace def db_list within total

def db_list(req):
    h = req.httprequest.environ['HTTP_HOST'].split(':')[0]
    d = h.split('.')[0]
    if openerp.tools.config['list_db']:
     proxy = req.session.proxy("db")
     dbs = proxy.list()
     r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d)
     dbs = [i for i in dbs if re.match(r, i)]
    else:
     dbs = [ d ]
    return dbs

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

@Carlos

I don't understand the solution that you propose. Where is this code supposed to be located ?

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.