Odoo 17 Docker image fails to start when PostgreSQL user cannot authenticate against the postgres maintenance database
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
调研方向
Start with /entrypoint.sh and the wait-for-psql.py check it runs; trace which database the check targets when db_name is configured. Compare that behavior with the reported successful connection to the Odoo database and the failed connection to postgres. Done means the check's expected behavior for a configured db_name is resolved, either through its behavior or documented requirements.
由索引模型根据 Issue 内容生成。
描述
Description
I'm running Odoo 17 using the official Docker image (odoo:17.0) with an external PostgreSQL server.
My PostgreSQL user can successfully connect to the configured Odoo database, but cannot authenticate against the default PostgreSQL maintenance database (postgres).
The Odoo Docker entrypoint fails during its initial database connectivity check, even though the configured Odoo database is reachable.
This behavior occurs both with Docker Compose and with a plain docker run command.
Environment
• Odoo Docker image: odoo:17.0
• PostgreSQL server: 18.4
• PostgreSQL client: 16.15
• Docker host: Ubuntu 24.04
• Database: external PostgreSQL server
• Odoo database: odoo
• PostgreSQL user: odoo_owner
Configuration
My Odoo configuration (/etc/odoo/odoo.conf) contains:
[options] db_host = <POSTGRESQL_HOST> db_port = 5432 db_user = odoo_owner db_password = <REDACTED> db_name = odoo list_db = False
Steps to reproduce
1. Configure an external PostgreSQL server.
2. Create an Odoo database named odoo.
3. Configure a PostgreSQL user that can authenticate and connect to odoo, but cannot authenticate against the postgres maintenance database.
4. Start the official Odoo 17 Docker image with the configuration above.
Actual behavior
The container starts but repeatedly reports:
Database connection failure: connection to server at "<POSTGRESQL_HOST>" (<IP>), port 5432 failed: FATAL: password authentication failed
The error comes from the initial wait-for-psql.py check executed by the Docker entrypoint.
Additional investigation
I verified the following:
- Direct connection to the configured Odoo database works
From the Docker container:
psycopg2.connect( host="<POSTGRESQL_HOST>", port=5432, user="odoo_owner", password="<PASSWORD>", dbname="odoo" )
This connection succeeds.
- Connection to the PostgreSQL maintenance database fails
Using the same host, port, username and password, but dbname="postgres", results in:
FATAL: password authentication failed
- Configuration and credentials are correct
I verified that:
• The container reads the expected /etc/odoo/odoo.conf.
• The configured database name is odoo.
• The password is identical in both the temporary and running containers.
• Direct psycopg2 connections to odoo work.
- The issue is not specific to Docker Compose
I reproduced the same behavior using the official image directly:
docker run -d \ --name odoo17-test \ -p 127.0.0.1:8069:8069 \ -v "$(pwd)/odoo.conf:/etc/odoo/odoo.conf:ro" \ odoo:17.0
The container still executes /entrypoint.sh odoo and fails at the initial PostgreSQL connectivity check.
Expected behavior
When db_name is explicitly configured, and the Odoo database is already accessible, I would expect the initial connectivity check to validate the configured database rather than requiring successful authentication against the postgres maintenance database.
Alternatively, it would be useful to document that the configured PostgreSQL user must also be able to authenticate against the postgres database.
Questions
1. Is the connection to the postgres maintenance database in wait-for-psql.py intentional, even when db_name is explicitly configured?
2. Is there a recommended configuration for using an external PostgreSQL server with a restricted application user?
3. Could the initial connectivity check use the configured db_name instead of hardcoding postgres?
Thanks for your feedback.
- 主要语言
- Dockerfile
- 星标
- 1.2k
- 派生
- 1.7k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
odoo/docker 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
-
Missing PyJWT ?未关闭
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 65/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
Ensure weekly updates可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
txn2/mcp-data-platform#2728 ·
维护者通常 1 天内回复
-
area: opcua type: bug
难度 2/5 1-3 小时 新手友好度 85/100
RicoSuter/Namotion.Interceptor#1020 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
protocolbuffers/protobuf#31768 ·
维护者通常 1 天内回复
-
[Bug]: LANGSMITH_SAMPLING_RATE ignores fractional values (isdigit check), traces 100% of requests未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复