Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose部署后无法直接访问 #123

Open
kowenzhang opened this issue Nov 15, 2018 · 4 comments
Open

docker-compose部署后无法直接访问 #123

kowenzhang opened this issue Nov 15, 2018 · 4 comments
Labels

Comments

@kowenzhang
Copy link

使用docker-compose部署后,访问出现一下内部服务器错误,错误日志:

odoo_1_d98fc96cac19 | 2018-11-15 06:30:19,712 63 INFO ? odoo.http: HTTP Configuring static files
odoo_1_d98fc96cac19 | 2018-11-15 06:30:19,748 63 ERROR odoo odoo.modules.loading: Database odoo not initialized, you can force it with -i base
odoo_1_d98fc96cac19 | 2018-11-15 06:30:19,752 63 INFO odoo werkzeug: 172.20.0.1 - - [15/Nov/2018 06:30:19] "GET / HTTP/1.1" 500 - 10 0.011 0.022
odoo_1_d98fc96cac19 | 2018-11-15 06:30:19,756 63 ERROR odoo werkzeug: Error on request:
odoo_1_d98fc96cac19 | Traceback (most recent call last):
odoo_1_d98fc96cac19 | File "/usr/local/lib/python3.5/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
odoo_1_d98fc96cac19 | execute(self.server.app)
odoo_1_d98fc96cac19 | File "/usr/local/lib/python3.5/dist-packages/werkzeug/serving.py", line 193, in execute
odoo_1_d98fc96cac19 | application_iter = app(environ, start_response)
odoo_1_d98fc96cac19 | File "/opt/odoo/sources/odoo/odoo/service/server.py", line 350, in app
odoo_1_d98fc96cac19 | return self.app(e, s)
odoo_1_d98fc96cac19 | File "/opt/odoo/sources/odoo/odoo/service/wsgi_server.py", line 128, in application
odoo_1_d98fc96cac19 | return application_unproxied(environ, start_response)
odoo_1_d98fc96cac19 | File "/opt/odoo/sources/odoo/odoo/service/wsgi_server.py", line 117, in application_unproxied
odoo_1_d98fc96cac19 | result = odoo.http.root(environ, start_response)
odoo_1_d98fc96cac19 | File "/opt/odoo/sources/odoo/odoo/http.py", line 1317, in call
odoo_1_d98fc96cac19 | return self.dispatch(environ, start_response)
odoo_1_d98fc96cac19 | File "/opt/odoo/sources/odoo/odoo/http.py", line 1290, in call
odoo_1_d98fc96cac19 | return self.app(environ, start_wrapped)
odoo_1_d98fc96cac19 | File "/usr/local/lib/python3.5/dist-packages/werkzeug/wsgi.py", line 599, in call
odoo_1_d98fc96cac19 | return self.app(environ, start_response)
odoo_1_d98fc96cac19 | File "/opt/odoo/sources/odoo/odoo/http.py", line 1470, in dispatch
odoo_1_d98fc96cac19 | ir_http = request.registry['ir.http']
odoo_1_d98fc96cac19 | File "/opt/odoo/sources/odoo/odoo/modules/registry.py", line 176, in getitem
odoo_1_d98fc96cac19 | return self.models[model_name]
odoo_1_d98fc96cac19 | KeyError: 'ir.http' - - -

@elicoidal
Copy link
Contributor

Thanks for reporting.
Please post your docker-compose.yml or any relevant file such as oca_dependencies.txt
cc @seb-elico

@kowenzhang
Copy link
Author

docker-compose.yml:

version: '3.3'
services:

  postgres:
    image: postgres:9.5
    environment:
      - POSTGRES_USER=odoo

  odoo:
    image: elicocorp/odoo:10.0
    command: start
    ports:
      - 127.0.0.1:8069:8069
    links:
      - postgres:db
    environment:
      - ODOO_DB_USER=odoo

========================================
It seems that the docker-compose file miss the db init step.
Thanks for your reply

@elicoidal
Copy link
Contributor

elicoidal commented Nov 16, 2018

did you try the method from here: https://odoo-community.org/blog/the-oca-blog-1/post/how-to-install-oca-modules-79

Not sure what is the origin: I have used your example and I got Odoo up and running in few seconds.

eric@elico-1DSG:~/demo/test$ cat docker-compose.yml 
version: '3.3'
services:

  postgres:
    image: postgres:9.5
    environment:
      - POSTGRES_USER=odoo

  odoo:
    image: elicocorp/odoo:10.0
    command: start
    ports:
      - 127.0.0.1:9069:8069
    links:
      - postgres:db
    environment:
      - ODOO_DB_USER=odoo
eric@elico-1DSG:~/demo/test$ docker-compose up
Creating test_postgres_1 ... done
Creating test_odoo_1     ... done
Attaching to test_postgres_1, test_odoo_1

Maybe you need to pull the image again from hub.

@kowenzhang
Copy link
Author

ok, I'll try it when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants