Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error #393

Open
khaledalrajeh opened this issue May 20, 2023 · 16 comments
Open

404 error #393

khaledalrajeh opened this issue May 20, 2023 · 16 comments

Comments

@khaledalrajeh
Copy link

Hi,
I used to use this script for many years; this is the best .. thanks for all of you .. especially Yanthe :)
Its looks I miss somthing, even its the same DO server and the same steps, 404 error shows in firest web call for odoo address ..

  • Ubentu 20.04
  • only changes: (admin password), (True for enterprise) and (email)

Any solution

Thanks

Log file

2023-05-20 20:04:45,782 40333 INFO ? odoo: Odoo version 16.0
2023-05-20 20:04:45,782 40333 INFO ? odoo: Using configuration file at /etc/odoo-server.conf
2023-05-20 20:04:45,782 40333 INFO ? odoo: addons paths: ['/odoo/odoo-server/odoo/addons', '/odoo/.local/share/Odoo/addons/16.0', '/odoo/enterprise/addons', '/odoo/odoo-server/addons']
2023-05-20 20:04:45,782 40333 INFO ? odoo: database: default@default:default
2023-05-20 20:04:46,050 40333 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
2023-05-20 20:04:46,174 40333 CRITICAL ? odoo.modules.module: Couldn't load module base
2023-05-20 20:04:46,174 40333 CRITICAL ? odoo.modules.module: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:04:46,174 40333 ERROR ? odoo.service.server: Failed to load server-wide module base.
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/service/server.py", line 1248, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/odoo/odoo-server/odoo/modules/module.py", line 432, in load_openerp_module
import('odoo.addons.' + module_name)
File "/odoo/odoo-server/odoo/addons/base/init.py", line 5, in
from . import models
File "/odoo/odoo-server/odoo/addons/base/models/init.py", line 21, in
from . import ir_mail_server
File "/odoo/odoo-server/odoo/addons/base/models/ir_mail_server.py", line 19, in
from OpenSSL import crypto as SSLCrypto
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1556, in
class X509StoreFlags(object):
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:04:46,199 40333 CRITICAL ? odoo.modules.module: Couldn't load module web
2023-05-20 20:04:46,199 40333 CRITICAL ? odoo.modules.module: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:04:46,199 40333 ERROR ? odoo.service.server: Failed to load server-wide module web.
The web module is provided by the addons found in the openerp-web project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/service/server.py", line 1248, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/odoo/odoo-server/odoo/modules/module.py", line 432, in load_openerp_module
import('odoo.addons.' + module_name)
File "/odoo/odoo-server/addons/web/init.py", line 4, in
from . import controllers
File "/odoo/odoo-server/addons/web/controllers/init.py", line 5, in
from . import database
File "/odoo/odoo-server/addons/web/controllers/database.py", line 19, in
from odoo.addons.base.models.ir_qweb import render as qweb_render
File "/odoo/odoo-server/odoo/addons/base/init.py", line 5, in
from . import models
File "/odoo/odoo-server/odoo/addons/base/models/init.py", line 21, in
from . import ir_mail_server
File "/odoo/odoo-server/odoo/addons/base/models/ir_mail_server.py", line 19, in
from OpenSSL import crypto as SSLCrypto
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1556, in
class X509StoreFlags(object):
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:04:46,202 40333 INFO ? odoo.service.server: HTTP service (werkzeug) running on odoo16-aord:8069
2023-05-20 20:04:59,998 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:04:59] "GET / HTTP/1.0" 404 - 1 0.015 0.015
2023-05-20 20:05:00,956 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:05:00] "GET /favicon.ico HTTP/1.0" 404 - 1 0.002 0.006
2023-05-20 20:05:01,650 40333 INFO ? werkzeug: 62.149.104.132 - - [20/May/2023 20:05:01] "GET / HTTP/1.0" 404 - 1 0.002 0.020
2023-05-20 20:05:09,030 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:05:09] "GET / HTTP/1.1" 404 - 1 0.003 0.006
2023-05-20 20:05:09,321 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:05:09] "GET /favicon.ico HTTP/1.1" 404 - 1 0.002 0.006
2023-05-20 20:25:03,808 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:25:03] "GET / HTTP/1.0" 404 - 1 0.003 0.010
2023-05-20 20:25:09,609 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:25:09] "GET / HTTP/1.0" 404 - 1 0.003 0.007
2023-05-20 20:26:14,358 40766 INFO ? odoo: Odoo version 16.0
2023-05-20 20:26:14,359 40766 INFO ? odoo: Using configuration file at /etc/odoo-server.conf
2023-05-20 20:26:14,359 40766 INFO ? odoo: addons paths: ['/odoo/odoo-server/odoo/addons', '/odoo/.local/share/Odoo/addons/16.0', '/odoo/enterprise/addons', '/odoo/odoo-server/addons']
2023-05-20 20:26:14,359 40766 INFO ? odoo: database: default@default:default
2023-05-20 20:26:14,551 40766 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
2023-05-20 20:26:14,642 40766 CRITICAL ? odoo.modules.module: Couldn't load module web
2023-05-20 20:26:14,642 40766 CRITICAL ? odoo.modules.module: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:26:14,642 40766 ERROR ? odoo.service.server: Failed to load server-wide module web.
The web module is provided by the addons found in the openerp-web project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/service/server.py", line 1248, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/odoo/odoo-server/odoo/modules/module.py", line 432, in load_openerp_module
import('odoo.addons.' + module_name)
File "/odoo/odoo-server/addons/web/init.py", line 4, in
from . import controllers
File "/odoo/odoo-server/addons/web/controllers/init.py", line 5, in
from . import database
File "/odoo/odoo-server/addons/web/controllers/database.py", line 19, in
from odoo.addons.base.models.ir_qweb import render as qweb_render
File "/odoo/odoo-server/odoo/addons/base/init.py", line 5, in
from . import models
File "/odoo/odoo-server/odoo/addons/base/models/init.py", line 21, in
from . import ir_mail_server
File "/odoo/odoo-server/odoo/addons/base/models/ir_mail_server.py", line 19, in
from OpenSSL import crypto as SSLCrypto
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1556, in
class X509StoreFlags(object):
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:26:14,650 40766 CRITICAL ? odoo.modules.module: Couldn't load module base
2023-05-20 20:26:14,650 40766 CRITICAL ? odoo.modules.module: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:26:14,650 40766 ERROR ? odoo.service.server: Failed to load server-wide module base.
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/service/server.py", line 1248, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/odoo/odoo-server/odoo/modules/module.py", line 432, in load_openerp_module
import('odoo.addons.' + module_name)
File "/odoo/odoo-server/odoo/addons/base/init.py", line 5, in
from . import models
File "/odoo/odoo-server/odoo/addons/base/models/init.py", line 21, in
from . import ir_mail_server
File "/odoo/odoo-server/odoo/addons/base/models/ir_mail_server.py", line 19, in
from OpenSSL import crypto as SSLCrypto
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1556, in
class X509StoreFlags(object):
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
2023-05-20 20:26:21,884 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:26:21] "GET / HTTP/1.0" 404 - 1 0.003 0.006
2023-05-20 20:26:42,512 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:26:42] "GET / HTTP/1.0" 404 - 1 0.003 0.019
2023-05-20 20:26:43,307 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:26:43] "GET /favicon.ico HTTP/1.0" 404 - 1 0.003 0.007
2023-05-20 20:29:47,485 40333 INFO ? werkzeug: 172.104.166.147 - - [20/May/2023 20:29:47] "GET /J7hs HTTP/1.0" 404 - 1 0.002 0.005
2023-05-20 20:29:48,039 40333 INFO ? werkzeug: 172.104.166.147 - - [20/May/2023 20:29:48] "GET /tXIH HTTP/1.0" 404 - 1 0.002 0.006
2023-05-20 20:49:30,082 40766 INFO ? odoo.service.server: Initiating shutdown
2023-05-20 20:49:30,082 40766 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
2023-05-20 20:49:30,082 40766 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 2 connections
2023-05-20 20:50:03,347 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:50:03] "GET / HTTP/1.0" 404 - 1 0.004 0.009
2023-05-20 20:50:05,592 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:50:05] "GET / HTTP/1.0" 404 - 1 0.010 0.006
2023-05-20 20:50:43,978 40333 INFO ? werkzeug: 2.88.143.218 - - [20/May/2023 20:50:43] "GET / HTTP/1.0" 404 - 1 0.002 0.007

