Skip to Content
Menu
This question has been flagged

 When trying to create a database from user interface it shows : 

Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 122, in dispatch return fn(*params) File "/opt/openerp/server/openerp/service/web_services.py", line 168, in exp_create_database _initialize_db(self, id, db_name, demo, lang, user_password) File "/opt/openerp/server/openerp/service/web_services.py", line 98, in _initialize_db cr.close() File "/opt/openerp/server/openerp/sql_db.py", line 160, in wrapper raise psycopg2.OperationalError(msg) OperationalError: Unable to use a closed cursor.

The sql connection is closed, but I don't know why.

Potential solution 1 :

After further researches, I found that to be able to create database from user interface, you should do the following configuration : 

On openerp-server.conf, you should put on db_password : the password for the role attributed to the "openerp" user, it's that role that gives the openerp user the ability to create databases from user interface. if the two passwords does not match you won't be able to create databases from user interface.

In my case, I found that my openerp-server.conf contained : db_password : False, I changed it into the password of the role gived to openerp user ( createdb), I restarted the server but nothing changes, When trying to create database from user interface, same error occurs.

Potential Solution 2 :

I tried to create database from psql, by accessing postgres from shell, with openerp user, I tried : createdb db_name, the database is created, but I can't log in, I don't know how to attribute my database creation a administrator account, while performing createdb. the functionnal side of this potential solution2, is to be able to perform the same database creation process from user interface, on postgres.

Can anyone please, give me a hand on this 2 potential solutions ? I'm really struggling with this. Thanks.

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 15
5918
1
Mar 15
5329
1
Mar 15
4905
4
Jul 24
33917
1
Nov 17
4964