LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (https://www.linuxquestions.org/questions/arch-29/)
-   -   pacman: connection timed out after 10000 milliseconds. (https://www.linuxquestions.org/questions/arch-29/pacman-connection-timed-out-after-10000-milliseconds-4175653289/)

stf92 05-03-2019 09:18 PM

pacman: connection timed out after 10000 milliseconds.
 
Hi: Every time I use pacman -S I get the following message:
Code:


error: failed retrieving file 'xxxxxxxxxxxxx' from mirrors.xjtu.edu.cn : connection timed out after 10000 milliseconds.

And for each package I must wait 10 seconds, irrespective of the package size. Worse: I was doing pacstrap /mnt base and, for each package, at least 10 seconds. A way to solve this?

pacstrap ends outputing this message:
Code:

ERROR: Failed to install packages to new root

drillsar 05-04-2019 12:18 AM

I would think it's the mirrorlist and you need to update it.


Mirrorlist generator
https://www.archlinux.org/mirrorlist/

Pic 5 of them and replace the above file to /etc/pacman.d/mirrorlist

after that issue this command:

Code:

pacman -Syyu
You can also install package pacman-contrib this will give you mirrorlist rankings by speed

If you install that package Pacman -S pacman-contrib backup the mirrorlist

Code:

cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
From there you can rank them by running this command:

Code:

rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist

ondoho 05-04-2019 06:55 AM

what does this have to do with pacstrap?

stf92 05-04-2019 09:10 AM

Quote:

Originally Posted by ondoho (Post 5991382)
what does this have to do with pacstrap?

pacstrap outputs the same messages as pacman.

stf92 05-04-2019 05:03 PM

I generated (www.archlinux.org/mirrorlist) this list:
Code:


## Chile
#Server = http://mirror.archlinux.cl/$repo/os/$arch

## Brazil
#Server = http://br.mirror.archlinux-br.org/$repo/os/$arch
#Server = http://archlinux.c3sl.ufpr.br/$repo/os/$arch
#Server = http://www.caco.ic.unicamp.br/archlinux/$repo/os/$arch
#Server = https://www.caco.ic.unicamp.br/archlinux/$repo/os/$arch
#Server = http://linorg.usp.br/archlinux/$repo/os/$arch
#Server = http://pet.inf.ufsc.br/mirrors/archlinux/$repo/os/$arch
#Server = http://archlinux.pop-es.rnp.br/$repo/os/$arch
#Server = http://mirror.ufam.edu.br/archlinux/$repo/os/$arch
#Server = http://mirror.ufscar.br/archlinux/$repo/os/$arch


## Paraguay
#Server = http://archlinux.mirror.py/archlinux/$repo/os/$arch

## United States
#Server = http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch
#Server = http://mirrors.advancedhosters.com/archlinux/$repo/os/$arch
#Server = http://mirrors.aggregate.org/archlinux/$repo/os/$arch
#Server = http://ca.us.mirror.archlinux-br.org/$repo/os/$arch
#Server = http://il.us.mirror.archlinux-br.org/$repo/os/$arch
#Server = http://archlinux.surlyjake.com/archlinux/$repo/os/$arch
#Server = https://archlinux.surlyjake.com/archlinux/$repo/os/$arch
#Server = http://arlm.tyzoid.com/$repo/os/$arch
#Server = https://arlm.tyzoid.com/$repo/os/$arch
#Server = http://mirrors.cat.pdx.edu/archlinux/$repo/os/$arch
#Server = http://mirror.cc.columbia.edu/pub/linux/archlinux/$repo/os/$arch
#Server = http://arch.mirror.constant.com/$repo/os/$arch
#Server = https://arch.mirror.constant.com/$repo/os/$arch
#Server = http://mirror.cs.pitt.edu/archlinux/$repo/os/$arch
#Server = http://mirror.cs.vt.edu/pub/ArchLinux/$repo/os/$arch
#Server = http://distro.ibiblio.org/archlinux/$repo/os/$arch
#Server = http://mirror.es.its.nyu.edu/archlinux/$repo/os/$arch
#Server = http://mirrors.gigenet.com/archlinux/$repo/os/$arch
#Server = http://www.gtlib.gatech.edu/pub/archlinux/$repo/os/$arch
#Server = http://mirror.dc02.hackingand.coffee/arch/$repo/os/$arch
#Server = https://mirror.dc02.hackingand.coffee/arch/$repo/os/$arch
#Server = http://repo.ialab.dsu.edu/archlinux/$repo/os/$arch
#Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch
#Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch
#Server = http://mirror.dal10.us.leaseweb.net/archlinux/$repo/os/$arch
#Server = http://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch
#Server = http://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch
#Server = https://mirror.dal10.us.leaseweb.net/archlinux/$repo/os/$arch
#Server = https://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch
#Server = https://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch
#Server = http://mirrors.liquidweb.com/archlinux/$repo/os/$arch
#Server = http://mirror.lty.me/archlinux/$repo/os/$arch
#Server = https://mirror.lty.me/archlinux/$repo/os/$arch
#Server = http://reflector.luehm.com/arch/$repo/os/$arch
#Server = https://reflector.luehm.com/arch/$repo/os/$arch
#Server = http://mirrors.lug.mtu.edu/archlinux/$repo/os/$arch
#Server = https://mirrors.lug.mtu.edu/archlinux/$repo/os/$arch
#Server = http://mirror.math.princeton.edu/pub/archlinux/$repo/os/$arch
#Server = http://mirror.metrocast.net/archlinux/$repo/os/$arch
#Server = http://mirror.kaminski.io/archlinux/$repo/os/$arch
#Server = https://mirror.kaminski.io/archlinux/$repo/os/$arch
#Server = http://repo.miserver.it.umich.edu/archlinux/$repo/os/$arch
#Server = http://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
#Server = https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
#Server = http://ftp.osuosl.org/pub/archlinux/$repo/os/$arch
#Server = http://arch.mirrors.pair.com/$repo/os/$arch
#Server = http://mirrors.rit.edu/archlinux/$repo/os/$arch
#Server = https://mirrors.rit.edu/archlinux/$repo/os/$arch
#Server = http://mirrors.rutgers.edu/archlinux/$repo/os/$arch
#Server = https://mirrors.rutgers.edu/archlinux/$repo/os/$arch
#Server = http://mirror.siena.edu/archlinux/$repo/os/$arch
#Server = http://mirrors.sonic.net/archlinux/$repo/os/$arch
#Server = https://mirrors.sonic.net/archlinux/$repo/os/$arch
#Server = http://arch.mirror.square-r00t.net/$repo/os/$arch
#Server = https://arch.mirror.square-r00t.net/$repo/os/$arch
#Server = http://mirror.stephen304.com/archlinux/$repo/os/$arch
#Server = https://mirror.stephen304.com/archlinux/$repo/os/$arch
#Server = http://trapbot.site/arch/$repo/os/$arch
#Server = http://mirror.umd.edu/archlinux/$repo/os/$arch
#Server = http://mirror.vtti.vt.edu/archlinux/$repo/os/$arch
#Server = http://mirrors.xmission.com/archlinux/$repo/os/$arch
#Server = http://mirrors.xtom.com/archlinux/$repo/os/$arch
#Server = https://mirrors.xtom.com/archlinux/$repo/os/$arch


root@darkstar/etc/pacman.d#

I live in Argentina. I must uncomment the lines hwich I think can be done with search and replace (vim). I left "use mirror staatus unchecked". Now I'll try to rank them by speed.

RickDeckard 05-05-2019 01:24 PM

If it's not that then the second place you can look is your DNS settings.

stf92 05-05-2019 01:30 PM

Where are they?

drillsar 05-05-2019 05:35 PM

Did you check /etc/resolv.conf ? did you try ping to actually see if you have internet access?

stf92 05-05-2019 07:37 PM

Of course I have internet access. pacman downloads every thing. Only that it waits 10000ms before actually downloading (it finds another url).
Code:

bill@darkstar/etc$ cat resolv.conf
# Generated by resolvconf
domain fibertel.com.ar
nameserver 200.49.130.47
nameserver 200.42.4.210
bill@darkstar/etc$


stf92 05-05-2019 08:11 PM

Quote:

Originally Posted by drillsar (Post 5991289)
I would think it's the mirrorlist and you need to update it.


Mirrorlist generator
https://www.archlinux.org/mirrorlist/

Pic 5 of them and replace the above file to /etc/pacman.d/mirrorlist

after that issue this command:

Code:

pacman -Syyu
You can also install package pacman-contrib this will give you mirrorlist rankings by speed

If you install that package Pacman -S pacman-contrib backup the mirrorlist

Code:

cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
From there you can rank them by running this command:

Code:

rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist

I replaced mirrorlist and no more connection timed outs. But when it checks package integrity it finds errors. Finally it says:
Code:

Error: failed to commit transaction. Errors ocurred. No packages were upgraded.
This in response to 'pacman -Syu'.

drillsar 05-07-2019 05:31 PM

the command is pacman -Syyu not -Syu

stf92 05-07-2019 07:50 PM

I did 'pacman -Syyu' and got
Code:

:: Proceed with installation? [Y/n] Y
(451/451) checking keys in keyring                                                [##############################################] 100%
(451/451) checking package integrity                                              [##############################################] 100%
error: libseccomp: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/libseccomp-2.4.0-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]

and the same for other packages. Finally I get
Code:

:: File /var/cache/pacman/pkg/nasm-2.14.02-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
root@darkstar~#

What is wrong?

ondoho 05-09-2019 12:55 AM

you could simply delete the whole pacman cache, then try again.
I'll put one on top:
Code:

pacman -Syyuu
maybe you still need to do something after that; i suggest reading https://wiki.archlinux.org/index.php/Pacman

stf92 05-09-2019 07:10 PM

You mean 'rm -r /var/cache/pacman'?

drillsar 05-10-2019 09:32 PM

go to the reading that ondoho suggested and look for Cleaning the package cache


All times are GMT -5. The time now is 10:11 PM.