archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
6.05k stars 522 forks source link

SSL Certificate Verification Fails due to Expired Certificate during mirror selection #2642

Closed 0xPerseus closed 3 weeks ago

0xPerseus commented 3 weeks ago

Which ISO version are you using?

2024.08.01

The installation log

Hardware model detected: LENOVO 21F8CTO1WW; UEFI mode: True - Lenovo Thinkpad T14s Gen4 (AMD)
Processor model detected: AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics
Memory statistics: 29755980 available out of 31466872 total installed
Could not detect virtual system: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [1]: none

System is not running in a VM: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [1]: none

Virtualization detected: None; is VM: False

Checking download speed of mirrors.rit.edu[1] by fetching: http://mirrors.rit.edu/archlinux/core/os/x86_64/core.db
    speed: 392843.5362580969 (0.37MiB/s)
Checking download speed of mirrors.rit.edu[1] by fetching: https://mirrors.rit.edu/archlinux/core/os/x86_64/core.db
    speed: 200058.85440357515 (0.19MiB/s)
Checking download speed of www.gtlib.gatech.edu[13] by fetching: http://www.gtlib.gatech.edu/pub/archlinux/core/os/x86_64/core.db
    speed: 201668.62373734976 (0.19MiB/s)
Checking download speed of mirror.umd.edu[4] by fetching: http://mirror.umd.edu/archlinux/core/os/x86_64/core.db
    speed: 273552.3740961041 (0.26MiB/s)
Checking download speed of mirror.umd.edu[4] by fetching: https://mirror.umd.edu/archlinux/core/os/x86_64/core.db
    speed: 701049.4533757461 (0.66MiB/s)
Checking download speed of ftp.osuosl.org[7] by fetching: http://ftp.osuosl.org/pub/archlinux/core/os/x86_64/core.db
    speed: 524282.07110965817 (0.49MiB/s)
Checking download speed of ftp.osuosl.org[7] by fetching: https://ftp.osuosl.org/pub/archlinux/core/os/x86_64/core.db
    speed: 171376.86859951046 (0.16MiB/s)
Checking download speed of mirrors.lug.mtu.edu[1] by fetching: http://mirrors.lug.mtu.edu/archlinux/core/os/x86_64/core.db
    speed: 62454.80023292824 (0.05MiB/s)
Checking download speed of mirrors.lug.mtu.edu[1] by fetching: https://mirrors.lug.mtu.edu/archlinux/core/os/x86_64/core.db
    speed: 197871.45682829092 (0.18MiB/s)
Checking download speed of mirrors.kernel.org[1] by fetching: http://mirrors.kernel.org/archlinux/core/os/x86_64/core.db
    speed: 78937.25326262771 (0.07MiB/s)
Checking download speed of mirrors.kernel.org[2] by fetching: https://mirrors.kernel.org/archlinux/core/os/x86_64/core.db
    speed: 93839.25021813829 (0.08MiB/s)
Checking download speed of mirrors.cat.pdx.edu[1] by fetching: http://mirrors.cat.pdx.edu/archlinux/core/os/x86_64/core.db
    speed: 1042149.827949035 (0.99MiB/s)
Checking download speed of mirrors.rutgers.edu[2] by fetching: http://mirrors.rutgers.edu/archlinux/core/os/x86_64/core.db
    speed: 158708.0653913745 (0.15MiB/s)