@noblesocius
Copy link

Can you please try installing the exact version of werkzeug as required for Odoo v16.

@Moonif
Copy link

Moonif commented May 24, 2023

I think this is the same issue as mine, did you find any solution?

@Moonif
Copy link

Moonif commented May 24, 2023

I checked werkzeug version and it's exactly as required by Odoo16, I with and without Nginx, still the same, my log pretty much looks like OP's log. Can anybody helps please?

@khaledalrajeh
Copy link
Author

Can you please try installing the exact version of werkzeug as required for Odoo v16.

Thank you for your noblesocius for your reply, I do many times .. and get the same error.

@noblesocius
Copy link

noblesocius commented May 30, 2023

File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1577

This where the issue lies. Can you try removing this package, OpenSSL, from the Python 3.10 environment and reinstalling it. So try this
rm -rf /usr/local/lib/python3.10/dist-packages/OpenSSL
and then reinstall it using
pip3.10 install -U pyopenssl or pip3 install -U pyopenssl

@khaledalrajeh
Copy link
Author

File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1577

This where the issue lies. Can you try removing this package, OpenSSL, from the Python 3.10 environment and reinstalling it. So try this rm -rf /usr/local/lib/python3.10/dist-packages/OpenSSL and then reinstall it using pip3.10 install -U pyopenssl or pip3 install -U pyopenssl

