Welcome Dirk,

python packages are installed in a python virtual environment, that's why
if you install a package it won't affect the OpenWISP python virtual
environment (which by default is located in /opt/openwisp2/env).

The problem you are experiencing popped up recently and it been has fixed
it in a patch that has just been merged a few days ago:
https://github.com/openwisp/ansible-openwisp2/commit/481f7ad18dc225973e1d676d33e58c49cbbfe986#diff-9e79e125248ebfa366a4fd8bcb2f5314R35

The related CI build passed on all the supported OSes:
https://travis-ci.org/openwisp/ansible-openwisp2/builds/467153608

I just released these changes in the version 0.7.8 of the ansible-openwisp2
role <https://github.com/openwisp/ansible-openwisp2/releases/tag/0.7.8>,
you can upgrade it by following the upgrade instructions in the README
<https://github.com/openwisp/ansible-openwisp2#upgrading-openwisp2>.

I hope this helps, let me know.

Best regards
Federico


On Sun, Dec 16, 2018 at 12:19 PM Dirk Heiss <[email protected]> wrote:

> Hi - I hope someone can help as I'm not really familiar with ansible. When
> I try to install OpenWISP2 on a Raspberry Pi 3 (Rasbian stretch 4.14.79)
> using the following command
>
> ansible-playbook -i hosts playbook.yml -u pi -k --become -K
>
> everything runs normal until the "pip install django-redis" command (see
> below). I tried to manually install django-redis from the commandline, but
> this didn't help (as I guess ansible works in its own environment). It
> looks like the ansible environment simply misses some ssl certs to validate
> the https connection to the repository, but I don't know how to fix. Any
> ideas?
>
> Dirk
>
>
> TASK [openwisp.openwisp2 : Install django-redis]
> **********************************************************************
> fatal: [10.0.2.241]: FAILED! => {"changed": false, "cmd":
> ["/opt/openwisp2/env/bin/pip", "install", "django-redis>=4.9.0"], "msg":
> "stdout: Looking in indexes: https://pypi.org/simple,
> https://www.piwheels.org/simple\nCollecting django-redis>=4.9.0\n  Could
> not fetch URL https://pypi.org/simple/django-redis/: There was a problem
> confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org',
> port=443): Max retries exceeded with url: /simple/django-redis/ (Caused by
> SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)) -
> skipping\n  Could not fetch URL
> https://www.piwheels.org/simple/django-redis/: There was a problem
> confirming the ssl certificate: HTTPSConnectionPool(host='www.piwheels.org',
> port=443): Max retries exceeded with url: /simple/django-redis/ (Caused by
> SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)) -
> skipping\n\n:stderr: From cffi callback <function _verify_callback at
> 0x756e6c48>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=4, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x75707198>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=3, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x757072b8>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=2, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x757073d8>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=1, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x757074f8>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=0, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x75707618>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\nFrom cffi callback <function
> _verify_callback at 0x756e6978>:\nTraceback (most recent call last):\n
> File \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\",
> line 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module
> 'lib' has no attribute 'X509_up_ref'\n  Retrying (Retry(total=4,
> connect=None, read=None, redirect=None, status=None)) after connection
> broken by 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x75707618>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=3, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x75707540>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=2, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x757073d8>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=1, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x757072b8>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Retrying (Retry(total=0, connect=None,
> read=None, redirect=None, status=None)) after connection broken by
> 'SSLError(SSLError(\"bad handshake: Error([('SSL routines',
> 'tls_process_server_certificate', 'certificate verify failed')],)\",),)':
> /simple/django-redis/\nFrom cffi callback <function _verify_callback at
> 0x75707198>:\nTraceback (most recent call last):\n  File
> \"/opt/openwisp2/env/lib/python3.5/site-packages/OpenSSL/SSL.py\", line
> 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: module 'lib'
> has no attribute 'X509_up_ref'\n  Could not find a version that satisfies
> the requirement django-redis>=4.9.0 (from versions: )\nNo matching
> distribution found for django-redis>=4.9.0\n"}
>         to retry, use: --limit
> @/home/pi/openwisp2-ansible-playbook/playbook.retry
>
> PLAY RECAP
> ************************************************************************************************************
> 10.0.2.241                 : ok=26   changed=0    unreachable=0    failed=1
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenWISP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to