Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Sample docker compose file from Docker Hub showing error

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
2 Réponses
6241 Vues
Avatar
joseph jomon

Hallo Odoo community i have a windows computer with WSL installed and Docker running
i tried the code form docker hub for my docker compose file .
https://hub.docker.com/_/odoo
version 18 but even though with minimum configuration i get this error while running docker compose up , does anyone have an idea on how to get this up and running 
Thanks in advance 
db-1   | 2024-11-06 10:31:20.791 UTC [92] FATAL:  password authentication failed for user "odoo"

db-1   | 2024-11-06 10:31:20.791 UTC [92] DETAIL:  Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"

0
Avatar
Ignorer
Avatar
Michael Angelo
Meilleure réponse

The error you're seeing (password authentication failed for user "odoo") indicates that the PostgreSQL database is rejecting the connection due to incorrect credentials. You can resolve this by ensuring that the POSTGRES_USER, POSTGRES_PASSWORD, and DB_USER environment variables in your docker-compose.yml file are correctly set and consistent between the Odoo and PostgreSQL containers.

For example:
'''
services:

  db:

    image: postgres:13

    environment:

      POSTGRES_USER: odoo

      POSTGRES_PASSWORD: odoo

      POSTGRES_DB: odoo

  odoo:

    image: odoo:18

    environment:

      - HOST=db

      - USER=odoo

      - PASSWORD=odoo

    depends_on:

      - db


'''

Ensure that both containers have matching credentials for the odoo user. After adjusting the configuration, rebuild the containers with docker-compose up --build.

0
Avatar
Ignorer
joseph jomon
Auteur

Hallo Michael Angelo, Thank you for your Answer but it seems the problem still persist even after making the changes you mentioned , i will paste my compose file here and the error message
Error-Message
----------------

2024-11-06 12:05:07.552 UTC [1] LOG: starting PostgreSQL 15.8 (Debian 15.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

2024-11-06 12:05:07.553 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432

2024-11-06 12:05:07.553 UTC [1] LOG: listening on IPv6 address "::", port 5432

2024-11-06 12:05:07.561 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

2024-11-06 12:05:07.576 UTC [29] LOG: database system was shut down at 2024-11-06 12:01:23 UTC

2024-11-06 12:05:07.590 UTC [1] LOG: database system is ready to accept connections

2024-11-06 12:05:08.249 UTC [33] FATAL: password authentication failed for user "odoo"

2024-11-06 12:05:08.249 UTC [33] DETAIL: Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"

2024-11-06 12:05:09.272 UTC [34] FATAL: password authentication failed for user "odoo"

2024-11-06 12:05:09.272 UTC [34] DETAIL: Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"

2024-11-06 12:05:10.283 UTC [35] FATAL: password authentication failed for user "odoo"

2024-11-06 12:05:10.283 UTC [35] DETAIL: Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"
--------------------------------------------------------------------------
The compose file used
--------------------------------------------------------------------------
version: '3.1'

services:

web:

image: odoo:18.0

depends_on:

- db

ports:

- "8069:8069"

volumes:

- odoo-web-data:/var/lib/odoo # Persistent data for Odoo

- ./config:/etc/odoo # Custom config directory for Odoo

- ./addons:/mnt/extra-addons # Custom add-ons directory

environment:

HOST: db # Hostname for the database container

USER: odoo # Username for PostgreSQL

PASSWORD: odoo # Password for PostgreSQL

db:

image: postgres:15

environment:

POSTGRES_DB: odoo # Database name for Odoo

POSTGRES_USER: odoo # PostgreSQL user (must match Odoo's settings)

POSTGRES_PASSWORD: odoo # PostgreSQL password (must match Odoo's settings)

PGDATA: /var/lib/postgresql/data/pgdata # Persistent data for PostgreSQL

volumes:

- odoo-db-data:/var/lib/postgresql/data/pgdata

volumes:

odoo-web-data:

odoo-db-data:

Michael Angelo

Hi,

Here are a few things to try to resolve the issue:

Environment Variable Names: For Odoo, make sure the database-related environment variables in your web service match the expected naming format in Odoo:
'''
environment:
- DB_HOST=db
- DB_USER=odoo
- DB_PASSWORD=odoo
'''

Rebuild Containers: Run docker-compose down -v to remove all containers and volumes, then docker-compose up --build to rebuild and start fresh.

Confirm pg_hba.conf Configuration: Ensure that the PostgreSQL configuration in the pg_hba.conf file (usually found in /var/lib/postgresql/data/pgdata when using Docker) is set to md5 for authentication instead of scram-sha-256.

joseph jomon
Auteur

Hallo Michael Angelo, I did try the changed name of environment variables you mentioned but it seems the error persists, I also changed the config file of postgres with attatched volumes and the contents to be md5, then I get the same error message but this time with md5 at the end instead of the name of the other encryption.

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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