I'm using the Odoo 12 docker image in an Elastic Beanstalk environment on AWS. On deployment, the image is pulled and Docker is set up with the Dockerrun.aws.json file below:
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "odoo:12"
},
"Ports": [
{
"HostPort": "80",
"ContainerPort": "8069"
}
],
"Volumes": [
{
"HostDirectory": "/var/app/current/addons",
"ContainerDirectory": "/mnt/extra-addons"
}
]
}
I then have a Postgres 10.6 database that is hosted on the AWS RDS service. This is what the Elastic Beanstalk environment (with the Odoo app) connects to.
However I get a 500 Internal Server Error when I try to access the Odoo site.
This is what I was able to find in the Elastic Beanstalk logs:
Issue seems to start with
ERROR odoo odoo.modules.loading: Database odoo not initialized, you can force it with `-i base
-------------------------------------
/var/log/eb-docker/containers/eb-current-app/eb-90097b790eb4-stdouterr.log
-------------------------------------
2019-03-21 22:36:37,412 1 INFO ? odoo: Odoo version 12.0-20190128
2019-03-21 22:36:37,413 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
2019-03-21 22:36:37,413 1 INFO ? odoo: addons paths: ['/var/lib/odoo/addons/12.0', '/mnt/extra-addons', '/usr/lib/python3/dist-packages/odoo/addons']
2019-03-21 22:36:37,413 1 INFO ? odoo: database: odoo_master@odoo-prod-12.cvpv9aps2zuw.ap-southeast-2.rds.amazonaws.com:5432
2019-03-21 22:36:37,582 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2019-03-21 22:36:37,812 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 90097b790eb4:8069
2019-03-21 22:37:05,657 1 INFO ? odoo.http: HTTP Configuring static files
**2019-03-21 22:37:05,807 1 ERROR odoo odoo.modules.loading: Database odoo not initialized, you can force it with `-i base`**
2019-03-21 22:37:05,811 1 INFO odoo werkzeug: 172.17.0.1 - - [21/Mar/2019 22:37:05] "GET / HTTP/1.1" 500 - 6 0.009 0.143
2019-03-21 22:37:05,821 1 ERROR odoo werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 350, in app
return self.app(e, s)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 128, in application
return application_unproxied(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 117, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1318, in __call__
return self.dispatch(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1291, in __call__
return self.app(environ, start_wrapped)
File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1471, in dispatch
ir_http = request.registry['ir.http']
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
KeyError: 'ir.http' - - -
2019-03-21 22:37:06,340 1 INFO odoo werkzeug: 172.17.0.1 - - [21/Mar/2019 22:37:06] "GET /favicon.ico HTTP/1.1" 500 - 2 0.003 0.015
2019-03-21 22:37:06,344 1 ERROR odoo werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 350, in app
return self.app(e, s)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 128, in application
return application_unproxied(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 117, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1318, in __call__
return self.dispatch(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1291, in __call__
return self.app(environ, start_wrapped)
File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1471, in dispatch
ir_http = request.registry['ir.http']
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
KeyError: 'ir.http' - - -
Is this a problem with the Docker image? Does anyone know of a solution?
Submitted the issue on the Odoo GitHub page here: https://github.com/odoo/odoo/issues/32029
hello, could you solve it? I have the same problem. thanks.