Page 1 of 1

Could not fetch URL http://pypi.python.org/simple/: connecti

Posted: Wed Mar 29, 2017 2:51 am
by hemak88
I am trying to install nagios Log server manually from source. I am getting below error :

Code: Select all

[quote]get-pip.py run on Wed Mar 29 11:37:36 2017
Downloading/unpacking pip
  Getting page http://pypi.python.org/simple/pip/
  Could not fetch URL http://pypi.python.org/simple/pip/: connection error: [Errno 1] _ssl.c:492: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
  Will skip URL http://pypi.python.org/simple/pip/ when looking for download links for pip
  Getting page http://pypi.python.org/simple/
  Could not fetch URL http://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'httplib.CannotSendRequest'>: )[/quote]
I have tried the patch provided in the thread https://support.nagios.com/forum/viewto ... ip#p193366

I believe the script is still trying to go through port 443 even when http protocol is used. Kindly assist to resolve this error.

Re: Could not fetch URL http://pypi.python.org/simple/: conn

Posted: Wed Mar 29, 2017 10:27 am
by mcapra
As per the other thread:
  • Is this an offline machine?
  • Does your organization use any internal Certificate Authorities? If your organization requires an internal CA as part of the trust chain, you will need to include it in the --cert argument for get-pip.py as well as any future pip operations.
  • Does this machine access the internet via proxy?

Re: Could not fetch URL http://pypi.python.org/simple/: conn

Posted: Thu Mar 30, 2017 7:12 am
by hemak88
mcapra wrote:As per the other thread:
  • Is this an offline machine?
    No. The machine has internet access
  • Does your organization use any internal Certificate Authorities? If your organization requires an internal CA as part of the trust chain, you will need to include it in the --cert argument for get-pip.py as well as any future pip operations.
    We doesn't have any such CA certificate
  • Does this machine access the internet via proxy?
Yes, It connects to internet via proxy.

Re: Could not fetch URL http://pypi.python.org/simple/: conn

Posted: Thu Mar 30, 2017 2:47 pm
by mcapra
Can you try running get-pip.py by itself with the --proxy argument? get-pip.py should exist in the same path as the fullinstall script:

Code: Select all

python get-pip.py --proxy="[user:passwd@]proxy.server:port"

Re: Could not fetch URL http://pypi.python.org/simple/: conn

Posted: Wed Apr 05, 2017 3:27 am
by hemak88
That could solve the error. But again new errors came up. But I resolved them all and now installation is complete.
However a minor correction in the command:
Below is the format I used since there is no login credentials for our proxy.

Code: Select all

python get-pip.py --proxy="http://proxy.server:port"
Also, you might need
python 2.7 or later
for install to complete. To add trust for http sites while install with "pip", add:

Code: Select all

pip install --trusted-host pypi.python.org

Re: Could not fetch URL http://pypi.python.org/simple/: conn

Posted: Wed Apr 05, 2017 11:43 am
by cdienger
Glad to hear you were able to find a solution. Was there anything else related to this that we can help with or are we okay to close the thread?