Thank you for your advise, unfortunately not working, I am wondering .. why this issue show only in Enterprise installation?

@noblesocius
Copy link

This error has occurred in other frameworks as well. You might have seen this but if not, this is where I referred to.

@noblesocius
Copy link

Just found that this issue has occurred in the odoo official repo for version 15. Check that out too.

@noblesocius
Copy link

@khaledalrajeh If you've found this or any other solution helpful, kindly post it here so that others can make use of it. Please mark this issue as closed if solved. Thank you.

@khaledalrajeh
Copy link
Author

unfortunately, not yet .. hope any one find something,

This code works fine and supported, Odoo 16 looks make some challenges

@reneniehoff
Copy link

Do this on your command line after running the script and it works:
sudo pip uninstall pyopenssl
sudo pip install pyopenssl==22.0.0

sudo pip uninstall cryptography
sudo pip install cryptography==37.0.0

'sudo shutdown -r now'

Maybe anyone can fix the scripts with this?

@noblesocius
Copy link

Maybe anyone can fix the scripts with this?

Are these packages installed with the wrong versions by default? @reneniehoff
Can anyone confirm if this actually works? @khaledalrajeh

@reneniehoff
Copy link

@noblesocius For the community install this is working fine. But for the enterprise this is the solution.
I didn't check if there were installed with the wrong version, i found this here: https://www.odoo.com/nl_NL/forum/help-1/attributeerror-module-lib-has-no-attribute-x509-v-flag-cb-issuer-check-when-creating-new-staging-branch-202955

And this worked for me.

@noblesocius
Copy link

noblesocius commented Aug 24, 2023

Apparently, the requirements.txt for Odoo v16 currently specify the following:
cryptography==3.4.8
pyopenssl==20.0.1

@Yenthe666 Can you bring this to the attention of someone that knows about the implications behind this? I'm guessing there's a reason behind using older versions of these packages as the current versions are as follows:
cryptography 41.0.3
pyOpenSSL 23.2.0

If not kindly raise a pull request or let us know and someone here can do it. Thanks

Also #398 mentions this fix

@Yenthe666
Copy link
Owner

@noblesocius you can create a ticket at github.com/odoo/odoo I guess :) There have been some changes on the packaging but doesn't seem waterproof yet. It is @d-fence at Odoo who is responsible for packaging

@noblesocius
Copy link

noblesocius commented Oct 6, 2023

@Yenthe666 Please mark this issue as closed as this has more to do with the Python package versions, in general, rather than the InstallScript. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@Yenthe666 @Moonif @khaledalrajeh @noblesocius @reneniehoff and others