Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

odoo 10 can't connect to postgres server

Naroči se

Get notified when there's activity on this post

This question has been flagged
configurationdatabasepostgresqlodoo10Odoo10.0
2 Odgovori
16281 Prikazi
Avatar
zeroun

Hi, I have a problem with postgres connection. Please, can any one help me ?

I am deploying an odoo 10 app in my Ubuntu 16.04 server.

I get this error when trying to open the odoo web page :

Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]: 2017-12-29 19:13:49,805 8336 INFO ? werkzeug: 54.36.99.87 - - [29/Dec/2017 19:13:49] "GET /favicon.ico HTTP/1.1" 500 -
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]: 2017-12-29 19:13:49,812 8336 ERROR ? werkzeug: Error on request:
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]: Traceback (most recent call last):
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 180, in run_wsgi
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     execute(self.server.app)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 168, in execute
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     application_iter = app(environ, start_response)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/service/server.py", line 249, in app
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     return self.app(e, s)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py", line 186, in application
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     return application_unproxied(environ, start_response)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py", line 172, in application_unproxied
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     result = handler(environ, start_response)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/http.py", line 1308, in __call__
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     return self.dispatch(environ, start_response)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/http.py", line 1282, in __call__
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     return self.app(environ, start_wrapped)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 591, in __call__
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     return self.app(environ, start_response)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/http.py", line 1446, in dispatch
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     self.setup_db(httprequest)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/http.py", line 1368, in setup_db
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     httprequest.session.db = db_monodb(httprequest)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/http.py", line 1530, in db_monodb
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     dbs = db_list(True, httprequest)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/http.py", line 1498, in db_list
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     dbs = odoo.service.db.list_dbs(force)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/service/db.py", line 333, in list_dbs
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     with closing(db.cursor()) as cr:
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/sql_db.py", line 635, in cursor
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/sql_db.py", line 177, in __init__
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     self._cnx = pool.borrow(dsn)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/sql_db.py", line 518, in _locked
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     return fun(self, *args, **kwargs)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/opt/odoo/odoo-10.0/odoo/sql_db.py", line 586, in borrow
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     **connection_info)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:   File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]:     conn = _connect(dsn, connection_factory=connection_factory, async=async)
Dec 29 20:13:49 vpsxxxxxx odoo-bin[8336]: OperationalError: fe_sendauth: no password supplied

I am using this configuration file :

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo
db_password = False
addons_path = /opt/odoo/odoo-10.0/addons


* I've set a password to odoo user and changed db_password to 12345 I get :

Dec 29 20:37:33 vps459020 odoo-bin[8732]: OperationalError: FATAL:  password authentication failed for user "odoo"
Dec 29 20:37:33 vps459020 odoo-bin[8732]: FATAL: password authentication failed for user "odoo"

When try to log to psqgl with odoo user :

postgres@vpsxxxxxx:~$ psql -U odoo
psql: FATAL:  Peer authentication failed for user "odoo"


The pg_hba.conf file contains these lines :

# TYPE  DATABASE        USER            ADDRESS                 METHOD

local   all             postgres                                    peer
# "local" is for Unix domain socket connections only
local   all             all                                                peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5

# trying to allow odoo user
local   all             odoo                                            md5
# IPv6 local connections:
host    all             all             ::1/128                      md5


What is wrong with my configuration ?


0
Avatar
Opusti
Avatar
Thanh Loyal
Best Answer

For development environment at my laptop, I always configure postgres to allow local connection, without asking for password.

local   all             odoo      trust    # Yeah, replace your 'md5' with 'trust'

and put this line on top of your code snippet in pg_hba.conf.
Remember, this is for development only. In a production deployment, you should learn how postgres authentication works and configure it properly.

1
Avatar
Opusti
Avatar
Jainesh Shah(Aktiv Software)
Best Answer

Hello Zeroun, 

You can solve this problem using restart postgresql service.

Following command to restart postgresql service in Ubuntu  : sudo service postgresql restart 

Hope this will help you.

Regards,
ARS

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to fine tune DB connections
configuration database postgresql
Avatar
0
okt. 22
3302
In what step is creating a database, tables and populating with provisional data done in the installation steps? Solved
configuration installation database postgresql
Avatar
Avatar
Avatar
2
maj 20
8406
Run odoo 12 with a postgresql user that IS NOT THE DATABASE OWNER
configuration database postgresql permissions odoo12
Avatar
0
feb. 20
2150
How to migrate data from Odoo 10 enterprise with PostgreSQL 9.5 to PostgreSQL 12?
postgresql odoo10
Avatar
Avatar
1
nov. 23
3275
Database Migration
database postgresql
Avatar
Avatar
1
jul. 23
6603
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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