Pacman-mirrors incorrect geo-ip/continent

Currently, the pacman-mirrors wiki guide suggests a few options for restricting mirrors based on physical location. I’ve encountered some difficulties in getting this to work correctly, however.

My attempts auto-generate the mirrorlist using the --geoip flag return the following:

$ sudo pacman-mirrors --geoip 
::INFO Downloading mirrors from repo.manjaro.org
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  0.896 Australia      : https://manjaro.lucassymons.net/
  2.180 Australia      : https://mirror.aarnet.edu.au/pub/manjaro/
  1.912 Australia      : http://mirror.aarnet.edu.au/pub/manjaro/
::INFO Writing mirror list
::Australia       : https://manjaro.lucassymons.net/stable
::Australia       : https://mirror.aarnet.edu.au/pub/manjaro/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist

Additionally, using the --continent flag returns:

$ sudo pacman-mirrors --continent
::INFO Downloading mirrors from repo.manjaro.org
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  1.894 Bangladesh     : http://mirror.xeonbd.com/manjaro/
  1.374 China          : https://mirrors.aliyun.com/manjaro/
  2.371 China          : https://mirrors.tuna.tsinghua.edu.cn/manjaro/
  1.948 China          : https://mirrors.tuna.tsinghua.edu.cn/manjaro/
  2.755 China          : https://mirrors.sjtug.sjtu.edu.cn/manjaro/
  1.988 Georgia        : https://manjaro.grena.ge/
  1.562 Georgia        : http://manjaro.grena.ge/
  ..... Hong_Kong      : http://ftp.cuhk.edu.hk/pub/Linux/manjaro/
  ..... Hong_Kong      : ftp://ftp.cuhk.edu.hk/pub/Linux/manjaro/

::ERROR No connection adapters were found for 'ftp://ftp.cuhk.edu.hk/pub/Linux/manjaro/stable/core/x86_64/core.db.tar.gz'

  1.135 Indonesia      : https://mirror.deace.id/manjaro/
  1.282 Indonesia      : http://mirror.deace.id/manjaro/
  1.693 Japan          : http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/
  1.795 Philippines    : http://mirror.rise.ph/manjaro/
  ..... Philippines    : ftp://mirror.rise.ph/manjaro/

::ERROR No connection adapters were found for 'ftp://mirror.rise.ph/manjaro/stable/core/x86_64/core.db.tar.gz'

  2.663 Singapore      : https://download.nus.edu.sg/mirror/manjaro/
  1.654 South_Korea    : https://mirror.d-tl.com/manjaro/
  1.588 Taiwan         : http://free.nchc.org.tw/manjaro/
::INFO Writing mirror list
::Indonesia       : https://mirror.deace.id/manjaro/stable
::China           : https://mirrors.aliyun.com/manjaro/stable
::Georgia         : https://manjaro.grena.ge/stable
::Taiwan          : http://free.nchc.org.tw/manjaro/stable
::South_Korea     : https://mirror.d-tl.com/manjaro/stable
::Japan           : http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/stable
::Bangladesh      : http://mirror.xeonbd.com/manjaro/stable
::China           : https://mirrors.tuna.tsinghua.edu.cn/manjaro/stable
::China           : https://mirrors.tuna.tsinghua.edu.cn/manjaro/stable
::Singapore       : https://download.nus.edu.sg/mirror/manjaro/stable
::China           : https://mirrors.sjtug.sjtu.edu.cn/manjaro/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist

Versioning:

$ pacman-mirrors --version
Version 4.20.0

$ uname -a
Linux localhost 5.9.16-1-MANJARO ... x86_64 GNU/Linux

It appears that pacman-mirrors resolved my location to be in Australia or Asia, when, in fact, my location is central United States. Using the recommended ‘reset’ command (sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu) before the above commands did not help either.

I confirmed that other geolocation services can correctly resolve my location.

After a bit of researching, I haven’t found any relevant forum posts, which leads me to believe I’m somehow using these flags incorrectly. Any advice on the correct usage would be appreciated.

1 Like

I really must agree with @tnierman

I live in Brasil and took the test and the same Australia repository was the target

So for me to go back to the national mirrors

sudo pacman-mirrors -c Brazil

Best regards

T+ = So long

That is peculiar - to say the least … something has completely gone upside down …

I will dig into that :confused:

2 Likes

I have confirmed it and fixed it.

