You are not logged in.

#1 2018-12-22 13:45:22

bidetaggle
Member
Registered: 2018-12-22
Posts: 7

failed retrieving file 'core.db' from... when connected on the wifi

Hi there,

I've just moved home today and pacman doesn't work when I'm connected on wifi:

sudo pacman -Suy  
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from ftp.ntua.gr : Resolving timed out after 10000 milliseconds
error: failed retrieving file 'core.db' from archlinux.mirrors.uk2.net : Resolving timed out after 10000 milliseconds
error: failed retrieving file 'core.db' from pet.inf.ufsc.br : Resolving timed out after 10000 milliseconds
error: failed retrieving file 'core.db' from archlinux.mirrors.benatherton.com : Resolving timed out after 10000 milliseconds
etc...

But no problem to update once I connect to my phone's hotspot. Is there a rational explanation (and how to fix this problem) ?
Thanks big_smile

Offline

#2 2018-12-22 15:08:19

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,472

Re: failed retrieving file 'core.db' from... when connected on the wifi

Seems like a DNS problem. Can you issue `ping www.google.com` and ping 8.8.8.8 to see what happens? Can you connect to the internet at all? Can you try to force your system to use Google DNS (8.8.8.8)? Also what is the content of /etc/resolv.conf?

Last edited by olive (2018-12-22 15:10:24)

Offline

#3 2018-12-22 15:56:40

bidetaggle
Member
Registered: 2018-12-22
Posts: 7

Re: failed retrieving file 'core.db' from... when connected on the wifi

Not a DNS problem apparently

$ ping www.google.com
PING www.google.com (216.58.212.164) 56(84) bytes of data.
64 bytes from ams15s22-in-f4.1e100.net (216.58.212.164): icmp_seq=1 ttl=52 time=67.4 ms
$ ping 8.8.8.8       
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=122 time=59.5 ms

Yes, I can browse on the internet as well, I can reach my server in ssh, everything seems normal except pacman

$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
nameserver fe80::1%wlp1s0

wlp1s0 is my network interface name.

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:c2:c6:f0:26:de brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.19/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp1s0
       valid_lft 84199sec preferred_lft 84199sec
    inet6 fe80::e28b:980a:3cd7:270c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:41:1c:44:43 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

Offline

#4 2018-12-22 16:04:56

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,887

Re: failed retrieving file 'core.db' from... when connected on the wifi

There's one thing that strikes me as odd : all replies are ipv4 .
Do you have ipv6 disabled ?


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Online

#5 2018-12-22 16:21:16

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,472

Re: failed retrieving file 'core.db' from... when connected on the wifi

What happens if you try to download the core.db file manually, for example with wget?

Offline

#6 2018-12-22 16:59:59

bidetaggle
Member
Registered: 2018-12-22
Posts: 7

Re: failed retrieving file 'core.db' from... when connected on the wifi

Lone_Wolf wrote:

There's one thing that strikes me as odd : all replies are ipv4 .
Do you have ipv6 disabled ?

Can you tell me exactly how to know if it's enabled or not ? It seems ok according to this command:

$ ip -6 addr show wlp1s0
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::e28b:980a:3cd7:270c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

By the way, I don't have a file like /etc/sysctl.d/40-ipv6.conf

$ ls /etc/sysctl.d 
40-max-user-watches.conf
olive wrote:

What happens if you try to download the core.db file manually, for example with wget?

How can I find the link to try ? I've tried $ wget archlinux.mirrors.uk2.net/core.db but I guess it's a wrong address

Last edited by bidetaggle (2018-12-22 17:02:28)

Offline

#7 2018-12-22 17:27:53

loqs
Member
Registered: 2014-03-06
Posts: 7,673

Re: failed retrieving file 'core.db' from... when connected on the wifi

Pass the --debug option to pacman to show the urls it is using.

Offline

#8 2018-12-23 03:06:00

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,853

Re: failed retrieving file 'core.db' from... when connected on the wifi

pacman -Sup

Will print (-p) the file locations for all packages that are in the current full system update (-u).

For packages available in the cache, this will be file:///var/cache/pacman/pkg urls, for packages that still need to be downloaded, this will be http urls that you can use to download. You can also use a package you definitely don't have installed, in order to retrieve the correct url. The core.db will just be swapping out the last component, but I assume any file from the mirror would have the same error.

For the current version of pacman, you can now use

