I posted about a problem with v5 not being able to use multiple databases from 
the client back in Feb.  This is the post  
http://www.openobject.com/forum/topic9872.html and I opened a bug on the 
problem.

Today I checked the latest code for v5 server(revno 1821) and client(revno 981) 
and this problem still persists.

I start the server without a db_name or db_name=False then I try to connect to 
existing databases that I created through the client.  I cannot connect to any 
preexisting database.  If I create a new database I can connect to it as long 
as I do not restart the server.  

Looking at the processing, the client sends sql to the server to verify the 
login credentials.  But once that is done I would expect the server to then 
load up the objects into server memory.  I do not see this happening and of 
course then you get "Object xxxx doesn't exist" errors.

Here is server and client output from a session.  

SERVER
# bin/openerp-server.py --db_host 192.168.1.28 --db_port 5432 -r openerp -w "" 
--addons-path=bin/addons --log-level=debug_rpc
[2009-06-02 22:45:00,921] INFO:server:version - 5.0.0
[2009-06-02 22:45:00,921] INFO:server:addons_path - 
/usr/local/openerp-server-5.0.0/bin/addons
[2009-06-02 22:45:00,921] INFO:server:database hostname 
- 192.168.1.28
[2009-06-02 22:45:00,921] INFO:server:database port - 
5432
[2009-06-02 22:45:00,922] INFO:server:database user - 
openerp
[2009-06-02 22:45:00,922] INFO:objects:initialising 
distributed objects services
[2009-06-02 22:45:01,184] DEBUG:psycopg2:installed. 
Logging using Python logging module
[2009-06-02 22:45:01,188] INFO:web-services:starting 
XML-RPC services, port 8069
[2009-06-02 22:45:01,189] INFO:web-services:starting 
NET-RPC service, port 8070
[2009-06-02 22:45:01,189] INFO:web-services:the server 
is running, waiting for connections...
[2009-06-02 22:45:16,568] DEBUG_RPC:service:'db'
[2009-06-02 22:45:16,568] DEBUG_RPC:method:'list'
[2009-06-02 22:45:16,569] DEBUG_RPC:params:()
[2009-06-02 22:45:16,569] INFO:dbpool:Connecting to 
template1
[2009-06-02 22:45:16,588] INFO:dbpool:Closing all 
connections to template1
[2009-06-02 22:45:16,610] 
DEBUG_RPC:result:['openerp', 'test0', 'test1', 'test2', 'test3', 
'test4']
[2009-06-02 22:45:16,619] DEBUG_RPC:service:'db'
[2009-06-02 22:45:16,619] 
DEBUG_RPC:method:'server_version'
[2009-06-02 22:45:16,619] DEBUG_RPC:params:()
[2009-06-02 22:45:16,619] DEBUG_RPC:result:'5.0.0'
[2009-06-02 22:45:27,411] DEBUG_RPC:service:'common'
[2009-06-02 22:45:27,411] DEBUG_RPC:method:'login'
[2009-06-02 22:45:27,411] 
DEBUG_RPC:params:('test4', 'admin', 'admin')
[2009-06-02 22:45:27,412] INFO:dbpool:Connecting to 
test4
[2009-06-02 22:45:27,447] 
DEBUG_RPC:exception:u"'NoneType' object has no attribute '_poolJobs'"
[2009-06-02 22:46:03,764] DEBUG_RPC:service:'db'
[2009-06-02 22:46:03,765] DEBUG_RPC:method:'list'
[2009-06-02 22:46:03,765] DEBUG_RPC:params:()
[2009-06-02 22:46:03,765] INFO:dbpool:Connecting to 
template1
[2009-06-02 22:46:03,788] INFO:dbpool:Closing all 
connections to template1
[2009-06-02 22:46:03,795] 
DEBUG_RPC:result:['openerp', 'test0', 'test1', 'test2', 'test3', 
'test4']
[2009-06-02 22:46:03,799] DEBUG_RPC:service:'db'
[2009-06-02 22:46:03,799] 
DEBUG_RPC:method:'server_version'
[2009-06-02 22:46:03,799] DEBUG_RPC:params:()
[2009-06-02 22:46:03,800] DEBUG_RPC:result:'5.0.0'
[2009-06-02 22:46:08,535] DEBUG_RPC:service:'common'
[2009-06-02 22:46:08,535] DEBUG_RPC:method:'login'
[2009-06-02 22:46:08,535] 
DEBUG_RPC:params:('test4', 'admin', 'admin')
[2009-06-02 22:46:08,545] INFO:web-service:successful 
login from 'admin' using database 'test4'
[2009-06-02 22:46:08,545] DEBUG_RPC:result:1
[2009-06-02 22:46:08,546] DEBUG_RPC:service:'object'
[2009-06-02 22:46:08,546] DEBUG_RPC:method:'execute'
[2009-06-02 22:46:08,547] 
DEBUG_RPC:params:('test4', 1, 'admin', 'res.users', 
'context_get')
[2009-06-02 22:46:08,561] DEBUG_RPC:exception:u"warning 
-- Object Error\n\nObject res.users doesn't exist"

