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

SSL errors with https proxy #52

Closed
bb-migration opened this Issue Jul 23, 2013 · 7 comments

Comments

Projects
None yet
1 participant
@bb-migration

bb-migration commented Jul 23, 2013

Originally reported by: cmsj (Bitbucket: cmsj, GitHub: cmsj)


From an image building script from diskimage-builder (part of OpenStack):

#!

+ echo 'http_proxy: http://10.0.88.68:3128/'
http_proxy: http://10.0.88.68:3128/
+ echo 'https_proxy: http://10.0.88.68:3128/'
https_proxy: http://10.0.88.68:3128/
+ bash
root@stonker:/# easy_install os-apply-config
Searching for os-apply-config
Reading https://pypi.python.org/simple/os-apply-config/
Download error on https://pypi.python.org/simple/os-apply-config/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!
Couldn't find index page for 'os-apply-config' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!
No local packages or download links found for os-apply-config
error: Could not find suitable distribution for Requirement.parse('os-apply-config')
root@stonker:/#

(the proxy URL is a very close to stock squid3 configuration on another machine on my LAN, which is used elsewhere in the building script to download OS images, etc, so is not believed to be the issue).

Reading through the setuptools code, I wondered if this is because the VerifyingHTTPSHandler inserted into the urllib2 opener chain, is trying to do direct socket connections. At the point it does that, I inserted a call to has_proxy() on the Request object and it returned False, which confused me as I would expect ProxyHandler to still be in the opener chain.


@bb-migration

This comment has been minimized.

bb-migration commented Aug 5, 2013

Original comment by pje (Bitbucket: pje, GitHub: pje):


Chris, have you tried the patch I suggested on the 0.6 tracker? If so, what was the result?

@bb-migration

This comment has been minimized.

bb-migration commented Aug 11, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


This issue was initially reported here.

@bb-migration

This comment has been minimized.

bb-migration commented Aug 11, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


I've reviewed the proposed patch and it seems reasonable and unlikely to aggravate the situation in any case, so I'll roll it into the next release for testing.

@bb-migration

This comment has been minimized.

bb-migration commented Aug 11, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Restored tunnel (proxy) support in SSL connections. Fixes #52.

@bb-migration

This comment has been minimized.

bb-migration commented Aug 11, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


@cmsj Please test setuptools 1.0b2 in your environment and let us know if it does or doesn't address the issue.

@bb-migration

This comment has been minimized.

bb-migration commented Feb 26, 2015

Original comment by lorens_kockum (Bitbucket: lorens_kockum, GitHub: Unknown):


@jaraco I'm not the reporter, but I experienced the same error, not with Openstack but a custom development using setuptools, installed with setuptools 0.9.8 provided by python-virtualenv.noarch 1.10.1-2.el7 on a brand new Centos 7.0.1406 behind a squid http+https proxy. I found this page by googling the error message, and applying the above <<cset 8102f944d6af>> manually fixed the issue perfectly. Thank you!

@bb-migration

This comment has been minimized.

bb-migration commented Mar 3, 2015

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Most the work and credit goes to @pje. Glad it worked for you Lorens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment