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 course community database gettingstarted
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo course community database gettingstarted
Mengenai forum ini
  1. Getting Started
  2. Forum

Odoo Community connection to Postgres DB Issues

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
databaseconnectiondockercommunityodoo16
1 Balas
11020 Tampilan
Avatar
Joel

I have a deployment of odoo community 16 on kubernetes (microk8s specifically) with postgres db . Both pods are in the same namespace and can communicate, but the odoo pod logs are showing an issue. I dont think this is a kubernetes issue I'm just setting the scene.


I'm assuming I've set this up incorrectly. The logs show this:

Running as user 'root' is a security risk.
2023-07-10 01:02:48,790 1 INFO ? odoo: Odoo version 16.0
2023-07-10 01:02:48,790 1 INFO ? odoo: addons paths: ['/usr/src/app/odoo/addons', '/root/.local/share/Odoo/addons/16.0', '/usr/src/app/addons']
2023-07-10 01:02:48,790 1 INFO ? odoo: database: odoo@postgres-service:5432
2023-07-10 01:02:48,993 1 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
2023-07-10 01:02:49,349 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on odoo-58c548cdff-jwvbd:8069
2023-07-10 01:02:53,168 1 ERROR ? odoo.modules.loading: Database odoo not initialized, you can force it with `-i base`
2023-07-10 01:02:53,168 1 INFO ? odoo.modules.registry: Registry loaded in 0.015s
2023-07-10 01:02:53,169 1 ERROR odoo odoo.http: Exception during request handling.
Traceback (most recent call last):
File "/usr/src/app/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/src/app/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/src/app/odoo/http.py", line 1596, in _serve_ir_http
ir_http = self.registry['ir.http']
File "/usr/src/app/odoo/modules/registry.py", line 190, in __getitem__
return self.models[model_name]
KeyError: 'ir.http'

It repeats this error for a while and then starts to show this one:

File "/usr/src/app/odoo/http.py", line 1588, in _serve_db
exc.error_response = self.registry['ir.http']._handle_error(exc)
File "/usr/src/app/odoo/modules/registry.py", line 190, in __getitem__
return self.models[model_name]
KeyError: 'ir.http'
2023-07-10 01:03:08,721 1 INFO odoo werkzeug: 192.168.1.19 - - [10/Jul/2023 01:03:08] "GET /favicon.ico HTTP/1.1" 500 - 2 0.002 0.011
2023-07-10 01:03:49,419 1 ERROR odoo odoo.sql_db: bad query:
SELECT latest_version
FROM ir_module_module
WHERE name='base'

ERROR: relation "ir_module_module" does not exist
LINE 3: FROM ir_module_module
^


My Dockerfile for building Odoo Community 16 from source is this:

# Use a base image with Python and other dependenciesFROMpython:3.9-slim
# Set the working directory in the container

WORKDIR /usr/src/app
# Install build dependencies

RUN apt-getupdate && apt-getinstall-y \

​ ​ ​ ​ ​ ​ ​apt-utils\

​ ​ ​ ​ ​ ​ ​gcc\

​ ​ ​ ​ ​ ​ ​libldap2-dev\

​ ​ ​ ​ ​ ​ ​libsasl2-dev\

​ ​ ​ ​ ​ ​ ​libssl-dev
# Copy the Odoo requirements code into the container

COPY ./odoo/requirements.txt requirements.txt
# Update pip for good measure

RUN pip install --upgradepip
# Avoid pip blowing up by fixing problematic library

RUN pip install psycopg2-binary
# Install Odoo dependencies

RUN pip install -r requirements.txt
# Copy the Odoo source code into the container

COPY ./odoo.
# Enable odoo-bin to be run

RUN chmod u+x /usr/src/app/odoo-bin
# Expose the default Odoo port

EXPOSE8069
# Set the entrypoint command to start Odoo

# This will specify the default addons path and initialise the database and not load any demo data

CMD["/usr/src/app/odoo-bin","--addons-path=/usr/src/app/addons","-iall--without-demo=all"]


When I deploy with microk8s I give both odoo and postgres services the same env variables for db log on and db name etc. (From my deployment.yaml file) I've exec'd into the odoo pod, installed psql and verified that I can connect to the db using the same details that odoo reported when the pod started also:
database: odoo@postgres-service:5432  

env:- name:PGUSERvalue: odoo

name:PGPASSWORDvalue:odoo

​name:PGDATABASEvalue:odoo

​name:PGPORTvalue:5432

​name:PGHOSTvalue:postgres-service

I can't understand the issue here, I had it running on baremetal a few months ago. Any help would be great, I'm hoping it's a silly mistake in my configuration.


Also when I exec into the odoo pod can connect to the PostgreSQL db it seems to connect correctly: 

root@odoo-58c548cdff-hsnlq:/usr/src/app# psql

psql (15.3 (Debian 15.3-0+deb12u1), server 14.8 (Debian 14.8-1.pgdg120+1)) Type "help" for help. 

doo=# \conninfo 

You are connected to database "odoo" as user "odoo" on host "postgres-service" (address "10.152.183.201") at port "5432".

0
Avatar
Buang
Avatar
Walnut Software Solutions
Jawaban Terbai

Hi,
Could you try upgrading base module in your database or try creating a new database from command line and see if this resolves the issue.

Odoo Command-line interface:  https://www.odoo.com/documentation/16.0/developer/reference/cli.html

Thanks & Regards

Walnut Software Solutions

0
Avatar
Buang
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
please help create database without these errors nonetype and writing errors!
database community gettingstarted
Avatar
Avatar
1
Nov 25
680
ERROR: relation "ir_module_module" does not exist at character 53
database docker docker-compose
Avatar
Avatar
1
Nov 22
12449
connecting to online database via client (pgAdmin / dBeaver)
database connection dbeaver
Avatar
0
Apr 21
38
Odoo 18 enterprice in Docker
docker
Avatar
Avatar
Avatar
2
Feb 25
12192
Empresas que presten servicios al Sector Público y Municipal
community
Avatar
0
Jan 25
6926
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