This question has been flagged
3 Replies
17090 Views

Hi, I am starting to use OpenERP in my Linux Ubunutu, everything works fine until when any user is trying to access via web:

victor@victor-VirtualBox:~$ /opt/openerp/server/openerp-server 
2013-04-19 05:55:47,684 2439 INFO ? openerp: OpenERP version 7.0-20130417-232500
2013-04-19 05:55:47,684 2439 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
2013-04-19 05:55:47,684 2439 INFO ? openerp: database hostname: localhost
2013-04-19 05:55:47,684 2439 INFO ? openerp: database port: 5432
2013-04-19 05:55:47,684 2439 INFO ? openerp: database user: victor
2013-04-19 05:55:48,083 2439 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.17` detected
2013-04-19 05:55:48,406 2439 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
2013-04-19 05:55:48,407 2439 INFO ? openerp: OpenERP server is running, waiting for connections...
2013-04-19 05:56:00,787 2439 ERROR ? openerp.sql_db: Connection to the database failed
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/sql_db.py", line 440, 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 "victor" does not exist

And the file /etc/openerp-server.config :

; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = openerp
db_password = demo

So, my question is: the openerp-server.config is configured as user 'openerp', why the openerp-server is tryng to connect the database using the role 'victor'?

Many thanks to take some minutes to read this.

Regards.

Avatar
Discard
Best Answer

Hi Cere,

You need to create a postgres user "victor" as the config file that is used by OpenERP doesn't have db_user set, either set the correct config file or create the user 'victor'.

Refer:HOW TO CREATE POSTGRES USER

Thanks,

Avatar
Discard
Best Answer

The server is not using that conf file. probably because its name .config instead of .conf. Try:

/opt/openerp/server/openerp-server --config=/etc/openerp-server.config
Avatar
Discard
Author Best Answer

Daniel, you're right, but I was wrong typing the question, the real path is:

/etc/openerp-server.conf

So, as you know, the problem is still persists......

I do not understant because I cannot find anywhere the line: "db_user = victor" that OpenERP tries to connect with 'victor' role (I was looking with this command: sudo grep -lir "db_user = victor" /etc, and /opt/openerp/server without results)

So, where did OpenERP gets 'victor' role from?


Thanks Naresh, but I want to use 'openerp' user, described in /etc/openerp-server-conf and this user exists in postgres:

postgres=# \du
                             List of roles
 Role name |                   Attributes                   | Member of 
-----------+------------------------------------------------+-----------
 openerp   | Superuser, Create role, Create DB, Replication | {}
 openerp80 | Superuser, Create role, Create DB, Replication | {}
 postgres  | Superuser, Create role, Create DB, Replication | {}

Thanks.

Avatar
Discard

Try one thing. start your server with db_user=openerp and see if it works then there is some problem in finding the correct config file.