Checking download speed of mirror.dal10.us.leaseweb.net[1] by fetching: http://mirror.dal10.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 501403.22272167756 (0.47MiB/s)
Checking download speed of mirror.mia11.us.leaseweb.net[1] by fetching: http://mirror.mia11.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 147855.31710363386 (0.14MiB/s)
Checking download speed of mirror.sfo12.us.leaseweb.net[1] by fetching: http://mirror.sfo12.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 502728.86248578015 (0.47MiB/s)
Checking download speed of mirror.wdc1.us.leaseweb.net[1] by fetching: http://mirror.wdc1.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 94055.87918944455 (0.08MiB/s)
Checking download speed of mirror.dal10.us.leaseweb.net[2] by fetching: https://mirror.dal10.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 717572.9229453091 (0.68MiB/s)
Checking download speed of mirror.mia11.us.leaseweb.net[2] by fetching: https://mirror.mia11.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 585945.5545271131 (0.55MiB/s)
Checking download speed of mirror.sfo12.us.leaseweb.net[1] by fetching: https://mirror.sfo12.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 2326673.4601462665 (2.21MiB/s)
Checking download speed of mirror.wdc1.us.leaseweb.net[1] by fetching: https://mirror.wdc1.us.leaseweb.net/archlinux/core/os/x86_64/core.db
    speed: 747293.1300074146 (0.71MiB/s)
Checking download speed of mirrors.gigenet.com[3] by fetching: http://mirrors.gigenet.com/archlinux/core/os/x86_64/core.db
    speed: 372893.879311013 (0.35MiB/s)
Checking download speed of mirror.metrocast.net[7] by fetching: http://mirror.metrocast.net/archlinux/core/os/x86_64/core.db
    speed: 140393.92932364525 (0.13MiB/s)
Checking download speed of dfw.mirror.rackspace.com[3] by fetching: http://dfw.mirror.rackspace.com/archlinux/core/os/x86_64/core.db
    speed: 824156.144643111 (0.78MiB/s)
Checking download speed of iad.mirror.rackspace.com[3] by fetching: http://iad.mirror.rackspace.com/archlinux/core/os/x86_64/core.db
    speed: 500687.4682699728 (0.47MiB/s)
Checking download speed of ord.mirror.rackspace.com[3] by fetching: http://ord.mirror.rackspace.com/archlinux/core/os/x86_64/core.db
    speed: 546777.729948333 (0.52MiB/s)
Checking download speed of dfw.mirror.rackspace.com[3] by fetching: https://dfw.mirror.rackspace.com/archlinux/core/os/x86_64/core.db
    speed: 815011.5129503703 (0.77MiB/s)
Checking download speed of iad.mirror.rackspace.com[3] by fetching: https://iad.mirror.rackspace.com/archlinux/core/os/x86_64/core.db
    speed: 519106.07565384323 (0.49MiB/s)
Checking download speed of ord.mirror.rackspace.com[3] by fetching: https://ord.mirror.rackspace.com/archlinux/core/os/x86_64/core.db
    speed: 570893.8949673291 (0.54MiB/s)
Checking download speed of mirror.vtti.vt.edu[5] by fetching: http://mirror.vtti.vt.edu/archlinux/core/os/x86_64/core.db
    speed: 492692.64417200437 (0.46MiB/s)
Checking download speed of arch.mirror.constant.com[0] by fetching: http://arch.mirror.constant.com/core/os/x86_64/core.db
    speed: 347578.6027207546 (0.33MiB/s)
Checking download speed of arch.mirror.constant.com[1] by fetching: https://arch.mirror.constant.com/core/os/x86_64/core.db
    speed: 750147.7978762682 (0.71MiB/s)
Checking download speed of mirrors.acm.wpi.edu[7] by fetching: http://mirrors.acm.wpi.edu/archlinux/core/os/x86_64/core.db
    speed: 124463.25783976547 (0.11MiB/s)
Checking download speed of mirrors.advancedhosters.com[3] by fetching: http://mirrors.advancedhosters.com/archlinux/core/os/x86_64/core.db
    speed: 499578.50582912023 (0.47MiB/s)
Checking download speed of mirrors.ocf.berkeley.edu[2] by fetching: http://mirrors.ocf.berkeley.edu/archlinux/core/os/x86_64/core.db
    speed: 1465614.9172213217 (1.39MiB/s)
Checking download speed of mirrors.ocf.berkeley.edu[2] by fetching: https://mirrors.ocf.berkeley.edu/archlinux/core/os/x86_64/core.db
    speed: 2529907.2286376194 (2.41MiB/s)
