This question has been flagged
4 Replies
18843 Views

This error is got when I try to  start the openerp-server using thia command : sudo ./openerp-server

Can anyone help me to resolve this?

Thank You.

Avatar
Discard
Best Answer

Hi, No need to add sudo to run the openerp-server. Try running it from a normal user.
For security reasons, it doesnt allow you to proceed further and throws "Running as user 'root' is a security risk, aborting."
Try removing sudo from command (i.e) ./openerp-server

 

Avatar
Discard
Author

@Dhinesh thankx for the reply, I tried with " ./openerp-server " but no luck. getting this error, _____Traceback (most recent call last): File "./openerp-server", line 5, in openerp.cli.main() File "/home/zone/openerp-8.0-29e08a2/openerp/cli/__init__.py", line 71, in main o.run(args) File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 174, in run main(args) File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 139, in main openerp.tools.config.parse_config(args) File "/home/zone/openerp-8.0-29e08a2/openerp/tools/config.py", line 336, in parse_config openerp.netsvc.init_logger() File "/home/zone/openerp-8.0-29e08a2/openerp/netsvc.py", line 136, in init_logger resetlocale() File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1084, in resetlocale for ln in get_locales(): File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1052, in get_locales lang = locale.getdefaultlocale()[0] File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale return _parse_localename(localename) File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8

Best Answer

you should add a user ie "odoo" or  "openerp" to run the server

sudo adduser --system --home=/opt/odoo --group odoo

home ist the path of your odoo instalation.

sudo su - odoo -s /bin/bash
./openerp-server

another way could be, adding a init script. ie http://www.theopensourcerer.com/wp-content/uploads/2014/09/odoo-server

 

 

Avatar
Discard
Author

Thank You @Fabian, it helped me… :)

Best Answer

try to login with openerp user

su - openerp
and then try to start with it.

OR if you need to start the openerp from root

sudo /etc/init.d/openerp-server start

Avatar
Discard
Best Answer

If you really want to run openerp-server as a root for a development purpose, you might try to change function check_root_user, which is in server/openerp/cli/server.py file so that it returns True instead of sys.exit(1). But this should be used strictly in a development enviroment!

Avatar
Discard