odoo / odoo/docker

recent docker pull from odoo:16 cause AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Open
#490 2 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

I recently pull docker for odoo:16 image, and I get this issue when running it.

odoo-1  | 2024-01-12 09:34:32,019 1 CRITICAL ? odoo.modules.module: Couldn't load module web
odoo-1  | 2024-01-12 09:34:32,019 1 CRITICAL ? odoo.modules.module: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
odoo-1  | 2024-01-12 09:34:32,019 1 ERROR ? odoo.service.server: Failed to load server-wide module `web`.
odoo-1  | The `web` module is provided by the addons found in the `openerp-web` project.
odoo-1  | Maybe you forgot to add those addons in your addons_path configuration.
odoo-1  | Traceback (most recent call last):
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 1248, in load_server_wide_modules
odoo-1  |     odoo.modules.module.load_openerp_module(m)
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 471, in load_openerp_module
odoo-1  |     __import__('odoo.addons.' + module_name)
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/web/__init__.py", line 4, in <module>
odoo-1  |     from . import controllers
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/__init__.py", line 5, in <module>
odoo-1  |     from . import database
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 19, in <module>
odoo-1  |     from odoo.addons.base.models.ir_qweb import render as qweb_render
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/base/__init__.py", line 5, in <module>
odoo-1  |     from . import models
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/__init__.py", line 21, in <module>
odoo-1  |     from . import ir_mail_server
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_mail_server.py", line 19, in <module>
odoo-1  |     from OpenSSL import crypto as SSLCrypto
odoo-1  |   File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
odoo-1  |     from OpenSSL import crypto, SSL
odoo-1  |   File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1556, in <module>
odoo-1  |     class X509StoreFlags(object):
odoo-1  |   File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
odoo-1  |     CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
odoo-1  | AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
odoo-1  | 2024-01-12 09:34:32,022 1 CRITICAL ? odoo.modules.module: Couldn't load module base
odoo-1  | 2024-01-12 09:34:32,022 1 CRITICAL ? odoo.modules.module: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
odoo-1  | 2024-01-12 09:34:32,022 1 ERROR ? odoo.service.server: Failed to load server-wide module `base`.
odoo-1  | Traceback (most recent call last):
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 1248, in load_server_wide_modules
odoo-1  |     odoo.modules.module.load_openerp_module(m)
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 471, in load_openerp_module
odoo-1  |     __import__('odoo.addons.' + module_name)
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/base/__init__.py", line 5, in <module>
odoo-1  |     from . import models
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/__init__.py", line 21, in <module>
odoo-1  |     from . import ir_mail_server
odoo-1  |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_mail_server.py", line 19, in <module>
odoo-1  |     from OpenSSL import crypto as SSLCrypto
odoo-1  |   File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
odoo-1  |     from OpenSSL import crypto, SSL
odoo-1  |   File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1556, in <module>
odoo-1  |     class X509StoreFlags(object):
odoo-1  |   File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
odoo-1  |     CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
odoo-1  | AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Currently It makes me volume mounting the OpenSSL to library in my device to workaround this issue.

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 reproducing the failure from the odoo:16 Docker image and inspect the dependency versions involved in /usr/lib/python3/dist-packages/OpenSSL/crypto.py. Trace the import from odoo/addons/base/models/ir_mail_server.py, then verify that the rebuilt image starts without the X509_V_FLAG_CB_ISSUER_CHECK error and no longer needs the host OpenSSL volume workaround.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.