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 08: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-03-2019 11:18 PM

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 05:55 AM

what does this have to do with pacstrap?

stf92 05-04-2019 08: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 04: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 12:24 PM

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

stf92 05-05-2019 12:30 PM

Where are they?

drillsar 05-05-2019 04:35 PM

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

stf92 05-05-2019 06: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 07: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 04:31 PM

the command is pacman -Syyu not -Syu

stf92 05-07-2019 06: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-08-2019 11:55 PM

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 06:10 PM

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

drillsar 05-10-2019 08:32 PM

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

ondoho 05-11-2019 03:54 AM

also 'pacman -Scc'

stf92 05-11-2019 08:35 PM

I did 'rm -r /var/cache/pacman/pkg' as ondoho pointed out. Then 'pacman -Syyuu'. The result was
Code:

xfce4-whiskermenu-plugin-2.3.2-1-x86_64                175.9 KiB  6.61M/s 00:00 [##############################################] 100%
(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] Y
error: libtiff: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/libtiff-4.0.10-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: jasper: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/jasper-2.0.16-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: confuse: signature from "Baptiste Jonglez <baptiste@bitsofnetworks.org>" is unknown trust
:: File /var/cache/pacman/pkg/confuse-3.2.2-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: libssh2: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/libssh2-1.8.1-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: giflib: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/giflib-5.1.9-3-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: nasm: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: 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/var/cache/pacman# pacman -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] Y
removing unused sync repositories...
root@darkstar/var/cache/pacman#

And again 'pacman -Syyuu' gave the same result. I'll try to install djvu libre and see what happens.

stf92 05-12-2019 06:21 PM

I could install the package djvulibre without any errors.

drillsar 05-15-2019 01:06 PM

Maybe reinstall Arch? Looks like a corrputed system.. did you check signatures before installing arch?>

stf92 05-15-2019 06:21 PM

I installed an iso image several months old and got the error whereby pacstrap did nothing. Maybe if I install a recent image then there will be no errors. Also there is the following, which applies to another machine:

As as running pacman -Syyu I got the 10000ms time out I ended up issuing ^C thus cancelling the command. Is it possible this is the cause of the error I now get and which made you tthink the system is corrupted? Thank you drillsar for your posts.

drillsar 05-15-2019 07:22 PM

you supposed to check arch iso with signatures before installing to make sure it isnt corrupted.

stf92 05-15-2019 08:44 PM

Alright. I did
Code:

bill@darkstar/almacen/soft/arch$ ls -l
total 624240
-rw-r--r-- 1 bill bill 638582784 May 15 22:48 archlinux-2019.05.02-x86_64.iso
-rw-r--r-- 1 bill bill      310 May 15 22:45 archlinux-2019.05.02-x86_64.iso.sig
-rw-r--r-- 1 bill bill        33 May 15 22:44 md5
bill@darkstar/almacen/soft/arch$ pacman-key -v archlinux-2019.05.02-x86_64.iso.sig
==> Checking archlinux-2019.05.02-x86_64.iso.sig...
gpg: assuming signed data in 'archlinux-2019.05.02-x86_64.iso'
gpg: Signature made Thu 02 May 2019 12:53:47 PM -03
gpg:                using RSA key 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
gpg: Note: trustdb not writable
gpg: Good signature from "Pierre Schmitz <pierre@archlinux.de>" [full]
bill@darkstar/almacen/soft/arch$

I hope this is enough (I already checked the md5 checksum).

drillsar 05-15-2019 09:43 PM

Yes loooks goood


All times are GMT -5. The time now is 08:51 AM.