Database odoo not initialized
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
I receive Database odoo not initialized errot once I access Odoo 14.0 web entry right after fresh containers are up. On the browser it shows up as "Server Internal Error"
Many people (and the error message) have suggested to run the following
/usr/bin/python3 /usr/bin/odoo --db_host 0.0.0.0 --db_port 5432 --db_user odoo --db_password odoo -i Base -p 2233 --stop-after-init -i Base
I did so (I run the above command in the container shell session) but the error persists. I have tried this with different versions of PostgreSQL docker images like 10 and 13 and the result does not change.
2021-05-20T06:27:23.778317388-04:00 2021-05-20 10:27:23,778 1 INFO ? odoo: Odoo version 14.0-20210330
2021-05-20T06:27:23.778378882-04:00 2021-05-20 10:27:23,778 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
2021-05-20T06:27:23.778454814-04:00 2021-05-20 10:27:23,778 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/14.0', '/mnt/extra-addons']
2021-05-20T06:27:23.778498264-04:00 2021-05-20 10:27:23,778 1 INFO ? odoo: database: odoo@0.0.0.0:5432
2021-05-20T06:27:23.910280854-04:00 2021-05-20 10:27:23,910 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2021-05-20T06:27:24.019151768-04:00 2021-05-20 10:27:24,019 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on odoo-pod:8069
2021-05-20T06:28:24.668205832-04:00 2021-05-20 10:28:24,668 1 INFO ? odoo.http: HTTP Configuring static files
2021-05-20T06:28:24.683588756-04:00 2021-05-20 10:28:24,683 1 ERROR odoo odoo.modules.loading: Database odoo not initialized, you can force it with `-i base`
2021-05-20T06:28:24.684797171-04:00 2021-05-20 10:28:24,684 1 INFO odoo werkzeug: 10.0.2.100 - - [20/May/2021 10:28:24] "GET / HTTP/1.1" 500 - 10 0.007 0.009
2021-05-20T06:28:24.688217634-04:00 2021-05-20 10:28:24,688 1 ERROR odoo werkzeug: Error on request:
2021-05-20T06:28:24.688217634-04:00 Traceback (most recent call last):
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 270, in run_wsgi
2021-05-20T06:28:24.688217634-04:00 execute(self.server.app)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 258, in execute
2021-05-20T06:28:24.688217634-04:00 application_iter = app(environ, start_response)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 440, in app
2021-05-20T06:28:24.688217634-04:00 return self.app(e, s)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 124, in application
2021-05-20T06:28:24.688217634-04:00 return application_unproxied(environ, start_response)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 99, in application_unproxied
2021-05-20T06:28:24.688217634-04:00 result = odoo.http.root(environ, start_response)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/odoo/http.py", line 1295, in __call__
2021-05-20T06:28:24.688217634-04:00 return self.dispatch(environ, start_response)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/odoo/http.py", line 1263, in __call__
2021-05-20T06:28:24.688217634-04:00 return self.app(environ, start_wrapped)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 766, in __call__
2021-05-20T06:28:24.688217634-04:00 return self.app(environ, start_response)
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/odoo/http.py", line 1452, in dispatch
2021-05-20T06:28:24.688217634-04:00 ir_http = request.registry['ir.http']
2021-05-20T06:28:24.688217634-04:00 File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 177, in __getitem__
2021-05-20T06:28:24.688217634-04:00 return self.models[model_name]
2021-05-20T06:28:24.688217634-04:00 KeyError: 'ir.http' - - -
2021-05-20T06:28:24.801199132-04:00 2021-05-20 10:28:24,801 1 INFO odoo werkzeug: 10.0.2.100 - - [20/May/2021 10:28:24] "GET /favicon.ico HTTP/1.1" 500 - 2 0.001 0.005
2021-05-20T06:28:24.803776276-04:00 2021-05-20 10:28:24,803 1 ERROR odoo werkzeug: Error on request:
2021-05-20T06:28:24.803776276-04:00 Traceback (most recent call last):
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 270, in run_wsgi
2021-05-20T06:28:24.803776276-04:00 execute(self.server.app)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 258, in execute
2021-05-20T06:28:24.803776276-04:00 application_iter = app(environ, start_response)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 440, in app
2021-05-20T06:28:24.803776276-04:00 return self.app(e, s)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 124, in application
2021-05-20T06:28:24.803776276-04:00 return application_unproxied(environ, start_response)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 99, in application_unproxied
2021-05-20T06:28:24.803776276-04:00 result = odoo.http.root(environ, start_response)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/odoo/http.py", line 1295, in __call__
2021-05-20T06:28:24.803776276-04:00 return self.dispatch(environ, start_response)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/odoo/http.py", line 1263, in __call__
2021-05-20T06:28:24.803776276-04:00 return self.app(environ, start_wrapped)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 766, in __call__
2021-05-20T06:28:24.803776276-04:00 return self.app(environ, start_response)
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/odoo/http.py", line 1452, in dispatch
2021-05-20T06:28:24.803776276-04:00 ir_http = request.registry['ir.http']
2021-05-20T06:28:24.803776276-04:00 File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 177, in __getitem__
2021-05-20T06:28:24.803776276-04:00 return self.models[model_name]
2021-05-20T06:28:24.803776276-04:00 KeyError: 'ir.http' - - -
2021-05-20T06:28:25.078632955-04:00 2021-05-20 10:28:25,078 1 ERROR odoo odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name='base'
2021-05-20T06:28:25.078632955-04:00 ERROR: relation "ir_module_module" does not exist
2021-05-20T06:28:25.078632955-04:00 LINE 1: SELECT latest_version FROM ir_module_module WHERE name='base...
2021-05-20T06:28:25.078632955-04:00 ^
2021-05-20T06:28:25.078632955-04:00
2021-05-20T06:28:25.078863809-04:00 2021-05-20 10:28:25,078 1 WARNING ? odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo.
2021-05-20T06:29:24.140507400-04:00 2021-05-20 10:29:24,140 1 ERROR odoo odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name='base'
2021-05-20T06:29:24.140507400-04:00 ERROR: relation "ir_module_module" does not exist
2021-05-20T06:29:24.140507400-04:00 LINE 1: SELECT latest_version FROM ir_module_module WHERE name='base...
2021-05-20T06:29:24.140507400-04:00 ^
2021-05-20T06:29:24.140507400-04:00
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the container's /etc/odoo/odoo.conf and the reported initialization command, then compare the Odoo and PostgreSQL container settings with the supplied logs. Done means identifying why the odoo database lacks the ir_module_module table and documenting a reproducible initialization path that removes the web error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgresql, python
- Domain
- backend, databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100