Coder Social home page Coder Social logo

Comments (8)

chadgeary avatar chadgeary commented on June 4, 2024 1

fixed in
#71

from cloudblock.

rrauenza avatar rrauenza commented on June 4, 2024

Just googling around for this error, and this issue came up in my results.

https://serverfault.com/a/1099630/228866

For me, python 3.8, upgrading pyopenssl to 22.0.0 fixed it.

from cloudblock.

NeckBeardPrince avatar NeckBeardPrince commented on June 4, 2024

Just googling around for this error, and this issue came up in my results.

https://serverfault.com/a/1099630/228866

For me, python 3.8, upgrading pyopenssl to 22.0.0 fixed it.

I figured python 3.8 would fix. Is that something that can be done via the playbook? I know right now it's also installing python3.6-pip.

from cloudblock.

rrauenza avatar rrauenza commented on June 4, 2024

I don't even know what this project is ... I was just googling for the error and found this issue.

The serverfault issue I think also shows some solutions without upgrading to to python3.8.

pyca/cryptography@3fb93cf

from cloudblock.

chadgeary avatar chadgeary commented on June 4, 2024

This is likely due to a non-working version of the py openssl lib being pulled in, have you tried it lately? Please reopen this ticket if there's still a problem.

from cloudblock.

dot-mike avatar dot-mike commented on June 4, 2024

This an issue @chadgeary please re-open. Using Azure with Ubuntu 18.04 version 18.04.202209020

Also this error with outdated Python version with to new Ansible-version on a default install on Azure

[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the
controller starting with Ansible 2.12. Current version: 3.6.9 (default, Jun 29
2022, 11:45:57)

ubuntu@cloudblock-instance:~$ ansible --version
[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.6.9 (default, Jun 29 2022, 11:45:57)
 [GCC 8.4.0]. This feature will be removed from ansible-core in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
ansible [core 2.11.12]
  config file = None
  configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
  ansible collection location = /home/ubuntu/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.6.9 (default, Jun 29 2022, 11:45:57) [GCC 8.4.0]
  jinja version = 2.10
  libyaml = True

Error:

PLAY [cloudblock - amd64 azure variant] ****************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [required packages] *******************************************************
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "/usr/lib/python3/dist-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.\n  from cryptography import x509\nTraceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1662649589.1099727-8901-67415031552713/AnsiballZ_apt.py\", line 100, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1662649589.1099727-8901-67415031552713/AnsiballZ_apt.py\", line 92, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1662649589.1099727-8901-67415031552713/AnsiballZ_apt.py\", line 41, in invoke_module\n    run_name='__main__', alter_sys=True)\n  File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_apt_payload_cyig_030/ansible_apt_payload.zip/ansible/modules/apt.py\", line 327, in <module>\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 955, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 656, in _load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 626, in _load_backward_compatible\n  File \"/tmp/ansible_apt_payload_cyig_030/ansible_apt_payload.zip/ansible/module_utils/urls.py\", line 115, in <module>\n  File \"/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py\", line 46, in <module>\n    import OpenSSL.SSL\n  File \"/usr/lib/python3/dist-packages/OpenSSL/__init__.py\", line 8, in <module>\n    from OpenSSL import crypto, SSL\n  File \"/usr/lib/python3/dist-packages/OpenSSL/crypto.py\", line 1550, in <module>\n    class X509StoreFlags(object):\n  File \"/usr/lib/python3/dist-packages/OpenSSL/crypto.py\", line 1570, in X509StoreFlags\n    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK\nAttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

from cloudblock.

chadgeary avatar chadgeary commented on June 4, 2024

Hey @dot-mike - taking a look.

Thanks for the heads up.

Regarding Ansible, I'll likely be pushing to use Ubuntu 22.04 as a base image but will keep this in mind.

from cloudblock.

dot-mike avatar dot-mike commented on June 4, 2024

I was able to workaround the Python cryptographic error as mentioned in my comment above by pinning the package version as mentioned in ansible/ansible#77816

Only run command this if using Python version 3.6!!
pip3 install "cryptography>=3.4.7,<37.0.0"

from cloudblock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.