Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Docker - KeyError: 'ir.http'

Subscriure's

Get notified when there's activity on this post

This question has been flagged
dockerodoo12.0
2 Respostes
59812 Vistes
Avatar
Thomas

I am having an issue when trying to start a docker container using docker-compose and the official compose file.

Here is my docker-compose.yml file (copied from the official Docker image https://store.docker.com/images/odoo):

version:'2'
services:
web:
image:odoo:12.0
depends_on:
  - db
ports:
  - "8069:8069"
volumes:
  - odoo12-web-data:/var/lib/odoo
  - ./addons:/mnt/extra-addons
db:
image:postgres:10
environment:
  - POSTGRES_PASSWORD=odoo
  - POSTGRES_USER=odoo
  - PGDATA=/var/lib/postgresql/data/pgdata
volumes:
  - odoo12-db-data:/var/lib/postgresql/data/pgdata
volumes:
odoo12-web-data:
odoo12-db-data:

 

Here is what I get when I docker-compose up :

db_1   | 2018-10-26 13:18:04.762 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2018-10-26 13:18:04.762 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2018-10-26 13:18:04.812 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2018-10-26 13:18:04.831 UTC [25] LOG: database system was shut down at 2018-10-26 12:12:24 UTC
db_1 | 2018-10-26 13:18:04.839 UTC [1] LOG: database system is ready to accept connections
web_1 | 2018-10-26 13:18:06,183 1 INFO ? odoo: Odoo version 12.0-20181008
web_1 | 2018-10-26 13:18:06,183 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
web_1 | 2018-10-26 13:18:06,184 1 INFO ? odoo: addons paths: ['/var/lib/odoo/addons/12.0', '/mnt/extra-addons', '/usr/lib/python3/dist-packages/odoo/addons']
web_1 | 2018-10-26 13:18:06,184 1 INFO ? odoo: database: odoo@db:5432
web_1 | 2018-10-26 13:18:06,327 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
web_1 | 2018-10-26 13:18:06,505 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on c83179cbca11:8069

and here is the error I get when I go to localhost:8069 :

 web_1  | 2018-10-26 13:23:28,389 1 INFO odoo werkzeug: 172.20.0.1 - - [26/Oct/2018 13:23:28] "GET / HTTP/1.1" 500 - 2 0.003 0.008
web_1 | 2018-10-26 13:23:28,392 1 ERROR odoo werkzeug: Error on request:
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
web_1 | execute(self.server.app)
web_1 | File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 193, in execute
web_1 | application_iter = app(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 255, in app
web_1 | return self.app(e, s)
web_1 | File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 128, in application
web_1 | return application_unproxied(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 117, in application_unproxied
web_1 | result = odoo.http.root(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/http.py", line 1317, in __call__
web_1 | return self.dispatch(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/http.py", line 1290, in __call__
web_1 | return self.app(environ, start_wrapped)
web_1 | File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 599, in __call__
web_1 | return self.app(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/http.py", line 1470, in dispatch
web_1 | ir_http = request.registry['ir.http']
web_1 | File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 176, in __getitem__
web_1 | return self.models[model_name]
web_1 | KeyError: 'ir.http' - - -
web_1 | 2018-10-26 13:23:28,451 1 INFO odoo werkzeug: 172.20.0.1 - - [26/Oct/2018 13:23:28] "GET /favicon.ico HTTP/1.1" 500 - 2 0.004 0.012
web_1 | 2018-10-26 13:23:28,455 1 ERROR odoo werkzeug: Error on request:
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
web_1 | execute(self.server.app)
web_1 | File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 193, in execute
web_1 | application_iter = app(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 255, in app
web_1 | return self.app(e, s)
web_1 | File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 128, in application
web_1 | return application_unproxied(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 117, in application_unproxied
web_1 | result = odoo.http.root(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/http.py", line 1317, in __call__
web_1 | return self.dispatch(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/http.py", line 1290, in __call__
web_1 | return self.app(environ, start_wrapped)
web_1 | File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 599, in __call__
web_1 | return self.app(environ, start_response)
web_1 | File "/usr/lib/python3/dist-packages/odoo/http.py", line 1470, in dispatch
web_1 | ir_http = request.registry['ir.http']
web_1 | File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 176, in __getitem__
web_1 | return self.models[model_name]
web_1 | KeyError: 'ir.http' - - -

Then here is what I get few seconds after trying to access localhost:8069

db_1   | 2018-10-26 13:20:06.476 UTC [33] ERROR:  relation "ir_module_module" does not exist at character 28
db_1 | 2018-10-26 13:20:06.476 UTC [33] STATEMENT: SELECT latest_version FROM ir_module_module WHERE name='base'
web_1 | 2018-10-26 13:20:06,477 1 ERROR odoo odoo.sql_db: bad query: b"SELECT latest_version FROM ir_module_module WHERE name='base'"
web_1 | ERROR: relation "ir_module_module" does not exist
web_1 | LINE 1: SELECT latest_version FROM ir_module_module WHERE name='base...
web_1 | ^
web_1 |
web_1 | 2018-10-26 13:20:06,477 1 WARNING ? odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo.

When I try with odoo11 image and postgre 9.4 (almost same docker-compose file) it works...

What am I doing wrong ?


0
Avatar
Descartar
Fatih Piristine

seems like db init fails. did you check that whole db structure exists?

Avatar
NHAT MINH ENGINEERING AND BUSINESS SOLUTIONS CO.,LTD)
Best Answer

the problem occur when there is error about establishing database connection.

if you have many databases in Postgresql management, you should specify the one that you want to connect to

in config file add

db_name = DB_NAME_THAT_YOU_WANT_TO_CONNECT

after that you should run the ./odoo-bin -i base


1
Avatar
Descartar
Avatar
Brian Rehg
Best Answer

I would check out https://github.com/odoo/odoo/issues/27447

Adding -e POSTGRES_DB=postgres was the solution for me.

-1
Avatar
Descartar
José L. S. Alaguna

Where? I'm using Odoo and i have this problem when i try to use a custom database. why????

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
Expected singleton: hr.emp.travel.location(62, 63)
odoo12.0
Avatar
Avatar
Avatar
2
d’oct. 25
2115
How to write Record Rule with domain based on the company_dependent Fields Solved
odoo12.0
Avatar
Avatar
Avatar
3
d’oct. 23
11014
loan request
odoo12.0
Avatar
Avatar
1
de set. 23
4076
docker-compose resulted in The connection was reset (from firefox) or Empty reply from server (from curl)? Solved
docker
Avatar
Avatar
2
de set. 23
8200
sum Colum of based on id
odoo12.0
Avatar
Avatar
1
de maig 23
3073
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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