Checking download speed of arlm.tyzoid.com[1] by fetching: http://arlm.tyzoid.com/core/os/x86_64/core.db
    speed: 157792.78416617986 (0.15MiB/s)
Checking download speed of arlm.tyzoid.com[3] by fetching: https://arlm.tyzoid.com/core/os/x86_64/core.db
Traceback (most recent call last):
  File "/usr/lib/python3.12/urllib/request.py", line 1344, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.12/http/client.py", line 1336, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.12/http/client.py", line 1382, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.12/http/client.py", line 1331, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.12/http/client.py", line 1091, in _send_output
    self.send(msg)
  File "/usr/lib/python3.12/http/client.py", line 1035, in send
    self.connect()
  File "/usr/lib/python3.12/http/client.py", line 1477, in connect
    self.sock = self._context.wrap_socket(self.sock,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1042, in _create
    self.do_handshake()
  File "/usr/lib/python3.12/ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/archinstall/__init__.py", line 356, in run_as_a_module
    main()
  File "/usr/lib/python3.12/site-packages/archinstall/__init__.py", line 331, in main
    importlib.import_module(mod_name)
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3.12/site-packages/archinstall/scripts/guided.py", line 224, in <module>
    ask_user_questions()
  File "/usr/lib/python3.12/site-packages/archinstall/scripts/guided.py", line 97, in ask_user_questions
    global_menu.run()
  File "/usr/lib/python3.12/site-packages/archinstall/lib/menu/abstract_menu.py", line 328, in run
    if not self._process_selection(value):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/menu/abstract_menu.py", line 345, in _process_selection
    return self.exec_option(config_name, selector)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/menu/abstract_menu.py", line 366, in exec_option
    result = selector.func(cur_value)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/global_menu.py", line 58, in <lambda>
    lambda preset: self._mirror_configuration(preset),
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/global_menu.py", line 455, in _mirror_configuration
    mirror_configuration = MirrorMenu(data_store, preset=preset).run()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/mirrors.py", line 235, in run
    super().run(allow_reset=allow_reset)
  File "/usr/lib/python3.12/site-packages/archinstall/lib/menu/abstract_menu.py", line 328, in run
    if not self._process_selection(value):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/menu/abstract_menu.py", line 345, in _process_selection
    return self.exec_option(config_name, selector)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/menu/abstract_menu.py", line 366, in exec_option
    result = selector.func(cur_value)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/mirrors.py", line 210, in <lambda>
    lambda preset: select_mirror_regions(preset),
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/mirrors.py", line 277, in select_mirror_regions
    f"{mirror.url}$repo/os/$arch" for mirror in sort_mirrors_by_performance(mirrors[selected])
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/mirrors.py", line 290, in sort_mirrors_by_performance
    return sorted(mirror_list, key=lambda mirror: (mirror.score, mirror.speed))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/mirrors.py", line 290, in <lambda>
    return sorted(mirror_list, key=lambda mirror: (mirror.score, mirror.speed))
                                                                 ^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/archinstall/lib/models/mirrors.py", line 43, in speed
    with urllib.request.urlopen(req, None, 5) as handle, DownloadTimer(timeout=5) as timer:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 515, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 532, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 1392, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 1347, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)>

describe the problem

Description of the issue

After booting from the Arch install ISO (version 2024.08.01) and upgrading archinstall to the latest version (2.8.4-1) using pacman -Sy, selecting the United States mirror triggers a process to determine the fastest mirror. However, this process fails with the following error: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)>.

The log has been provided for additional details.

Torxed commented 3 weeks ago

Thanks, I'll push a fix in a bit. I appreciate everyone reporting these issues since the speed-test is a new feature. Fixes appears to be simple catch fixes atm so that's nice :)

0xPerseus commented 3 weeks ago

Thanks, I'll push a fix in a bit. I appreciate everyone reporting these issues since the speed-test is a new feature. Fixes appears to be simple catch fixes atm so that's nice :)

Happy to help wherever possible. Thanks for the prompt response and assistance here.

Torxed commented 3 weeks ago

Fixed, pushing a new release in time for ISO build in a few days.