Howto: Installation of OpenERP on CentOS

guest's picture

Re: Howto: Installation of OpenERP on CentOS

I'm having issues running the openerp-server with su - openerp. It's generating some python error messages:
openerp@server1 [~]# openerp-server -s
[2010-05-29 10:14:25,862] INFO:server:version - 5.0.6
[2010-05-29 10:14:25,863] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons
[2010-05-29 10:14:25,864] INFO:server:database hostname - 'localhost'
[2010-05-29 10:14:25,865] INFO:server:database port - 5432
[2010-05-29 10:14:25,865] INFO:server:database user - openerp
[2010-05-29 10:14:25,866] INFO:objects:initialising distributed objects services
[2010-05-29 10:14:26,624] INFO:dbpool:Connecting to openerp
sh: bzr: command not found
[2010-05-29 10:14:26,742] ERROR:dbpool:[01]:
[2010-05-29 10:14:26,743] ERROR:dbpool:[02]: Environment Information :
[2010-05-29 10:14:26,744] ERROR:dbpool:[03]: System : Linux-2.6.18-164.11.1.el5-x86_64-with-redhat-5.5-Final
[2010-05-29 10:14:26,744] ERROR:dbpool:[04]: OS Name : posix
[2010-05-29 10:14:26,745] ERROR:dbpool:[05]: LSB Version:       :core-3.1-amd64:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-noarch
[2010-05-29 10:14:26,745] ERROR:dbpool:[06]: Distributor ID:    CentOS
[2010-05-29 10:14:26,746] ERROR:dbpool:[07]: Description:       CentOS release 5.5 (Final)
[2010-05-29 10:14:26,746] ERROR:dbpool:[08]: Release:   5.5
[2010-05-29 10:14:26,747] ERROR:dbpool:[09]: Codename:  Final
[2010-05-29 10:14:26,747] ERROR:dbpool:[10]: Operating System Release : 2.6.18-164.11.1.el5
[2010-05-29 10:14:26,748] ERROR:dbpool:[11]: Operating System Version : #1 SMP Wed Jan 20 07:32:21 EST 2010
[2010-05-29 10:14:26,748] ERROR:dbpool:[12]: Operating System Architecture : 64bit
[2010-05-29 10:14:26,749] ERROR:dbpool:[13]: Operating System Locale : en_US.utf
[2010-05-29 10:14:26,749] ERROR:dbpool:[14]: Python Version : 2.4.3
[2010-05-29 10:14:26,750] ERROR:dbpool:[15]: OpenERP-Server Version : 5.0.6
[2010-05-29 10:14:26,750] ERROR:dbpool:[16]: Last revision No. & ID :
[2010-05-29 10:14:26,751] ERROR:dbpool:[17]: Unable to connect to openerp: could not translate host name "localhost" to address: Name or service not known
Traceback (most recent call last):
  File "./openerp-server.py", line 111, in ?
    pooler.get_db_and_pool(db, update_module=tools.config['init'] or tools.config['update'])
  File "/usr/lib/python2.4/site-packages/openerp-server/pooler.py", line 29, in get_db_and_pool
    db = get_db_only(db_name)
  File "/usr/lib/python2.4/site-packages/openerp-server/pooler.py", line 72, in get_db_only
    db = sql_db.db_connect(db_name)
  File "/usr/lib/python2.4/site-packages/openerp-server/sql_db.py", line 243, in db_connect
    return PoolManager.get(db_name)
  File "/usr/lib/python2.4/site-packages/openerp-server/sql_db.py", line 227, in get
    cls._pools[db_name] = ConnectionPool(ThreadedConnectionPool(1, cls.maxconn, cls.dsn(db_name)), db_name)
  File "/usr/lib64/python2.4/site-packages/psycopg2/pool.py", line 167, in __init__
    AbstractConnectionPool.__init__(
  File "/usr/lib64/python2.4/site-packages/psycopg2/pool.py", line 84, in __init__
    self._connect()
  File "/usr/lib64/python2.4/site-packages/psycopg2/pool.py", line 88, in _connect
    conn = psycopg2.connect(*self._args, **self._kwargs)
psycopg2.OperationalError: could not translate host name "localhost" to address: Name or service not known
No issues when I quit su - openerp and run the service as root:
[2010-05-29 10:16:38,944] INFO:server:version - 5.0.6
[2010-05-29 10:16:38,944] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons
[2010-05-29 10:16:38,945] INFO:server:database hostname - localhost
[2010-05-29 10:16:38,946] INFO:server:database port - 5432
[2010-05-29 10:16:38,947] INFO:server:database user - root
[2010-05-29 10:16:38,948] INFO:objects:initialising distributed objects services
[2010-05-29 10:16:39,703] INFO:web-services:starting XML-RPC services, port 8069
[2010-05-29 10:16:39,704] INFO:web-services:starting NET-RPC service, port 8070
[2010-05-29 10:16:39,705] INFO:web-services:the server is running, waiting for connections... 
Did I miss a step somewhere?
guest's picture

Re: Howto: Installation of OpenERP on CentOS

please i have issues and i dont know how to resolve these thank you and wonderful how-to [root@int openerp]# su - openerp [openerp@int ~]$ openerp-server -s [2010-05-18 17:58:27,872] INFO:server:version - 5.0.10 [2010-05-18 17:58:27,873] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons [2010-05-18 17:58:27,873] INFO:server:database hostname - 'localhost' [2010-05-18 17:58:27,873] INFO:server:database port - 5432 [2010-05-18 17:58:27,873] INFO:server:database user - openerp [2010-05-18 17:58:27,873] INFO:objects:initialising distributed objects services Traceback (most recent call last): File "./openerp-server.py", line 99, in ? pooler.get_db_and_pool(db, update_module=tools.config['init'] or tools.config['update']) File "/usr/lib/python2.4/site-packages/openerp-server/pooler.py", line 40, in get_db_and_pool addons.load_modules(db, force_demo, status, update_module) File "/usr/lib/python2.4/site-packages/openerp-server/addons/__init__.py", line 678, in load_modules cr = db.cursor() File "/usr/lib/python2.4/site-packages/openerp-server/sql_db.py", line 316, in cursor return Cursor(self._pool, self.dbname, serialized=serialized) File "/usr/lib/python2.4/site-packages/openerp-server/sql_db.py", line 91, in __init__ self._cnx = pool.borrow(dsn(dbname)) File "/usr/lib/python2.4/site-packages/openerp-server/sql_db.py", line 227, in _locked return fun(self, *args, **kwargs) File "/usr/lib/python2.4/site-packages/openerp-server/sql_db.py", line 279, in borrow result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection) psycopg2.OperationalError: FATAL: Ident authentication failed for user "openerp"
guest's picture

Re: Howto: Installation of OpenERP on CentOS

This worked great for the openerp-server, but would not work for openerp-web. I can't seem to find the populate.sh script and easy_install fails with:
Searching for pyparsing>=1.5.0
Reading http://cheeseshop.python.org/pypi/pyparsing/
Reading http://pyparsing.wikispaces.com/
error: Download error: (-2, 'Name or service not known')
guest's picture

Re: Howto: Installation of OpenERP on CentOS

Hello, Thank you for your howto. I tried it a first time last year without any problem. Today, I install it again but I have some problems whith ./populate.sh command. The error is : Reading http://pyparsing.wikispaces.com/ error: Download error: (-2, 'Name or service not known') Can you, please, help me ?
guest's picture

Re: Howto: Installation of OpenERP on CentOS

Perhaps this is a little late to help this poster, but for others arriving here through google:

Easy_install has problems with wikispaces, according to http://pyparsing.wikispaces.com/Download+and+Installation

Just run easy_install http://cheeseshop.python.org/packages/source/p/pyparsing/pyparsing-1.5.0.tar.gz manually, and afterwards run the easy_install -U openerp_web again. It should get past this point now.

guest's picture

Re: Howto: Installation of OpenERP on CentOS

Why does wikispaces don't fix this problem until now ? This minor error cause so much headaches to many people. By the way this "how to" was very use full, thank's guys for all you have done. Instalation Open ERP on CentOS is as easy as on Ubuntu. Maybe because of this bug everything became horrible.
guest's picture

Re: Howto: Installation of OpenERP on CentOS

Thanks!! just in time for me
guest's picture

Re: Howto: Installation of OpenERP on CentOS

Hello thanks for this Howto. The only problem i had in the beginning after i installed OpenERP i always got Starting openerp-server: failed. But found the process running through ps axu. OpenERP had problems to write it's pid file into /var/run because of a missing directory. Two more commands are needed to finalize the insallation before you can use the start service command # mkdir /var/run/openerp # chown openerp.openerp /var/run/openerp Greetings Mike van Stijn
bdeferme's picture

Re: Howto: Installation of OpenERP on CentOS

Thx Mike,

I updated the post, probably forgot about this, it's such a long post and people tend to forget :-)

guest's picture

Re: Howto: Installation of OpenERP on CentOS

The webserver runs OK but I'm still having issues running the web service. It's generating the message below. Any idea what I've could have done wrong?

root@server1 [/var/run]# openerp-web -s
Traceback (most recent call last):
File "/usr/bin/openerp-web", line 5, in ?
from pkg_resources import load_entry_point
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2479, in ?
working_set.require(__requires__)
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 585, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 483, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pyparsing>=1.5.0

or

root@server1 [/var/run]# service openerp-web start
Starting openerp-web: failed.
root@server1 [/var/run]#

guest's picture

This is just what I needed

This is exactly what I wanted, though some of the instructions are not immediately obvious where it said check the attachments It took me some time to find them (at the bottom of the page) also I needed to go yum install bzr I am stuck in that after editing the openerp_serverrc I get psycopg2.OperationalError: FATAL: Ident authentication failed for user "openerp" at the end of a load of error messages when trying to start I will try and work out what I have done wrong here. Mintra
guest's picture

Re: help for the openerp installaiton on centos

Hi, If you have successfully installed and run OPENERP on centos 5.2 , then could you please forward me the details as I'm struggling to install it on centos 5.2 based on the details from http://www.bdeferme.net/blog/2009/10/howto-installation-openerp-centos and I'm stuck at vi ~/.openerp_serverrc. Tried all possible means . Thanks for your help in advance. Rgds Kamal
guest's picture

Pingback

[...] effort – OpenERP on CentOS by @bdeferme http://www.bdeferme.net/blog/2009/10/howto-installation-openerp-centos Kudos! [...]

guest's picture

Pingback

[...] effort - OpenERP on CentOS by @bdeferme http://www.bdeferme.net/blog/2009/10/howto-installation-openerp-centos [...]

guest's picture

Re: Howto: Installation of OpenERP on CentOS

Depending of your needs, you may want to check Tryton: http://www.tryton.org.
guest's picture

Re: Howto: Installation of OpenERP on CentOS

I'm having problem starting the openerp-web, here's my error when I start it. [root@erp init.d]# service openerp-web start Starting openerp-web: /etc/init.d/openerp-web: line 45: start-stop-daemon: command not found failed. Thank you in advance
guest's picture

Re: Howto: Installation of OpenERP on CentOS

I'm having problem starting the openerp-web, here's my error when I start it. [root@erp init.d]# service openerp-web start Starting openerp-web: /etc/init.d/openerp-web: line 45: start-stop-daemon: command not found failed. Thank you in advance
guest's picture

Re: Howto: Installation of OpenERP on CentOS

dave@ its because the "start-stop-daemon" cmd isn't found on RHEL/CentOS systems. Use the scripts found here: http://www.bdeferme.net//projects/howto/installation-of-openerp-centos