jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Wed Feb 20, 2019 4:23 pm Post subject: [fixed] mirrorselect fails with ssl certificate error |
|
|
I wanted to regenerate the GENTOO_MIRRORS line in /etc/portage/make.conf due to poor performance of my current mirror. The following is not working due to a "ssl.CertificateError". Is there a way to exclude a specific host when running mirrorselect ? OR is there an issue with the certificates on my system? (I did run "emerge --update --deep --newuse @world " within the last day without issue.)
Code: | $ mirrorselect -D -s3 -4 -R 'North America' -o > /tmp/new_mirror
* Using url: https://api.gentoo.org/mirrors/distfiles.xml
* Limiting test to "region=North America" hosts.
* Downloading a list of mirrors...
Got 147 mirrors.
* Downloading mirrorselect-test files from each mirror... [2 of 29]
deeptime(): md5sum error for file: mirrorselect-test
expected: bdf077b2e683c506bf9e8f2494eeb044
got.....: aec6eda6b0fbd881b63f59e48ec3a95c
host....: gentoo.mirrors.tera-byte.com, 216.194.64.133
* Downloading mirrorselect-test files from each mirror... [5 of 29]Traceback (most recent call last):
File "/usr/lib/python-exec/python3.6/mirrorselect", line 61, in <module>
MirrorSelect().main(sys.argv)
File "/usr/lib64/python3.6/site-packages/mirrorselect/main.py", line 373, in main
urls = self.select_urls(hosts, options)
File "/usr/lib64/python3.6/site-packages/mirrorselect/main.py", line 322, in select_urls
selector = Deep(hosts, options, self.output)
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 226, in __init__
self.deeptest()
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 253, in deeptest
mytime, ignore = self.deeptime(host, maxtime)
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 338, in deeptime
ip, ips[ips.index(ip):])
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 421, in _test_connection
f = url_open(test_url)
File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib64/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib64/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib64/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib64/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/lib64/python3.6/http/client.py", line 1400, in connect
server_hostname=server_hostname)
File "/usr/lib64/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib64/python3.6/ssl.py", line 814, in __init__
self.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 694, in do_handshake
match_hostname(self.getpeercert(), self.server_hostname)
File "/usr/lib64/python3.6/ssl.py", line 327, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname '129.97.134.71' doesn't match either of '*.csclub.uwaterloo.ca', 'csclub.uwaterloo.ca' |
The following also fails:
Code: | $ mirrorselect -D -s3 -4 -c 'USA' -o > /tmp/new_mirror
* Using url: https://api.gentoo.org/mirrors/distfiles.xml
* Limiting test to "country=USA" hosts.
* Downloading a list of mirrors...
Got 147 mirrors.
* Downloading mirrorselect-test files from each mirror... [1 of 21]Traceback (most recent call last):
File "/usr/lib/python-exec/python3.6/mirrorselect", line 61, in <module>
MirrorSelect().main(sys.argv)
File "/usr/lib64/python3.6/site-packages/mirrorselect/main.py", line 373, in main
urls = self.select_urls(hosts, options)
File "/usr/lib64/python3.6/site-packages/mirrorselect/main.py", line 322, in select_urls
selector = Deep(hosts, options, self.output)
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 226, in __init__
self.deeptest()
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 253, in deeptest
mytime, ignore = self.deeptime(host, maxtime)
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 338, in deeptime
ip, ips[ips.index(ip):])
File "/usr/lib64/python3.6/site-packages/mirrorselect/selectors.py", line 421, in _test_connection
f = url_open(test_url)
File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib64/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib64/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib64/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib64/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/lib64/python3.6/http/client.py", line 1400, in connect
server_hostname=server_hostname)
File "/usr/lib64/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib64/python3.6/ssl.py", line 814, in __init__
self.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 694, in do_handshake
match_hostname(self.getpeercert(), self.server_hostname)
File "/usr/lib64/python3.6/ssl.py", line 327, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname '64.50.233.100' doesn't match either of '*.osuosl.org', 'osuosl.org' |
Last edited by jagdpanther on Fri Feb 22, 2019 5:03 pm; edited 1 time in total |
|