$ pacman-conf --repo core Server
https://mex.mirror.pkgbuild.com/core/os/x86_64
http://arch.mirror.square-r00t.net/core/os/x86_64
http://mirrors.rit.edu/archlinux/core/os/x86_64
http://mirror.epiphyte.network/archlinux/core/os/x86_64
http://mirror.f4st.host/archlinux/core/os/x86_64
http://mirror.metalgamer.eu/archlinux/core/os/x86_64

To get the right base url for a repo, and then append "/core.db"

Last edited by eschwartz (2018-12-23 03:08:40)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2018-12-23 12:40:59

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,887

Re: failed retrieving file 'core.db' from... when connected on the wifi

bidetaggle wrote:
Lone_Wolf wrote:

There's one thing that strikes me as odd : all replies are ipv4 .
Do you have ipv6 disabled ?

Can you tell me exactly how to know if it's enabled or not ? It seems ok according to this command:

$ ip -6 addr show wlp1s0
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::e28b:980a:3cd7:270c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

By the way, I don't have a file like /etc/sysctl.d/40-ipv6.conf

$ ls /etc/sysctl.d 
40-max-user-watches.conf

IPv6 addresses starting with fe80 are a special case, see https://en.wikipedia.org/wiki/Link-local_address .

Ping uses ipv6 by default and ipv4 as fallback or when ping is specifcally told to use ipv4 (like pinging 8.8.8.8 )
The kernel by default supports ipv6 , but your networkcard hasn't gotten an ipv6 dhcp address .
That means you disabled it OR your router / isp don't support ipv6.

problems with ipv6 might have to do with the timeouts.


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Online

#10 2018-12-23 14:24:17

bidetaggle
Member
Registered: 2018-12-22
Posts: 7

Re: failed retrieving file 'core.db' from... when connected on the wifi

wget works:

$ wget http://mirror.united-gameserver.de/archlinux/multilib/os/x86_64
--2018-12-23 16:16:53--  http://mirror.united-gameserver.de/archlinux/multilib/os/x86_64
Resolving mirror.united-gameserver.de (mirror.united-gameserver.de)... 213.202.193.253
Connecting to mirror.united-gameserver.de (mirror.united-gameserver.de)|213.202.193.253|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://mirror.united-gameserver.de/archlinux/multilib/os/x86_64/ [following]
--2018-12-23 16:17:24--  http://mirror.united-gameserver.de/archlinux/multilib/os/x86_64/
Reusing existing connection to mirror.united-gameserver.de:80.
HTTP request sent, awaiting response... 200 OK
Length: 119975 (117K) [application/xhtml+xml]
Saving to: ‘x86_64.1’

x86_64.1                                    100%[========================================================================================>] 117.16K  27.6KB/s    in 4.2s    

2018-12-23 16:17:28 (27.6 KB/s) - ‘x86_64.1’ saved [119975/119975]

The last router I used worked well, I guess it means that my router doesn't support ipv6 ? It's the first time that I get this issue, most of the routers support ipv6, right ?
Then how to fix it ?

And I have also a small question aside my issue, why the mirror protocols are not using ssl ? I guess it's a leak because a man-and-the-middle could modify the db file and make a link pointing on another content (locally or from internet, I guess there are further securities to prevent it, but still it's something incertain), do you have any explanations about the http ?

Offline

#11 2018-12-23 14:40:14

loqs
Member
Registered: 2014-03-06
Posts: 7,673

Re: failed retrieving file 'core.db' from... when connected on the wifi

What is the output of the following

/usr/bin/curl -v -C - -f http://mirror.united-gameserver.de/archlinux/core/os/x86_64/core.db > /dev/null

Offline

#12 2018-12-23 16:34:42

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,307

Re: failed retrieving file 'core.db' from... when connected on the wifi

bidetaggle wrote:

And I have also a small question aside my issue, why the mirror protocols are not using ssl ? I guess it's a leak because a man-and-the-middle could modify the db file and make a link pointing on another content (locally or from internet, I guess there are further securities to prevent it, but still it's something incertain), do you have any explanations about the http ?

Some mirrors do use https...
https://www.archlinux.org/mirrorlist/all/https/

It's not of big as a risk as you're making out. All of the packages in the official repositories are signed so it would be impossible for an attacker to get you to install an untrusted package. The worst they could do is to modify core.db so you didn't get any updates for specific packages hoping to keep you on a vunerable version of a piece of software.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#13 2018-12-27 14:32:14

bidetaggle
Member
Registered: 2018-12-22
Posts: 7

