odoo / odoo/docker

default setup with nginx reverse proxy giving bad requests

Open
#356 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hello,

i'm using this compose file:

version: '2'
services:
  web:
    image: odoo:12.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - /data/odoo/odoo-web-data:/var/lib/odoo
      - /data/odoo/config:/etc/odoo
      - /data/odoo/addons:/mnt/extra-addons
    environment:
      VIRTUAL_HOST: odoo.mydomain.de 
      VIRTUAL_PORT: 8069
      LETSENCRYPT_HOST: odoo.mydomain.de
      LETSENCRYPT_EMAIL: hostmaster@mydomain.de
  db:
    image: postgres:10
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - /data/odoo/odoo-db-data:/var/lib/postgresql/data/pgdata

but when accessing the odoo.mydomain.de:8069 i get bad request messages in docker console. Without port i get a bad gateway 502.

db_1   |
db_1   | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1   |
db_1   | 2021-02-15 18:58:11.524 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1   | 2021-02-15 18:58:11.524 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1   | 2021-02-15 18:58:11.526 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1   | 2021-02-15 18:58:11.546 UTC [27] LOG:  database system was shut down at 2021-02-15 18:58:08 UTC
db_1   | 2021-02-15 18:58:11.553 UTC [1] LOG:  database system is ready to accept connections
web_1  | 2021-02-15 18:58:13,441 1 INFO ? odoo: Odoo version 12.0-20210210
web_1  | 2021-02-15 18:58:13,442 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
web_1  | 2021-02-15 18:58:13,442 1 INFO ? odoo: addons paths: ['/mnt/extra-addons', '/usr/lib/python3/dist-packages/odoo/addons']
web_1  | 2021-02-15 18:58:13,442 1 INFO ? odoo: database: odoo@db:5432
web_1  | 2021-02-15 18:58:13,615 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
web_1  | 2021-02-15 18:58:13,862 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on a1dc52e2752a:8069
web_1  | 2021-02-15 18:58:25,237 1 ERROR ? werkzeug: 84.119.200.4 - - [15/Feb/2021 18:58:25] code 400, message Bad request syntax ('\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03à\x04\x93{Z©V¯ÄêÜ\x97\x94ÌïÅÒBN\x07') - - -
web_1  | 2021-02-15 18:58:25,237 1 INFO ? werkzeug: 84.119.200.4 - - [15/Feb/2021 18:58:25] "üà�{Z©V¯ÄêÜ��ÌïÅÒBN" HTTPStatus.BAD_REQUEST - - - -
web_1  | 2021-02-15 18:58:28,776 1 ERROR ? werkzeug: 84.119.200.4 - - [15/Feb/2021 18:58:28] code 400, message Bad request syntax ('\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03kùüǦ2S\x06!\x93è«ÀC\x9dD[\x9eB÷R?õÛIs\x03!`\x1cO$ "\x1999Èu°\x06¤Qt\x9d7\x7f\x11m\x8e¥L\x9b\x1b\x95!1\x08\x93ÙÀh\x11\x1eÀ\x00"JJ\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x00') - - -
web_1  | 2021-02-15 18:58:28,776 1 INFO ? werkzeug: 84.119.200.4 - - [15/Feb/2021 18:58:28] "ükùüǦ2S!�è«ÀC�D[�B÷R?õÛIs!`O$ "99Èu°¤Qt�m�¥L�▒!�ÙÀhÀ"JJÀ+À/À,À0̨̩ÀÀ��/5" HTTPStatus.BAD_REQUEST - - - -

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the supplied Compose configuration, especially the web service port and VIRTUAL_PORT settings, alongside the Odoo Werkzeug logs. Compare how the nginx reverse proxy handles the HTTPS request and the published port. Done means the configured domain no longer produces Odoo 400 responses or a 502 gateway error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx, postgres
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.