Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Odoo 16.0 Docker - Role "odoo" does not exist

Odebírat

Get notified when there's activity on this post

This question has been flagged
postgresqldocker
2 Odpovědi
4619 Zobrazení
Avatar
Thibault van der Straten

Hi all,

I am facing the following issue when trying to set up Odoo on my Debian server.

Log file on de database docker mention the following

2023-11-10 09:17:04.692 UTC [499] DETAIL: Role "odoo" does not exist.

Connection matched file "/var/lib/postgresql/data/pgdata/pg_hba.conf" line 128: "host all all all scram-sha-256"

This is my docker-compose.yml

version: '3.3'
networks:
  internal:
    external: false
# backend:
#   external: false


########################### SECRETS

secrets:
  postgres_sql_password:
      file: ${APP_DATA_DIR}/secrets/postgresql_password


services:
#
#
# 
  # ODOO APP 

  odoo:
    image: odoo:16.0
    container_name: odoo
    restart: unless-stopped
    depends_on:
      - db
    ports:
      - 8069:8069
    volumes:
      - ${APP_DATA_DIR}/odoo/app:/var/lib/odoo
      - ${APP_DATA_DIR}/odoo/addons:/mnt/extra-addons
    environment:
      - TZ=$TZ
      - PASSWORD_FILE=/run/secrets/postgresql_password
      - HOST=db
      - USER=odoo
    secrets:
      - postgresql_password
    networks:
      - internal
    links:
      - db

#
#
# 
  # ODOO APP  TRAEFIK OK

  db:
    image: postgres:latest
    container_name: db
    volumes:
      - ${APP_DATA_DIR}/odoo/db:/var/lib/postgresql/data/pgdata
    restart: unless-stopped
    networks:
      - internal
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=/run/secrets/postgresql_password
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    secrets:
      - postgresql_password






0
Avatar
Zrušit
Avatar
Jort de Vreeze
Nejlepší odpověď

This is not typical. The POSTGRES_USER variable is used in conjunction with POSTGRES_PASSWORD to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of postgres will be used (https://hub.docker.com/_/postgres). I suspect that it has to do with how you define your secrets. Your compose deviates from the official Odoo configuration (https://hub.docker.com/_/odoo/). In addition, I would advise to check the logs of your containers as well, besides the 'Role "odoo" does not exist'.


See https://docs.docker.com/engine/swarm/secrets/#use-secrets-in-compose for how to use secrets with docker-compose.


I hope this helps!

0
Avatar
Zrušit
Thibault van der Straten
Autor

Thanks a lot for your response.
I thought of something like that and to test it out, it tried with the simplest user and password, straight in the compose file, not in secrets. But that didn't solve it.
It's really like those variables didn't do their job of creating the user.

Jort de Vreeze

Did you try removing the containers and the volumes including content (assuming that they haven't been used yet; i.e., no production database) and then build again?

Thibault van der Straten
Autor

No I haven't

Avatar
Apiuser
Nejlepší odpověď

Create a user named Odoo with permissions to everything in the project on your machine.

0
Avatar
Zrušit
Thibault van der Straten
Autor

This method I described comes from user guides about how to use the docker images. I simply assumed that it would just work. This is how it's supposed to be working. So I need to exec bash the db container and access the postgres console and create a user, is that the solution to this ?

Apiuser

I guess you are right that the user you need to is the postgres one. I also faced permissions conflicts and that is why I also created an Odoo user on the system. It seems tho what you lack is that postgres user. Please take a look at this part, because you are requesting connection via this user:

environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=/run/secrets/postgresql_password
- POSTGRES_USER=odoo
- PGDATA=/var/lib/postgresql/data/pgdata

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

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
PostgreSQL Idle connections and docker Vyřešeno
postgresql docker
Avatar
Avatar
4
úno 22
24752
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Avatar
0
úno 25
2805
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
postgresql
Avatar
Avatar
Avatar
2
led 25
9921
Odoo backend to Google Data Studio Vyřešeno
postgresql
Avatar
Avatar
2
led 24
10139
docker-compose resulted in The connection was reset (from firefox) or Empty reply from server (from curl)? Vyřešeno
docker
Avatar
Avatar
2
zář 23
7977
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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