From b2e1d1d3d5b17470c3a58bc043423b1c2aa116f8 Mon Sep 17 00:00:00 2001 From: 1b-agent <1b-agent@users.noreply.agents-apps-and-tools-gitea.nxldoy.easypanel.host> Date: Tue, 10 Nov 2026 14:30:57 +0000 Subject: [PATCH 1/2] [FIX] odoo20: bind http_interface 0.0.0.0 + http_port rename Symptom: fresh Odoo 20 deploy serves 127.0.0.1:8069 only; Traefik and the swarm VIP get connection refused -> HTTP 502 through the preview domain. Root cause (odoo/tools/config.py): - line 289: --http-interface my_default='127.0.0.1' - lines 768-770: empty http_interface is force-reset to 127.0.0.1 - the legacy xmlrpc_port key no longer exists (renamed http_port), so the old conf line was silently ignored (port worked only via default) Fix: generated odoo.conf now sets http_interface = 0.0.0.0 and http_port = 8069. Verified end-to-end on the onebspace deployment: internal 8069 binds 0.0.0.0, preview domain returns 200. --- README.md | 7 +++++++ deploy.py | 9 ++++++++- init-odoo.sh | 3 ++- inline.Dockerfile | 3 ++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6399de2..dc3d278 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,13 @@ blueprint (battle-tested Sep 2026 on Odoo 19) — same architecture, retargeted: ## Deploy (one command + two MCP calls) +> **Odoo 20 delta (2026-11-10):** the generated `odoo.conf` now sets +> `http_interface = 0.0.0.0` and `http_port = 8069`. Odoo 20's +> `odoo/tools/config.py` defaults `http_interface` to `127.0.0.1` (and +> force-resets it when empty), and the legacy `xmlrpc_port` key no longer +> exists — without this fix Odoo binds loopback only and every request from +> Traefik/the swarm VIP dies with `connection refused` → HTTP 502. + ```bash python3 deploy.py prepare # regenerates easypanel.schema.json, inline.Dockerfile, init-odoo.sh, .db_password ``` diff --git a/deploy.py b/deploy.py index 7680435..27d4ff6 100644 --- a/deploy.py +++ b/deploy.py @@ -110,6 +110,12 @@ def build_init_script() -> str: packages` + `--no-cache-dir` can exit non-zero on transient warnings (e.g. "Running as root") that should NOT kill the container. We instead rely on explicit early-exit points. + * CRITICAL FIX #4 (Odoo 20): the generated odoo.conf MUST set + `http_interface = 0.0.0.0` and use `http_port` (the old + `xmlrpc_port` key no longer exists). Odoo 20's tools/config.py + defaults `http_interface` to 127.0.0.1 AND force-resets it to + 127.0.0.1 when empty, so without the explicit line Odoo binds + loopback only and Traefik/VIP connections are refused (502). """ return textwrap.dedent(r""" #!/bin/bash @@ -161,7 +167,8 @@ def build_init_script() -> str: addons_path = /mnt/one-os-dev/addons,/mnt/one-os-dev/odoo/addons data_dir = /var/lib/odoo dev_mode = reload,qweb,assets,xml,werkzeug - xmlrpc_port = 8069 + http_interface = 0.0.0.0 + http_port = 8069 workers = 0 log_level = info EOF diff --git a/init-odoo.sh b/init-odoo.sh index cdd8ae6..dc80226 100644 --- a/init-odoo.sh +++ b/init-odoo.sh @@ -47,7 +47,8 @@ list_db = True addons_path = /mnt/one-os-dev/addons,/mnt/one-os-dev/odoo/addons data_dir = /var/lib/odoo dev_mode = reload,qweb,assets,xml,werkzeug -xmlrpc_port = 8069 +http_interface = 0.0.0.0 +http_port = 8069 workers = 0 log_level = info EOF diff --git a/inline.Dockerfile b/inline.Dockerfile index db0cb68..1874521 100644 --- a/inline.Dockerfile +++ b/inline.Dockerfile @@ -49,7 +49,8 @@ list_db = True addons_path = /mnt/one-os-dev/addons,/mnt/one-os-dev/odoo/addons data_dir = /var/lib/odoo dev_mode = reload,qweb,assets,xml,werkzeug -xmlrpc_port = 8069 +http_interface = 0.0.0.0 +http_port = 8069 workers = 0 log_level = info EOF -- 2.54.0 From 6254f04fe71ebdfc1dbd6b4a79ef03dabdf8e5b2 Mon Sep 17 00:00:00 2001 From: 1b-agent <1b-agent@users.noreply.agents-apps-and-tools-gitea.nxldoy.easypanel.host> Date: Tue, 10 Nov 2026 14:54:53 +0000 Subject: [PATCH 2/2] [FIX] odoo20: install inotify package for --dev=reload autoreload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Odoo 20's requirements.txt no longer ships the inotify python package, so --dev=reload logged "'inotify' module not installed. Code autoreload feature is disabled" and never restarted on file edits — breaking the core promise of this blueprint (live edits auto-apply). The init script now pip-installs inotify unconditionally after the requirements install (cheap no-op when already present). --- README.md | 3 +++ deploy.py | 10 ++++++++++ init-odoo.sh | 6 ++++++ inline.Dockerfile | 6 ++++++ 4 files changed, 25 insertions(+) diff --git a/README.md b/README.md index dc3d278..5e005af 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ blueprint (battle-tested Sep 2026 on Odoo 19) — same architecture, retargeted: > force-resets it when empty), and the legacy `xmlrpc_port` key no longer > exists — without this fix Odoo binds loopback only and every request from > Traefik/the swarm VIP dies with `connection refused` → HTTP 502. +> The init script also installs the `inotify` python package: Odoo 20's +> `requirements.txt` no longer ships it, and `--dev=reload` silently +> disables code autoreload without it. ```bash python3 deploy.py prepare # regenerates easypanel.schema.json, inline.Dockerfile, init-odoo.sh, .db_password diff --git a/deploy.py b/deploy.py index 27d4ff6..f6d9566 100644 --- a/deploy.py +++ b/deploy.py @@ -116,6 +116,10 @@ def build_init_script() -> str: defaults `http_interface` to 127.0.0.1 AND force-resets it to 127.0.0.1 when empty, so without the explicit line Odoo binds loopback only and Traefik/VIP connections are refused (502). + * CRITICAL FIX #5 (Odoo 20): install the `inotify` python package. + Odoo 20's requirements.txt no longer ships it, but `--dev=reload` + requires it — without it odoo logs "'inotify' module not installed. + Code autoreload feature is disabled" and NEVER restarts on edits. """ return textwrap.dedent(r""" #!/bin/bash @@ -154,6 +158,12 @@ def build_init_script() -> str: echo "[init] Odoo already installed; skipping pip install." fi + # Odoo 20: requirements.txt no longer ships the inotify package, but + # --dev=reload needs it ("'inotify' module not installed. Code autoreload + # feature is disabled"). Install unconditionally (cheap if present). + pip install --quiet --no-cache-dir --break-system-packages inotify \ + || echo "[init] WARN: inotify install failed (autoreload disabled)" + mkdir -p /etc/odoo /var/lib/odoo /var/log/odoo cat > /etc/odoo/odoo.conf < /etc/odoo/odoo.conf < /etc/odoo/odoo.conf <