Pacman-mirrors fails with connection errors


Running pamac upgrade gives:

Cloning touche build files...
Checking touche dependencies...
Synchronizing package databases... Could not connect: Socket I/O timed out Could not connect: Socket I/O timed out
^C Could not connect: Socket I/O timed out

So I tried updating the mirrorlist as per this post

Running sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu gives:

::INFO Branch in config is changed
::INFO Protocols in config is changed
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool:
::INFO => Mirror status:
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  2.139 Australia      :
  ..... Austria        :
  ..... Austria        :
  ..... Bangladesh     :
  ..... Belarus        :
  ..... Belgium        :
  ..... Belgium        :
  2.559 Belgium        :
  ..... Belgium        :

#######truncating to save space###########

  2.856 Spain          :
  ..... Spain          :
  1.292 Sweden         :
  1.951 Sweden         :
  1.931 Sweden         :
  ..... Sweden         :

::ERROR Connection: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /mirror/manjaro/stable/core/x86_64/core.db.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fb0db2e6eb0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

  ..... Sweden         :

::ERROR Connection: HTTPConnectionPool(host='', port=80): Max retries exceeded with url: /mirror/manjaro/stable/core/x86_64/core.db.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb0db2e6c10>: Failed to establish a new connection: [Errno -2] Name or service not known'))

  ..... Sweden         : (most recent call last):
  File "/usr/lib/python3.9/urllib/", line 1553, in ftp_open
    host = socket.gethostbyname(host)
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pacman_mirrors/functions/", line 162, in get_ftp_response
    with closing(request.urlopen(url, timeout=maxwait)) as r:
  File "/usr/lib/python3.9/urllib/", line 214, in urlopen
    return, data, timeout)
  File "/usr/lib/python3.9/urllib/", line 517, in open
    response = self._open(req, data)
  File "/usr/lib/python3.9/urllib/", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.9/urllib/", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/", line 1555, in ftp_open
    raise URLError(msg)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pacman-mirrors", line 28, in <module>
  File "/usr/lib/python3.9/site-packages/pacman_mirrors/", line 124, in run
  File "/usr/lib/python3.9/site-packages/pacman_mirrors/builder/", line 56, in build_mirror_list
    work_pool = test_mirror_pool(self=self, worklist=work_pool)
  File "/usr/lib/python3.9/site-packages/pacman_mirrors/functions/", line 82, in test_mirror_pool
    mirror_proto["resp_time"] = get_mirror_response(
  File "/usr/lib/python3.9/site-packages/pacman_mirrors/functions/", line 202, in get_mirror_response
    message = get_ftp_response(url=probe_url, maxwait=maxwait)
  File "/usr/lib/python3.9/site-packages/pacman_mirrors/functions/", line 166, in get_ftp_response
    if e.reason.find('No such file or directory') >= 0:
AttributeError: 'gaierror' object has no attribute 'find'

I’m not sure what to do here. It seems the error returned by the Swedish repo is causing issues, but I’m not sure how to interpret that, or how to upgrade from a specific mirror.

Other info
I upgraded pamac twice yesterday as the AUR issue was being dealt with, so I think I’m on the latest version of that.

Running Manjaro KDE, output of inxi --full --verbosity=7 --filter --no-host:

System:    Kernel: 5.10.30-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: KDE Plasma 5.21.4 tk: Qt 5.15.2 
           wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux 
Machine:   Type: Laptop System: GOOGLE product: Samus v: EVT1 serial: <filter> Chassis: type: 9 serial: <filter> 
           Mobo: GOOGLE model: Samus v: EVT1 serial: <filter> UEFI: coreboot v: MrChromebox-4.12 date: 06/04/2020 
Battery:   ID-1: BAT0 charge: 17.1 Wh (25.7%) condition: 66.5/72.3 Wh (91.9%) volts: 7.4 min: 7.6 model: SMP-ATL A55 
           type: Li-ion serial: <filter> status: Discharging cycles: 361 
Memory:    RAM: total: 15.51 GiB used: 6.35 GiB (40.9%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: Dual Core model: Intel Core i7-5500U bits: 64 type: MT MCP arch: Broadwell rev: 4 cache: L2: 4 MiB 
           bogomips: 19156 
           Speed: 2381 MHz min/max: 500/3000 MHz Core speeds (MHz): 1: 2381 2: 2342 3: 2439 4: 2606 
           Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon avx avx2 bmi1 bmi2 bts clflush cmov 
           constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority 
           flush_l1d fma fpu fsgsbase fxsr ht ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm lm mca mce md_clear 
           mmx monitor movbe msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt 
           pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp 
           syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt xtopology 
Graphics:  Device-1: Intel HD Graphics 5500 driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:1616 class-ID: 0300 
           Device-2: Silicon Motion NCM-G102 type: USB driver: uvcvideo bus-ID: 1-7:3 chip-ID: 2232:6001 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: intel unloaded: modesetting 
           alternate: fbdev,vesa resolution: 2560x1700~60Hz s-dpi: 96 
           OpenGL: renderer: Mesa Intel HD Graphics 5500 (BDW GT2) v: 4.6 Mesa 21.0.2 direct render: Yes 
Audio:     Device-1: Intel Broadwell-U Audio driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:160c 
           class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.30-1-MANJARO running: yes 
           Sound Server-2: JACK v: 0.125.0 running: no 
           Sound Server-3: PulseAudio v: 14.2 running: yes 
           Sound Server-4: PipeWire v: 0.3.25 running: yes 
Network:   Device-1: Intel Wireless 7260 driver: iwlwifi v: kernel port: 1840 bus-ID: 01:00.0 chip-ID: 8086:08b1 
           class-ID: 0280 
           IF: wlp1s0 state: up mac: <filter> 
           IP v4: <filter> type: dynamic noprefixroute scope: global broadcast: <filter> 
           IP v6: <filter> type: noprefixroute scope: link 
           WAN IP: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-8:4 chip-ID: 8087:07dc 
           class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: enabled,running rfk-block: hardware: no software: yes 
           address: see --recommends 
Logical:   Message: No logical block device data found. 
           Device-1: luks-a96e049c-e778-4268-bf3f-24bda6abb66c type: LUKS dm: dm-0 size: 59.32 GiB 
           Components: p-1: sda2 
RAID:      Message: No RAID data found. 
Drives:    Local Storage: total: 242.97 GiB used: 232.87 GiB (95.8%) 
           ID-1: /dev/sda vendor: Kingston model: RBU-SUS151S364GD size: 59.63 GiB speed: 6.0 Gb/s rotation: SSD 
           serial: <filter> rev: 02.3 scheme: GPT 
           ID-2: /dev/sdb type: USB vendor: Generic model: Power Saving USB size: 183.35 GiB serial: <filter> rev: 0260 
           scheme: MBR 
           Message: No optical or floppy data found. 
Partition: ID-1: / size: 58.09 GiB used: 28.63 GiB (49.3%) fs: ext4 dev: /dev/dm-0 
           mapped: luks-a96e049c-e778-4268-bf3f-24bda6abb66c label: N/A uuid: 7ec25ccd-995c-42df-9a15-e4776a67ccd5 
           ID-2: /boot/efi size: 299.4 MiB used: 448 KiB (0.1%) fs: vfat dev: /dev/sda1 label: NO_LABEL uuid: 7C26-72F2 
           ID-3: /home/<filter>/Nextcloud size: 1 PiB used: 204.23 GiB (0.0%) fs: fuse.rclone source: ERR-102 label: N/A 
           uuid: N/A 
Swap:      ID-1: swap-1 type: file size: 8 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile 
Unmounted: ID-1: /dev/sdb1 size: 183.33 GiB fs: <superuser required> label: N/A uuid: N/A 
USB:       Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 11 rev: 2.0 speed: 480 Mb/s chip-ID: 1d6b:0002 
           class-ID: 0900 
           Device-1: 1-4:2 info: Genesys Logic microSD Reader/Writer type: Mass Storage driver: usb-storage interfaces: 1 
           rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 05e3:0727 class-ID: 0806 serial: <filter> 
           Device-2: 1-7:3 info: Silicon Motion NCM-G102 type: Video driver: uvcvideo interfaces: 2 rev: 2.0 
           speed: 480 Mb/s power: 500mA chip-ID: 2232:6001 class-ID: 0e02 
           Device-3: 1-8:4 info: Intel Bluetooth wireless interface type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 
           speed: 12 Mb/s power: 100mA chip-ID: 8087:07dc class-ID: e001 
           Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 speed: 5 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:   System Temperatures: cpu: 97.5 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 250 Uptime: 15h 04m wakeups: 2 Init: systemd v: 247 Compilers: gcc: 10.2.0 Packages: pacman: 1376 
           Shell: Bash v: 5.1.0 running-in: yakuake inxi: 3.3.04 

Thank you.

I guess a bug with ftp ? (twice ... in get_ftp_response) Try with only https protocol

EDIT: ok, at @linux-aarhus to view if “new” code is ftp compliant

1 Like

It works with --protocol https, thanks a lot!

This is most likely due a faulty configuration of the ftp server.

Or it could be an error in the mirror pool.

But I will see what I can do - to handle it more gracefully.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.