Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

3

Why do I get a 'role does not exist' error after OpenERP installation

By
Neeraj Dhiman
on 2/11/13, 6:02 AM 11,702 views

I am installing openerp at my local server, I have installed it and its dependences but after finishing its installation when i run server 'openerp-server' and acces it using 0.0.0.0:8069/. I got the following error

OpenERP Server Error

Client Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/controllers/main.py", line 709, in get_list
    return db_list(req)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/controllers/main.py", line 88, in db_list
    dbs = proxy.list()
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/netsvc.py", line 295, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/service/web_services.py", line 122, in dispatch
    return fn(*params)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/service/web_services.py", line 351, in exp_list
    cr = db.cursor()
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 477, in cursor
    return Cursor(self._pool, self.dbname, serialized=serialized)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 183, in __init__
    self._cnx = pool.borrow(dsn(dbname))
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 378, in _locked
    return fun(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 433, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
  File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
    connection_factory=connection_factory, async=async)
OperationalError: FATAL:  role "ghrix" does not exist

I haven't recognize this error. One more thing , I haven't edit OpenERP server configuration file . And if I have to edit this file then what are those changes.

Thanks.

6

Denis Ledoux (dle)

--Denis Ledoux (dle)--
1045
| 5 5 7
Ramillies, Belgium
--Denis Ledoux (dle)--


Denis Ledoux (dle)
On 2/11/13, 9:10 AM

This is due to the fact that your user does not exists in your postgres database.

In a command prompt, as root:

su - postgres -c "createuser -s ghrix"
2
Stephane Wirtel (stw)
On 2/11/13, 10:03 AM

By default, the user for your postgresql server is 'postgres'. it's a specific user for this service.

If you install OpenERP in a custom directory, for example /home/USERA, the user will be "USERA", in this case, this user can't have access to the postgresql cluster. If you want to give a such access to your user, just create a role in postgresql via the createuser command and with the access of the 'postgres' user.

After that, you can specify the new user to OpenERP which will use it for the PostgreSQL connection.

0
Geert Jamaer
On 12/9/13, 6:23 PM

Hi I'm experiencing the same problem, but I get a different error message, ... :(

OpenERP Server Error Client Traceback (most recent call last): File "/var/packages/OpenERP7.x/target/openerp/addons/web/http.py", line 195, in dispatch response["result"] = method(self, *self.params) File "/var/packages/OpenERP7.x/target/openerp/addons/web/controllers/main.py", line 1083, in call_button action = self._call_kw(req, model, method, args, {}) File "/var/packages/OpenERP7.x/target/openerp/addons/web/controllers/main.py", line 1071, in _call_kw return getattr(req.session.model(model), method)(args, **kwargs) File "/var/packages/OpenERP7.x/target/openerp/addons/web/session.py", line 43, in proxy result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/var/packages/OpenERP7.x/target/openerp/addons/web/session.py", line 31, in proxy_method result = self.session.send(self.service_name, method, *args) File "/var/packages/OpenERP7.x/target/openerp/addons/web/session.py", line 104, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last): File "/var/packages/OpenERP7.x/target/openerp/addons/web/session.py", line 90, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/local/lib/python2.7/site-packages/openerp/netsvc.py", line 295, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/local/lib/python2.7/site-packages/openerp/service/web_services.py", line 614, in dispatch res = fn(db, uid, params) File "/usr/local/lib/python2.7/site-packages/openerp/osv/osv.py", line 188, in execute_kw return self.execute(db, uid, obj, method, *args, *kw or {}) File "/usr/local/lib/python2.7/site-packages/openerp/osv/osv.py", line 131, in wrapper return f(self, dbname, args, *kwargs) File "/usr/local/lib/python2.7/site-packages/openerp/osv/osv.py", line 198, in execute res = self.execute_cr(cr, uid, obj, method, args, *kw) File "/usr/local/lib/python2.7/site-packages/openerp/osv/osv.py", line 185, in execute_cr return getattr(object, method)(cr, uid, args, *kw) File "/var/packages/OpenERP7.x/target/openerp/addons/base/module/module.py", line 515, in button_immediate_upgrade return self._button_immediate_function(cr, uid, ids, self.button_upgrade, context=context) File "/var/packages/OpenERP7.x/target/openerp/addons/base/module/module.py", line 476, in _button_immediate_function _, pool = pooler.restart_pool(cr.dbname, update_module=True) File "/usr/local/lib/python2.7/site-packages/openerp/pooler.py", line 39, in restart_pool registry = RegistryManager.new(db_name, force_demo, status, update_module) File "/usr/local/lib/python2.7/site-packages/openerp/modules/registry.py", line 214, in new openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 347, in load_modules processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module) File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 258, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 167, in load_module_graph init_module_models(cr, package.name, models) File "/usr/local/lib/python2.7/site-packages/openerp/modules/module.py", line 378, in init_module_models obj.init(cr) File "/var/packages/OpenERP7.x/target/openerp/addons/account_analytic_analysis/account_analytic_analysis.py", line 585, in init from lu, mu)''') File "/usr/local/lib/python2.7/site-packages/openerp/sql_db.py", line 162, in wrapper return f(self, args, *kwargs) File "/usr/local/lib/python2.7/site-packages/openerp/sql_db.py", line 227, in execute res = self._obj.execute(query, params) ProgrammingError: syntax error at or near "with mu" LINE 2: with mu as ^

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/11/13, 6:02 AM
Seen: 11702 times
Last updated: 3/16/15, 8:10 AM