Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm trying to install Odoo latest version on a Webfaction server without success. I've managed to install it in my machine (Kubuntu 14.10 LTS) - everything went smooth here following this link: http://www.theopensourcerer.com/2014/09/how-to-install-openerp-odoo-8-on-ubuntu-server-14-04-lts/
But when I try to reproduce the installation process in Webfaction, Odoo keeps trying to access postgres database, ignoring the configuration file.
The error is:
OperationalError: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "futodoo", database "postgres", SSL on
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "futodoo", database "postgres", SSL off
I've put correct db_user, db_name and db_password in both "~/.openerp_serverrc" (saved with ~/openerp-server -s) and in "openerp-wsgi.py". But this has no effect since Odoo always tryies to access the wrong database to which my user don't have access (and shouldn't have!).
This is a snippet of my openerp-wsgi.py file:
conf['addons_path'] = '/home/futuracode/projects/odoo/addons,/home/futuracode/projects/odoo/openerp/addons'
conf['db_name'] = 'blahblah'
conf['database'] = 'blahblah'
conf['db_host'] = 'localhost'
conf['db_user'] = 'futodoo'
conf['db_port'] = 5432
conf['db_password'] = 'SECRET'
application = openerp.service.wsgi_server.application
Any help on how to fix this?
Some more info:
1. I can access the database I put in the config using 'psql' on command line, so credentials are OK.
2. I've installed all python packages, that is, python setup.py didn't give any error. I'm using a virtualenv to keep things isolated since I'll install other systems along with Odoo. I've done virtualenvs before in Webfaction with mod_wsgi so I think this is not a problem.
3. I've some experience in using Webfaction and I'm almost sure this is a problem with Odoo not respecting the config.
4. I've some experience with python but not with Odoo - I'm newbie here.
Mario, I think the database that Odoo trying to connect to is correct. 127.0.0.1 is a generic alias for localhost. So, it is the same IP address. I tries to access database named postgres, which should be present in any server, using user futodoo as the configuration specifies. The part that you need to fix, I think is noted in the error message: no pg_hba.conf entry for host "127.0.0.1", user "futodoo", database "postgres". You need to update pg_hba.conf to allow for user futodoo to access any database using host method (not local) for IP address group of 127.0.0.1/32. You can read more on pg_hba.conf from http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html or even in the file itself. The file should be located in /etc/postgresql/9.1/main/pg_hba.conf if you are running Ubuntu where 9.1 corresponds to the version of PostgreSQL installed.
Hi John, Unfortunately, that is not the case. I'm using a shared machine on Webfaction and I do not have access to PostgreSQL config files. Odoo shouldn't either! As I said, the database configuration is correct; I can access it through 'psql' command using the credentials I put in both files (~/.openerp_serverrc and openerp-wsgi.py). PS.: I had to post as an answer because my 'karma' doesn't allow me to comment your answer. If can, please convert this to a comment. Best regards, Mário
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/2/14, 6:05 AM|
|Seen: 4326 times|
|Last updated: 12/23/15, 1:42 PM|