Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo course community database gettingstarted
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo course community database gettingstarted
Über dieses Forum
  1. Getting Started
  2. Forum

Odoo Community connection to Postgres DB Issues

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
databaseconnectiondockercommunityodoo16
1 Antworten
11014 Ansichten
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
Verwerfen
Avatar
Walnut Software Solutions
Beste Antwort

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
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
please help create database without these errors nonetype and writing errors!
database community gettingstarted
Avatar
Avatar
1
Nov. 25
677
ERROR: relation "ir_module_module" does not exist at character 53
database docker docker-compose
Avatar
Avatar
1
Nov. 22
12446
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
12181
Empresas que presten servicios al Sector Público y Municipal
community
Avatar
0
Jan. 25
6926
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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