Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Odoo 16.0 Docker - Role "odoo" does not exist

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
postgresqldocker
2 Replies
4624 Tampilan
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
Buang
Avatar
Jort de Vreeze
Jawaban Terbai

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
Buang
Thibault van der Straten
Penulis

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
Penulis

No I haven't

Avatar
Apiuser
Jawaban Terbai

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

0
Avatar
Buang
Thibault van der Straten
Penulis

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

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
PostgreSQL Idle connections and docker Diselesaikan
postgresql docker
Avatar
Avatar
4
Feb 22
24756
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Avatar
0
Feb 25
2807
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
postgresql
Avatar
Avatar
Avatar
2
Jan 25
9923
Odoo backend to Google Data Studio Diselesaikan
postgresql
Avatar
Avatar
2
Jan 24
10139
docker-compose resulted in The connection was reset (from firefox) or Empty reply from server (from curl)? Diselesaikan
docker
Avatar
Avatar
2
Sep 23
7977
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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