the updated package v4.20.1-1 has been pushed to all branches

1 Like

Updating to 4.20.1-1 did indeed fix the issue. Thanks for looking into it @linux-aarhus!

Thank’s and congratulations for your work
   ~  sudo pacman-mirrors --geoip  :heavy_check_mark:  5m 17s 
[sudo] senha para cretoii:
::INFO Downloading mirrors from repo.manjaro.org
DEBUG ME: Brazil

::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  ..... Brazil         : https://manjaro.c3sl.ufpr.br/
  ..... Brazil         : http://linorg.usp.br/manjaro/
  0.574 Brazil         : https://www.caco.ic.unicamp.br/manjaro/
::INFO Writing mirror list
::Brazil          : https://www.caco.ic.unicamp.br/manjaro/stable
::Brazil          : http://linorg.usp.br/manjaro/stable
::Brazil          : https://manjaro.c3sl.ufpr.br/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
    ~                                                           ✔  32s  

Sorry my bad english

T+ = So long

My Location (Germany) is correct, but since yesterday after downloading your update i see a adapter connection error when im using: “sudo pacman-mirrors --fasttrack && sudo pacman -Syyu”

::INFO Downloading mirrors from repo.manjaro.org
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  1.130 Germany        : https://mirror.alpix.eu/manjaro/
  1.066 Germany        : http://ftp.tu-chemnitz.de/pub/linux/manjaro/
  ..... Germany        : ftp://ftp.tu-chemnitz.de/pub/linux/manjaro/

::ERROR No connection adapters were found for 'ftp://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/core/x86_64/core.db.tar.gz'

  1.072 Germany        : https://manjaro.re/
  0.967 Germany        : http://manjaro.re/
  1.078 Germany        : https://manjaro.moson.eu/
  0.981 Germany        : http://manjaro.moson.eu/
  1.075 Germany        : https://manjaro.moson.org/
  0.979 Germany        : http://manjaro.moson.org/
  1.078 Germany        : https://ftp.halifax.rwth-aachen.de/manjaro/
  ..... Germany        : ftp://ftp.halifax.rwth-aachen.de/manjaro/

::ERROR No connection adapters were found for 'ftp://ftp.halifax.rwth-aachen.de/manjaro/stable/core/x86_64/core.db.tar.gz'

  1.040 Germany        : https://mirror.atysleaks.org/manjaro/
  1.061 Germany        : http://mirror.atysleaks.org/manjaro/
  1.045 Germany        : https://mirror.netcologne.de/manjaro/
  1.019 Germany        : https://mirror.23media.com/manjaro/
  0.949 Germany        : http://mirror.23media.com/manjaro/
::INFO Writing mirror list
::Germany         : https://mirror.23media.com/manjaro/stable/$repo/$arch
::Germany         : https://manjaro.re/stable/$repo/$arch
::Germany         : https://manjaro.moson.org/stable/$repo/$arch
::Germany         : https://manjaro.moson.eu/stable/$repo/$arch
::Germany         : https://mirror.netcologne.de/manjaro/stable/$repo/$arch
::Germany         : https://mirror.atysleaks.org/manjaro/stable/$repo/$arch
::Germany         : https://mirror.alpix.eu/manjaro/stable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
:: Synchronizing package databases...
 core                                   164.9 KiB  1918 KiB/s 00:00 [#####################################] 100%
 extra                                 2000.5 KiB  1796 KiB/s 00:01 [#####################################] 100%
 community                                6.6 MiB  1775 KiB/s 00:04 [#####################################] 100%
 multilib                               180.5 KiB  2.05 MiB/s 00:00 [#####################################] 100%
:: Starting full system upgrade...
 there is nothing to do

Should i ignore this connection issue or is there a way to fix it by myself?

Edit:
Im also noticed that Terminal command showed this:

pacman-mirrors --version   
Version 4.20.1

But in the GUI when i look at pacman-mirrors, the already installed version 4.20.1-1 showed up.

When you see a version 4.20.1-1 in Pamac gui you will see the package version too. This is signified with the -1

You can ignore the message - it has appeared after the rewrite to use the requests library - so I will have to look at the options for the requests library - I haven’t had time to dive into that aspect fully yet - but I think it is because requests library is for http.

The next version with yet a bugfix is already in testing and unstable. v4.20.2.

Staging, Testing and Unstable has 4.21.0

1 Like

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