odoo / docker

Other
931 stars 1.51k forks source link

500 Internal Server Error #414

Open agharaafat opened 2 years ago

agharaafat commented 2 years ago

I got 500 Internal Server Error after uninstalling the website module I'm using a v15 docker image how can I fix this problem by installing the website module again or upgrading the base module by command line in docker?

AriesT commented 1 year ago

Have 500 error after install with docker

i see that /var/lib/odoo - is empty (is it ok ?)

docker run --name odoo -p 8069:8069 --link postgreSQL:db -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo \ -e POSTGRES_DB=odoo -v /mnt/odoo/data:/var/lib/odoo --restart=always -t -d odoo:15


ERROR ? werkzeug: Error on request: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 323, in run_wsgi execute(self.server.app) File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 312, in execute application_iter = app(environ, start_response) File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 482, in app return self.app(e, s) File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 112, in application return application_unproxied(environ, start_response) File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 87, in application_unproxied result = odoo.http.root(environ, start_response) File "/usr/lib/python3/dist-packages/odoo/http.py", line 1336, in call return self.dispatch(environ, start_response) File "/usr/lib/python3/dist-packages/odoo/http.py", line 1302, in call return self.app(environ, start_wrapped) File "/usr/lib/python3/dist-packages/werkzeug/middleware/shared_data.py", line 260, in call return self.app(environ, start_response) File "/usr/lib/python3/dist-packages/odoo/http.py", line 1487, in dispatch explicit_session = self.setup_session(httprequest) File "/usr/lib/python3/dist-packages/odoo/http.py", line 1367, in setup_session session_gc(self.session_store) File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 26, in get value = self.fget(obj) File "/usr/lib/python3/dist-packages/odoo/http.py", line 1313, in session_store path = odoo.tools.config.session_dir File "/usr/lib/python3/dist-packages/odoo/tools/config.py", line 710, in session_dir os.makedirs(d, 0o700) File "/usr/lib/python3.9/os.py", line 225, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/var/lib/odoo/sessions' - - -

itsvrl commented 1 year ago

I'm also getting the same issue like @AriesT is getting.

Installed with docker-compose

version: "3.3"

volumes:
  odoo-s3:
    driver: local
  odoo-conf:
    driver: local
  odoo-addon:
    driver: local
  odoo-db:
    driver: local

networks:
  finances:
    external: true

services:
  web:
    image: odoo:15
    environment:
      - HOST=$POSTGRES_DB
      - USER=$POSTGRES_USER
      - PASSWORD=$POSTGRES_PASSWORD
    ports:
      - "8069:8069"
    networks:
      - finances
    volumes:
      - odoo-s3:/var/lib/odoo
      - odoo-conf:/etc/odoo
      - odoo-addon:/mnt/extra-addons
    depends_on:
      - db

  db:
    image: postgres:14
    networks:
      - finances
    environment:
      - POSTGRES_PASSWORD=$POSTGRES_PASSWORD
      - POSTGRES_USER=$POSTGRES_USER
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db:/var/lib/postgresql/data/pgdata

I followed the way to install it - https://hub.docker.com/_/odoo

Error message when entering http://localhost:8069

Website tab title: 500 Internal Server Error

image

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

2022-10-10 18:36:44,216 1 INFO ? odoo: Odoo version 15.0-20221005 
2022-10-10 18:36:44,216 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf 
2022-10-10 18:36:44,216 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/15.0', '/mnt/extra-addons'] 
2022-10-10 18:36:44,216 1 INFO ? odoo: database: odoo@db:5432 
2022-10-10 18:36:44,353 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf 
2022-10-10 18:36:44,530 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 22583419f486:8069 
2022-10-10 18:37:52,698 1 INFO ? odoo.http: HTTP Configuring static files 
2022-10-10 18:37:52,765 1 ERROR odoo odoo.modules.loading: Database odoo not initialized, you can force it with `-i base` 
2022-10-10 18:37:52,765 1 INFO odoo odoo.modules.registry: Registry loaded in 0.053s 
2022-10-10 18:37:52,770 1 INFO odoo werkzeug: 192.168.160.1 - - [10/Oct/2022 18:37:52] "GET / HTTP/1.1" 500 - 12 0.008 0.060
2022-10-10 18:37:52,775 1 ERROR odoo werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 323, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 312, in execute
    application_iter = app(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 482, in app
    return self.app(e, s)
  File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 112, in application
    return application_unproxied(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 87, in application_unproxied
    result = odoo.http.root(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1336, in __call__
    return self.dispatch(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1302, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python3/dist-packages/werkzeug/middleware/shared_data.py", line 260, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1515, in dispatch
    ir_http = request.registry['ir.http']
  File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 182, in __getitem__
    return self.models[model_name]
KeyError: 'ir.http' - - -
2022-10-10 19:10:33,081 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
                         ^

2022-10-10 19:10:33,082 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:10:46,320 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
                         ^

2022-10-10 19:10:46,321 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:11:33,144 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
                         ^

2022-10-10 19:11:33,145 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:11:47,391 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
                         ^

2022-10-10 19:11:47,392 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:12:33,169 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
                         ^

2022-10-10 19:12:33,170 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:12:48,450 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
                         ^

2022-10-10 19:12:48,450 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:13:33,226 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
                         ^

2022-10-10 19:13:33,227 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:13:49,466 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
                         ^

2022-10-10 19:13:49,467 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:14:33,289 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
                         ^

2022-10-10 19:14:33,290 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
2022-10-10 19:14:50,530 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
                         ^

2022-10-10 19:14:50,531 1 WARNING odoo odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database odoo. 
guohuanyang commented 1 year ago

same question

pratiksanyaja1998 commented 9 months ago

Hi, I'm getting same error "Permission denied: '/var/lib/odoo/.local'"

Screenshot 2023-09-26 at 4 44 50 PM

`

version: '3.1' services: spy-odoo-web: image: odoo:16.0 depends_on:

itsvrl commented 9 months ago

I found out that Odoo is a really bad product, so I stopped using it. It's bad since the Odoo team just gives us the middle finger and does only MVP (Minimal Viable Products), so it does not work most of the time... I'm pulling out from this issue, since I have moved on in life with a different product. Since I will not do compromise with a software if I need to install in on native, just to make it work. I send everything to containers. If you also are tired of trying to contribute to this and is getting the middle finger, no worries, I tried Akaunting in Docker. works really nice!

I took me the freedom to checkout the people behind Odoo also. Their Github accounts are extremely inactive. So either Odoo is dead as a project, or they just don't have active management to look over PRs that would solve the docker issues at hand.

And yes, brutalism works, right @d-fence ? At the current state of the matters I can't recommend Odoo as a product to my clients, both Small and Medium Business. So getting a fix or at least accepting the PR that fixes the Docker issues at hand is preferable.

lathama commented 3 months ago

@pratiksanyaja1998 I see errors with write access in you screenshot. You can attach to the docker container with a bash entrypoint and check the file permissions.

docker exec -it <yourcontianernamehere> /bin/bash