How to resolve the compilation error

Asked by Bushair

Hi,
Am getting the below error when i try to compile using the following statements

bushair@bushair:/opt/openerp-server/bin$ ./openerp-server.py -u all -d testdoc

[2010-05-02 12:30:00,905] INFO:server:version - 5.0.9
[2010-05-02 12:30:00,906] INFO:server:addons_path - /opt/openerp-server/bin/addons
[2010-05-02 12:30:00,906] INFO:server:database hostname - localhost
[2010-05-02 12:30:00,906] INFO:server:database port - 5432
[2010-05-02 12:30:00,906] INFO:server:database user - bushair
[2010-05-02 12:30:00,906] INFO:objects:initialising distributed objects services
Traceback (most recent call last):
  File "./openerp-server.py", line 99, in <module>
    pooler.get_db_and_pool(db, update_module=tools.config['init'] or tools.config['update'])
  File "/opt/openerp-server/bin/pooler.py", line 40, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/opt/openerp-server/bin/addons/__init__.py", line 678, in load_modules
    cr = db.cursor()
  File "/opt/openerp-server/bin/sql_db.py", line 316, in cursor
    return Cursor(self._pool, self.dbname, serialized=serialized)
  File "/opt/openerp-server/bin/sql_db.py", line 91, in __init__
    self._cnx = pool.borrow(dsn(dbname))
  File "/opt/openerp-server/bin/sql_db.py", line 227, in _locked
    return fun(self, *args, **kwargs)
  File "/opt/openerp-server/bin/sql_db.py", line 279, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
psycopg2.OperationalError: FATAL: Ident authentication failed for user "bushair"

How to resolve this error?
Do i need to modify the pg_hba.conf file to resolve this issue?

pg_hba.conf file has the following date for local host.

# Database administrative login by UNIX sockets
local all postgres ident

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all ident
#local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Parthiv Patel (parthiv-patel-deactivatedaccount) said :
#1

for this u need to create user "bushair" in postgresql or use user "postgres" while starting the OpenERP server using --db_user parameter.

Hope this will help.

Regards,
Parthiv

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#2

[openerp@int ~]$ openerp-server -s
[2010-05-18 17:19:04,283] INFO:server:version - 5.0.10
[2010-05-18 17:19:04,283] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons
[2010-05-18 17:19:04,283] INFO:server:database hostname - 'localhost'
[2010-05-18 17:19:04,283] INFO:server:database port - 5432
[2010-05-18 17:19:04,283] INFO:server:database user - openerp
[2010-05-18 17:19:04,284] 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"

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#3

Hello Guys,

As said by Parthiv http://techreceptives.com ,

One should create a user in postgres and it should have the rights to create/connect-to the database.
You may need to alter the password of postgres user, but its rare in cases.

Hope this helps.
Thanks.

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#4

@jay thank you vut i still do not understand what you said besides i used these tutorial in installation
http://www.bdeferme.net/blog/2009/10/howto-installation-openerp-centos#comment-141

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#5

Hi,

These commands may help you:
-Sudo su postgres
-createuser openerp
 superuser role? yes

Try to run the server and connect.
If still it doesn't work:
-alter user postgres with password '123456';

May this help : http://hubpages.com/hub/Installing-OpenERP-on-Ubuntu-904 (for postgres only).
Thanks.

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#6

@jay sorry i did not tell you that i was working on centOS besides when i ran that command

# su - postgres
then
#> createuser --createdb --no-createrole --pwprompt openerp
....
gave me message that:- there is already a user like that openerp

right now am so confused cos i got a deadline to meet which failure is good for business
i have install the web interface but the server still can't work.

are you tell me that postgres comes wit a defualt password of '123456'

pls can we chat on yahoo messenger : <email address hidden>

thank you for the sharp respones

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#7

@jay
[root@int openerp]# su - openerp
[openerp@int ~]$ openerp-server -s
[2010-05-20 10:07:02,267] INFO:server:version - 5.0.10
[2010-05-20 10:07:02,268] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons
[2010-05-20 10:07:02,268] INFO:server:database hostname - 'localhost'
[2010-05-20 10:07:02,268] INFO:server:database port - 5432
[2010-05-20 10:07:02,268] INFO:server:database user - integrate
[2010-05-20 10:07:02,268] INFO:objects:initialising distributed objects services
sh: bzr: command not found
sh: lsb_release: command not found
[2010-05-20 10:07:02,496] CRITICAL:xml-rpc:[01]:
[2010-05-20 10:07:02,496] CRITICAL:xml-rpc:[02]: Environment Information :
[2010-05-20 10:07:02,496] CRITICAL:xml-rpc:[03]: System : Linux-2.6.18-028stab059.6-x86_64-with-redhat-5.4-Final
[2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[04]: OS Name : posix
[2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[05]: Operating System Release : 2.6.18-028stab059.6
[2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[06]: Operating System Version : #1 SMP Fri Nov 14 14:01:22 MSK 2008
[2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[07]: Operating System Architecture : 64bit
[2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[08]: Operating System Locale : en_US.utf
[2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[09]: Python Version : 2.4.3
[2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[10]: OpenERP-Server Version : 5.0.10
[2010-05-20 10:07:02,498] CRITICAL:xml-rpc:[11]: Last revision No. & ID :
[2010-05-20 10:07:02,498] CRITICAL:xml-rpc:[12]: Error occur when starting the server daemon: (98, 'Address already in use')

i got that error after editing

Revision history for this message
Parthiv Patel (parthiv-patel-deactivatedaccount) said :
#8

do the following

1. ps -ax|grep openerp

it will show u the process of openerp server.
kill that process and restart the server.

Regards,
Parthiv

On Thu, May 20, 2010 at 8:41 PM, nnamdizobeashia <
<email address hidden>> wrote:

> Question #109187 on OpenObject Server changed:
> https://answers.launchpad.net/openobject-server/+question/109187
>
> nnamdizobeashia posted a new comment:
> @jay
> [root@int openerp]# su - openerp
> [openerp@int ~]$ openerp-server -s
> [2010-05-20 10:07:02,267] INFO:server:version - 5.0.10
> [2010-05-20 10:07:02,268] INFO:server:addons_path -
> /usr/lib/python2.4/site-packages/openerp-server/addons
> [2010-05-20 10:07:02,268] INFO:server:database hostname - 'localhost'
> [2010-05-20 10:07:02,268] INFO:server:database port - 5432
> [2010-05-20 10:07:02,268] INFO:server:database user - integrate
> [2010-05-20 10:07:02,268] INFO:objects:initialising distributed objects
> services
> sh: bzr: command not found
> sh: lsb_release: command not found
> [2010-05-20 10:07:02,496] CRITICAL:xml-rpc:[01]:
> [2010-05-20 10:07:02,496] CRITICAL:xml-rpc:[02]: Environment Information :
> [2010-05-20 10:07:02,496] CRITICAL:xml-rpc:[03]: System :
> Linux-2.6.18-028stab059.6-x86_64-with-redhat-5.4-Final
> [2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[04]: OS Name : posix
> [2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[05]: Operating System Release :
> 2.6.18-028stab059.6
> [2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[06]: Operating System Version :
> #1 SMP Fri Nov 14 14:01:22 MSK 2008
> [2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[07]: Operating System
> Architecture : 64bit
> [2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[08]: Operating System Locale :
> en_US.utf
> [2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[09]: Python Version : 2.4.3
> [2010-05-20 10:07:02,497] CRITICAL:xml-rpc:[10]: OpenERP-Server Version :
> 5.0.10
> [2010-05-20 10:07:02,498] CRITICAL:xml-rpc:[11]: Last revision No. & ID :
> [2010-05-20 10:07:02,498] CRITICAL:xml-rpc:[12]: Error occur when starting
> the server daemon: (98, 'Address already in use')
>
>
> i got that error after editing
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

--
Thanks & Regards,
Parthiv Patel

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#9

pls this is url: http://174.121.213.188:8080/

could not connect to server

how do i deal with error

if i try to restart the services both the server and the web

[root@int openerp]# /etc/init.d/openerp-web start
pidfile already exists: /var/run/openerp/openerp-web.pid

[root@int openerp]# /etc/init.d/openerp-web stop
openerp-web not running... (no pidfile found)[root@int openerp]#

 same when i do it with the server

[root@int openerp]# /etc/init.d/openerp-server stop
openerp-server not running... (no pidfile found)[root@int openerp]#

[root@int openerp]# /etc/init.d/openerp-server start
pidfile already exists: /var/run/openerp/openerp-server.pid

what do i do thank you

Revision history for this message
Parthiv Patel (parthiv-patel-deactivatedaccount) said :
#10

The problem is not with web client.. but with the OpenERP SERVER... the user
using which u r starting the server does not seem to have rights of creating
database in PostgreSQL ... can u check with that and revert...

i think u should try using .. sudo su postgres...and then start the openerp
server.

On Thu, May 20, 2010 at 10:03 PM, nnamdizobeashia <
<email address hidden>> wrote:

> Question #109187 on OpenObject Server changed:
> https://answers.launchpad.net/openobject-server/+question/109187
>
> nnamdizobeashia posted a new comment:
> pls this is url: http://174.121.213.188:8080/
>
> could not connect to server
>
> how do i deal with error
>
> if i try to restart the services both the server and the web
>
> [root@int openerp]# /etc/init.d/openerp-web start
> pidfile already exists: /var/run/openerp/openerp-web.pid
>
> [root@int openerp]# /etc/init.d/openerp-web stop
> openerp-web not running... (no pidfile found)[root@int openerp]#
>
> same when i do it with the server
>
> [root@int openerp]# /etc/init.d/openerp-server stop
> openerp-server not running... (no pidfile found)[root@int openerp]#
>
> [root@int openerp]# /etc/init.d/openerp-server start
> pidfile already exists: /var/run/openerp/openerp-server.pid
>
> what do i do thank you
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

--
Thanks & Regards,
Parthiv Patel

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#11

@jay

after doing that and editing i issued openerp-server -s but still say could not connect to server on the web addy:http://174.121.213.188:8080/

[root@int openerp]# nano /etc/openerp-server.conf it stayed that for a long time
[root@int openerp]# su - openerp
[openerp@int ~]$ nano ~/.openerp_serverrc
[openerp@int ~]$ openerp-server -s
[2010-05-20 12:17:20,292] INFO:server:version - 5.0.10
[2010-05-20 12:17:20,292] INFO:server:addons_path - /usr/lib/python2.4/site-packages/openerp-server/addons
[2010-05-20 12:17:20,293] INFO:server:database hostname - 'localhost'
[2010-05-20 12:17:20,293] INFO:server:database port - 5432
[2010-05-20 12:17:20,293] INFO:server:database user - openerp
[2010-05-20 12:17:20,293] INFO:objects:initialising distributed objects services
[2010-05-20 12:17:20,443] INFO:web-services:starting XML-RPC services, port 8069
[2010-05-20 12:17:20,443] INFO:web-services:starting NET-RPC service, port 8070
[2010-05-20 12:17:20,444] INFO:web-services:the server is running, waiting for connections...

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#12

@jay please it is still not working does log service look correct

[root@int bin]# ps axu
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 10352 748 ? Ss 16:23 0:01 init [3]
openerp 5326 0.0 2.1 182204 17040 ? Sl 16:43 0:00 /usr/bin/python2.4 ./openerp-server.py --syslog --log-level=debug --pidfile=/var/run/openerp
root 7340 0.0 0.1 10728 988 pts/1 R+ 17:21 0:00 ps axu
root 9486 0.0 0.4 85924 3588 ? Ss 16:28 0:00 sshd: root@pts/0
root 9882 0.0 0.2 12060 1632 pts/0 Ss 16:28 0:00 -bash
root 10021 0.0 0.4 86068 3336 ? Ss 16:28 0:00 sshd: root@pts/1
root 11446 0.0 0.1 45048 1376 pts/1 S 16:45 0:00 su openerp
openerp 11447 0.0 0.2 12068 1644 pts/1 S 16:45 0:00 bash
root 13390 0.0 0.2 12064 1652 pts/1 Ss 16:29 0:00 -bash
root 17609 0.0 0.1 45048 1380 pts/1 S 16:30 0:00 su openerp
openerp 17610 0.0 0.2 12064 1636 pts/1 S 16:30 0:00 bash
root 18170 0.0 0.0 12604 676 ? S<s 16:23 0:00 /sbin/udevd -d
root 19603 0.0 0.1 45044 1424 pts/1 S 16:30 0:00 su root
root 19653 0.0 0.0 5912 624 ? Ss 16:23 0:00 syslogd -m 0
root 19664 0.0 0.1 62632 1208 ? Ss 16:23 0:00 /usr/sbin/sshd
root 19673 0.0 0.1 21644 924 ? Ss 16:23 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root 19686 0.0 0.2 12068 1660 pts/1 S 16:31 0:00 bash
openerp 19751 0.9 3.1 274524 24412 ? Sl 16:23 0:31 /usr/bin/python /usr/bin/openerp-web -c /etc/openerp-web.cfg
postgres 20260 0.0 0.5 66668 4200 ? S 16:23 0:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres 20264 0.0 0.1 55848 996 ? S 16:23 0:00 postgres: logger process
postgres 20276 0.0 0.1 66668 1276 ? S 16:23 0:00 postgres: writer process
postgres 20312 0.0 0.1 56848 992 ? S 16:23 0:00 postgres: stats buffer process
postgres 20321 0.0 0.1 56036 1168 ? S 16:23 0:00 postgres: stats collector process
root 20395 0.0 0.2 62812 2080 ? Ss 16:23 0:00 sendmail: accepting connections
smmsp 20404 0.0 0.2 57700 1784 ? Ss 16:23 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 20415 0.0 0.4 181448 3180 ? Ss 16:23 0:00 /usr/sbin/httpd
apache 20416 0.0 0.3 181448 2408 ? S 16:23 0:00 /usr/sbin/httpd
root 20424 0.0 0.1 20876 1176 ? Ss 16:23 0:00 crond
xfs 20447 0.0 0.1 20260 1252 ? Ss 16:23 0:00 xfs -droppriv -daemon
root 20457 0.0 0.1 46744 820 ? Ss 16:23 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
root 20458 0.0 0.0 46744 552 ? S 16:23 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
root 22033 0.0 0.1 45044 1420 pts/1 S 16:48 0:00 su root
root 22254 0.0 0.2 12064 1672 pts/1 S 16:48 0:00 bash
root 26283 0.0 0.1 9876 1552 pts/0 S+ 16:59 0:00 nano /etc/openerp-web.cfg
root 28194 0.0 1.5 80728 12212 ? Ss 17:17 0:00 vzl [vpsd]
root 28195 0.0 1.5 80860 12168 ? S 17:17 0:00 vzl [filer]
[root@int bin]#

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#13

Hi,
I can see the database listed at http://174.121.213.188:8080/.
What is current/latest traceback/problem you get?

Thanks.

Revision history for this message
nnamdizobeashia (nzobeashia-yahoo) said :
#14

i had permission issues with my /var/lib/pgsql/data/pg_hba.conf file and also my database too
got resolved by someone in irc channel for openerp freenodes #openobject
thanks

Revision history for this message
Ritesh kumar (kr-riteshsinha) said :
#15

Hi All ,
I am also getting the same problem on posgtgres 8.4 .
can you please send me the fixes

Revision history for this message
Bushair (bushairka) said :
#16

Hello Ritesh
Try the following

./openerp-server.py -u all -d dmsdb -r openerp -w openerp

Where dmsdb is the DB name.
This should resole the error.

thanks
Bushair

Revision history for this message
jammaeh (jammaeh) said :
#17

Hi Ritesh: After some googling try using this:

Start your server manually with
openerp-server --db_user=openuser --db_password=your_password_of_openuser
(replace openuser with whatever PostgreSQL user you created for OpenERP) which should result in a series of log messages as the server starts up. If the server is correctly installed, the message waiting for connections... should show within 30 seconds or so, which indicates that the server is waiting for a client to connect to it.

Still trying to figure out how to start it automatically on system boot...any ideas anyone???

Can you help with this problem?

Provide an answer of your own, or ask Bushair for more information if necessary.

To post a message you must log in.