You are not logged in.

#1 2009-12-31 22:34:35

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

DNS lookups slow in some (console) applications

pacman, wget, abs (rsync) and many applications have issues getting DNS information. Since 3 months this is bugging me now, but at least I finally seem to have found out that these programs all do ipv6 DNS lookups, although I disabled ipv6 support (and the module).
When I use "curl" in pacman for fetching packages, it is super fast, also when I call "wget -4", to explicitly tell it to use ipv4. Firefox is fast, too, because I set it to disallow ipv6.
How can I tell all the other programs to use ipv4 only?
I want to use yaourt, pacman and co without having to wait for ages to download a package.
And why are only a few (console) applications affected? Do they use a common lib that tries to use ipv6 all the time?


digiKam developer - www.digikam.org

Offline

#2 2009-12-31 22:42:41

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

It is definitely ipv6, I just checked with wireshark.
I have a GIT repo at github.com, and another SVN repo at kde.org.
I just realized that my git client is fast when using "git svn", but slow when using the "real" git repo at github.com.
Wireshark revealed that "git svn" uses ipv4 to connect to the repo, while the "real" git repo wants to connect with ipv6.

Is there a way to turn this off completely?
I don't need ipv6 and I already removed the module, why are applications still using ipv6 though?


digiKam developer - www.digikam.org

Offline

#3 2009-12-31 22:44:58

mrutter
Member
Registered: 2009-05-25
Posts: 16

Re: DNS lookups slow in some (console) applications

nm

Last edited by mrutter (2009-12-31 22:45:59)

Offline

#4 2009-12-31 22:46:53

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

As I said, I already disabled the module. And Firefox has no ipv6 settings either. It is only a few applications that stil want to connect via ipv6... I guess they all share a common lib or function that seems to be broken?


digiKam developer - www.digikam.org

Offline

#5 2010-01-03 13:47:32

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

Nobody has an idea?
I also tried to add "ipv6.disable=1" as a kernel parameter, but still I get ipv6 calls from some applications, like yaourt.
Updating AUR packages with it is a pain, it takes forever, since every DNS request takes 12 seconds or longer.

dnsipv6.png


digiKam developer - www.digikam.org

Offline

#6 2010-01-03 18:55:31

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: DNS lookups slow in some (console) applications

Sounds like this bug. Try:

alias net-pf-10 off
blacklist ipv6

From thread.

Reboot, then check:

$ ip a | grep inet6

Last edited by brebs (2010-01-03 19:00:02)

Offline

#7 2010-01-03 19:08:15

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

No, ipv6 is disabled... I really don't know what to do... I thought that maybe me Draytek Vigor 2700 is doing crappy things, but the wireshark graph "proves" that I do the ipv6 calls... I even compiled my own kernel now and threw away the ipv6 module completely, still the same bug.
It seems to be some library that is messing around...? Because not all programs behave like that.


digiKam developer - www.digikam.org

Offline

#8 2010-01-03 22:42:29

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: DNS lookups slow in some (console) applications

Did you try openDNS as a workaround.

Add this to /etc/resolv.conf.head:

# OpenDNS nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220

English is not my native language .

Offline

#9 2010-01-04 08:28:27

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

Tried it, didn't help either... :-(


digiKam developer - www.digikam.org

Offline

#10 2010-01-04 12:49:42

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: DNS lookups slow in some (console) applications

I should have read your post in detail.

Could it be the well known gnu libc (bug) that only shows up in broken routers/networks?

Did you try adding "options single-request" to "resolv.conf"?


English is not my native language .

Offline

#11 2010-01-04 13:27:54

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

I will check this in the evening, currently I'm at work... thanks for being so patient... big_smile


digiKam developer - www.digikam.org

Offline

#12 2010-01-04 19:00:33

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

Nezmer, thanks this finally seems to work. I still get IPv6 DNS requests in wireshark, but my internet connection is faster now...
The only thing I need to figure out now is how to keep these options in /etc/resolv.conf, without having networkmanager overwriting them. But I guess I'll find something on the web...
So thanks again to all for your help!


digiKam developer - www.digikam.org

Offline

#13 2010-01-04 22:01:34

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: DNS lookups slow in some (console) applications

Quick note, depending on where you put that in resolv.conf, you should look into resolv.conf.head and resolv.conf.tail

Offline

#14 2010-01-04 22:34:44

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

Re: DNS lookups slow in some (console) applications

I don't have these two files...? Anyway I set the resolv.conf to immutable

chattr +i /etc/resolv.conf

so that it can not be changed. Works fine.


digiKam developer - www.digikam.org

Offline

#15 2010-01-24 15:34:08

Luis Sousa
Member
From: Portugal
Registered: 2009-07-19
Posts: 36

Re: DNS lookups slow in some (console) applications

Hello, ppl. Been having the same problem for over 6 months, and i never thought it was a bug, until it stumbled in this post. And i solved it thanks to Nezmer's tip about adding 'options single-request', which didn't work at first, but it got me searching the web. And here it is the result: Since /etc/resolv.conf is rewritten in every boot, simply create /etc/resolv.conf.tail with the following:

options rotate
options single-request

This file's content will be automatically added at the end of /etc/resolv.conf in every boot, et voilá, enjoy pacman, yaourt, etc without pauses...


XP -> Ubuntu -> Arch

Offline

Board footer

Powered by FluxBB