CLIENT
$ openerp-client -v

(openerp-client.py:24533): libglade-WARNING **: Error 
loading image: Failed to open file 
'/usr/share/openerp-client/pixmaps/openerp_logo.png': No such file or 
directory

(openerp-client.py:24533): libglade-WARNING **: could not 
convert string to type `GdkPixbuf' for property `pixbuf'
Traceback (most recent call last):
  File 
"/usr/lib/python2.5/site-packages/openerp-client/modules/gui/main.py", line 
1033, in sig_login
    log_response = rpc.session.login(*res)
  File "/usr/lib/python2.5/site-packages/openerp-client/rpc.py", line 215, 
in login
    res = _sock.myreceive()
  File "/usr/lib/python2.5/site-packages/openerp-client/tiny_socket.py", 
line 91, in myreceive
    raise Myexception(str(res[0]), 
str(res[1]))
tiny_socket.Myexception: ("'NoneType' object has no attribute 
'_poolJobs'", 'Traceback (most recent call last):\n  File 
"/usr/local/openerp-server-5.0.0/bin/netsvc.py", line 235, in dispatch\n  
  result = LocalService(service_name)(method, 
*params)\n  File "/usr/local/openerp-server-5.0.0/bin/netsvc.py", line 
74, in __call__\n    return getattr(self, 
method)(*params)\n  File 
"/usr/local/openerp-server-5.0.0/bin/service/web_services.py", line 355, in 
login\n    res = security.login(db, login, password)\n  
File "/usr/local/openerp-server-5.0.0/bin/service/security.py", line 29, in 
login\n    cr = pooler.get_db(db).cursor()\n  
File "/usr/local/openerp-server-5.0.0/bin/pooler.py", line 77, in 
get_db\n    return 
get_db_and_pool(db_name)[0]\n  File 
"/usr/local/openerp-server-5.0.0/bin/pooler.py", line 54, in 
get_db_and_pool\n    
pool.get(\'ir.cron\')._poolJobs(db.dbname)\nAttributeError: 
\'NoneType\' object has no attribute \'_poolJobs\'\n')
WARNING:rpc.exception:CODE warning -- Object Error

Object res.users doesn't exist: Object Error
Traceback (most recent call last):
  File 
"/usr/lib/python2.5/site-packages/openerp-client/modules/gui/main.py", line 
1033, in sig_login
    log_response = rpc.session.login(*res)
  File "/usr/lib/python2.5/site-packages/openerp-client/rpc.py", line 235, 
in login
    self.context_reload()
  File "/usr/lib/python2.5/site-packages/openerp-client/rpc.py", line 283, 
in context_reload
    self.context = self.rpc_exec_auth('/object', 'execute', 
'res.users', 'context_get') or {}
  File "/usr/lib/python2.5/site-packages/openerp-client/rpc.py", line 169, 
in rpc_exec_auth
    return sock.exec_auth(method, *args)
  File "/usr/lib/python2.5/site-packages/openerp-client/rpc.py", line 112, 
in exec_auth
    res = self.execute(method, self._uid, self._passwd, *args)
  File "/usr/lib/python2.5/site-packages/openerp-client/rpc.py", line 118, 
in execute
    res = self._sock.myreceive()
  File "/usr/lib/python2.5/site-packages/openerp-client/tiny_socket.py", 
line 91, in myreceive
    raise Myexception(str(res[0]), 
str(res[1]))
tiny_socket.Myexception: ("warning -- Object Error\n\nObject res.users 
doesn't exist", 'Traceback (most recent call last):\n  File 
"/usr/local/openerp-server-5.0.0/bin/netsvc.py", line 235, in dispatch\n  
  result = LocalService(service_name)(method, 
*params)\n  File "/usr/local/openerp-server-5.0.0/bin/netsvc.py", line 
74, in __call__\n    return getattr(self, 
method)(*params)\n  File 
"/usr/local/openerp-server-5.0.0/bin/service/web_services.py", line 496, in 
execute\n    res = service.execute(db, uid, object, method, 
*args)\n  File "/usr/local/openerp-server-5.0.0/bin/osv/osv.py", line 
63, in wrapper\n    self.abortResponse(1, inst.name, 
inst.exc_type, inst.value)\n  File 
"/usr/local/openerp-server-5.0.0/bin/netsvc.py", line 59, in 
abortResponse\n    raise Exception("%s -- 
%s\\n\\n%s"%(origin, description, details))\nException: warning 
-- Object Error\n\nObject res.users doesn\'t exist\n')
WARNING:rpc.exception:CODE warning -- Object Error


The only way that I can get v5 code to connect to a preexisting database is if 
I start the server and specify the one database on the command line or in the 
config file.  But again, then you cannot disconnect and connect to a different 
database - you get the same errors as above.  I do not know what broke v5 but 
we had none of this kind of problem with v4.


Regards,
Gerry




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=37409#37409

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to