Re: failed retrieving file 'core.db' from... when connected on the wifi

loqs wrote:

What is the output of the following

/usr/bin/curl -v -C - -f http://mirror.united-gameserver.de/archlinux/core/os/x86_64/core.db > /dev/null
$ /usr/bin/curl -v -C - -f http://mirror.united-gameserver.de/archlinux/core/os/x86_64/core.db > /dev/null
* Uses proxy env variable no_proxy == 'localhost,127.0.0.0/8,::1'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:14 --:--:--     0*   Trying 213.202.193.253...
* TCP_NODELAY set
* Connected to mirror.united-gameserver.de (213.202.193.253) port 80 (#0)
  0     0    0     0    0     0      0      0 --:--:--  0:00:16 --:--:--     0> GET /archlinux/core/os/x86_64/core.db HTTP/1.1
> Host: mirror.united-gameserver.de
> User-Agent: curl/7.63.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: nginx/1.10.3
< Date: Thu, 27 Dec 2018 14:27:38 GMT
< Content-Type: application/octet-stream
< Content-Length: 136750
< Last-Modified: Wed, 26 Dec 2018 02:35:25 GMT
< Connection: keep-alive
< ETag: "5c22e8ed-2162e"
< Accept-Ranges: bytes
< 
{ [1141 bytes data]
100  133k  100  133k    0     0   8270      0  0:00:16  0:00:16 --:--:-- 29605
* Connection #0 to host mirror.united-gameserver.de left intact
$ sudo pacman -Suy 
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from ftp.ntua.gr : Resolving timed out after 10000 milliseconds

What's the prescription, doctor ? big_smile

Thank you for the explanations Slithery

Offline

#14 2018-12-27 15:15:49

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,208

Re: failed retrieving file 'core.db' from... when connected on the wifi

Why are you testing mirror.united-gameserver.de when that's not the server you're using?

Offline

#15 2018-12-27 16:35:40

loqs
Member
Registered: 2014-03-06
Posts: 7,673

Re: failed retrieving file 'core.db' from... when connected on the wifi

$ /usr/bin/curl -v -C - -f http://ftp.ntua.gr/pub/linux/archlinux/core/os/x86_64/core.db > /dev/null

Offline

#16 2019-01-03 21:58:38

bidetaggle
Member
Registered: 2018-12-22
Posts: 7

Re: failed retrieving file 'core.db' from... when connected on the wifi

/usr/bin/curl -v -C - -f [url]http://ftp.ntua.gr/pub/linux/archlinux/core/os/x86_64/core.db[/url] > /dev/null
* Uses proxy env variable no_proxy == 'localhost,127.0.0.0/8,::1'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:14 --:--:--     0*   Trying 147.102.222.211...
* TCP_NODELAY set
  0     0    0     0    0     0      0      0 --:--:--  0:00:15 --:--:--     0* Connected to [url=ftp://ftp.ntua.gr]ftp.ntua.gr[/url] (147.102.222.211) port 80 (#0)
> GET /pub/linux/archlinux/core/os/x86_64/core.db HTTP/1.1
> Host: [url=ftp://ftp.ntua.gr]ftp.ntua.gr[/url]
> User-Agent: curl/7.63.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Thu, 03 Jan 2019 21:56:39 GMT
< Server: Apache/2.2
< Last-Modified: Wed, 02 Jan 2019 23:08:26 GMT
< ETag: "58347d-21973-57e81b92a6e80"
< Accept-Ranges: bytes
< Content-Length: 137587
< Connection: close
< Content-Type: text/plain; charset=UTF-8
< 
{ [1135 bytes data]
100  134k  100  134k    0     0   8817      0  0:00:15  0:00:15 --:--:-- 30520
* Closing connection 0

So what's up ? I have to connect to my phone to install something, it's annoying lol

Last edited by bidetaggle (2019-01-11 10:47:03)

Offline

#17 2019-01-03 22:45:06

loqs
Member
Registered: 2014-03-06
Posts: 7,673

Re: failed retrieving file 'core.db' from... when connected on the wifi

Please use code tags for commands plus their outputs.  Was that last test conducted using your phone to provide a tethered internet connection?

Offline

#18 2019-01-11 10:47:42

bidetaggle
Member
Registered: 2018-12-22
Posts: 7

Re: failed retrieving file 'core.db' from... when connected on the wifi

no, this was using the local wifi...

Offline

Board footer

Powered by FluxBB