0

Ansible requires Python junos-eznc module:

junos-eznc >= 1.2.2 is required but does not appear to be installed.

It can be installed using pip install junos-eznc

However, when running sudo pip install junos-eznc - I get this:

Collecting junos-eznc
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:279: SystemTimeWarning: System time is way off (before 2014-01-01). This will probably lead to SSL verification errors
  SystemTimeWarning
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not fetch URL https://pypi.python.org/simple/junos-eznc/: There was a problem confirming the ssl certificate: [Errno 1] _ssl.c:492: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed - skipping
  Could not find a version that satisfies the requirement junos-eznc (from versions: )
No matching distribution found for junos-eznc

Can anyone point me in the right direction?


I did find this article: https://github.com/Homebrew/legacy-homebrew/issues/41253

I tried renaming my files and still no luck:

]$ls
ca-bundle999.crt  ca-bundle999.trust.crt  ca-bundle.jks  exim.pem  localhost.crt  make-dummy-cert  Makefile  renew-dummy-cert
Community
  • 1
  • 1
d-moh009
  • 3
  • 1
  • 3
  • Could you paste the output of 'openssl s_client -showcerts -connect pypi.python.org:443' somewhere? – Bernd Mar 30 '17 at 22:35
  • You were asking wrong question to the wrong audience. It has nothing to do with Ansible - you don't have the required Python module installed, so it throws an error the module is not installed - there is nothing wrong with it. Your real problem is that your pip (Python package manager) cannot verify the SSL certificate for a reason given in the error message you posted. – techraf Mar 31 '17 at 00:34
  • Your device looks to be put under firewall or some proxy and not able to access pypi.python.org to download the packages. Can you check the output of ```curl -Is https://pypi.python.org/simple/pip/``` – Nitin Kr Mar 31 '17 at 10:44

1 Answers1

1

The warning message you get is:

System time is way off (before 2014-01-01). This will probably lead to SSL verification errors

And you indeed get the SSL verification error:

certificate verify failed

Solution: change the system date to current.


You also get two warnings (likely non-critical) with a suggestion to upgrade your Python:

You can upgrade to a newer version of Python to solve this.

Solution: upgrade the Python.

techraf
  • 64,883
  • 27
  • 193
  • 198
  • I did change the date and that seemed to stop the error - then pip tried installing Collecting pycparser >>>>>> then the BOX just died! i can no longer access it :( any ideas why? – d-moh009 Mar 31 '17 at 12:20