Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Why Odoo keeps trying to access postgres database on installation?

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
2 Replies
17563 Rodiniai
Portretas
Mario Menezes

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

openerp.service.server.load_server_wide_modules()

 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.

Best regards,

 

1
Portretas
Atmesti
Portretas
Ivan
Best Answer

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.

2
Portretas
Atmesti
Portretas
Mario Menezes
Autorius Best Answer

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

0
Portretas
Atmesti
Ivan

Sorry, I mistakenly clicked convert as a comment and it makes all the other comments get removed. Anyway, yes the user need to have access to postgres database. Odoo connects to the postgres database first because it is guaranteed to exist in any running PostgreSQL installations. From there Odoo can get the list of databases that the database user owns so that it can display the list for Odoo users to choose from and Odoo can performs functionalities that are avaiable in the Manage Database link in the login page (Create, Drop, Duplicate, Backup, etc. Databases)

Mario Menezes
Autorius

John, I really don't understand why Odoo should connect to postgres database. I can understand your arguments but they don't seems to make sense in a restricted environment, like a shared machine on a hosting service like Webfaction. If you put your database in a config file, Odoo should be happy with that information alone. I'm starting to guess that some other problem is happening in the background and this is only a side effect. I'll try to reproduce the exact environment I have build in Webfaction, that is, with virtualenv, and see if I catch up something. Thanks for your help. Best regards.

Ivan

Mario, you can check for yourself the code in odoo/openerp/service/web_services.py and search for the word sql_db.db_connect('postgres').

Ivan

Maybe you should consider this: http://docs.webfaction.com/software/private-databases.html

Mario Menezes
Autorius

Hi John! Thanks for your hints. I've installed a private instance of PostgreSQL and was able to run the openerp-server script and it seems to be working fine, that is, it started, created all tables and I didn't get any error in the console. Now my problem is with wsgi, but I'll open another question since it seems to be another issue. Thanks again and best regards.

Ivan

Pleasure to be of any help. I've read your WGSI question, but I'm not well versed in that. Hopefully someone can pick it up and help you. Cheers,

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now