[Bug 383336] New: no 127.0.0.2 entry in /etc/hosts ...
https://bugzilla.novell.com/show_bug.cgi?id=383336 Summary: no 127.0.0.2 entry in /etc/hosts ... Product: openSUSE 11.0 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Critical Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: mmeeks@novell.com QAContact: qa@suse.de Found By: --- My B1 install is completely hosed performance wise due to a lack of: 127.0.0.2 linux in /etc/hosts - it doesn't feature at all. Of course - this was a from-clean B1 install - modulo the hackerage of: for i in aaa_base avahi beagle cups dbus-1 festival fuse \ gdm hal ntp openssh PolicyKit postfix pulseaudio pwdutils \ samba scrollkeeper uuid-runtime yast2-registration; \ do rpm -q $i > /dev/null 2>&1 && zypper in -y -f -n $i; done as recommended to fix the brokenness there [ is it possible that that broke the hosts ? ]. Clearly - adding the missing line makes everything work nicely. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
Cyril Hrubis
https://bugzilla.novell.com/show_bug.cgi?id=383336
User captain.magnus@opensuse.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c1
Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c2
Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User kmachalkova@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c3
Katarina Machalkova
https://bugzilla.novell.com/show_bug.cgi?id=383336
User captain.magnus@opensuse.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c4
--- Comment #4 from Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c5
--- Comment #5 from Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c6
--- Comment #6 from Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c7
Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=383336
User locilka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c8
Lukas Ocilka
https://bugzilla.novell.com/show_bug.cgi?id=383336
User kmachalkova@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c9
--- Comment #9 from Katarina Machalkova
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c10
--- Comment #10 from Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c11
--- Comment #11 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=383336
User captain.magnus@opensuse.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c12
--- Comment #12 from Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mzugec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c13
--- Comment #13 from Michal Zugec
https://bugzilla.novell.com/show_bug.cgi?id=383336
User captain.magnus@opensuse.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c14
Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c15
--- Comment #15 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=383336
User captain.magnus@opensuse.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c16
--- Comment #16 from Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=383336
Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c17
Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c18
--- Comment #18 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=383336
JP Rosevear
https://bugzilla.novell.com/show_bug.cgi?id=383336
User captain.magnus@opensuse.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c19
--- Comment #19 from Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c20
--- Comment #20 from Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c21
--- Comment #21 from Michael Meeks
What exactly does the system do when it hangs?
strace -ttt output: 2178 1209471176.430305 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 30 2178 1209471176.430355 connect(30, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, 28) = 0 2178 1209471176.430412 fcntl64(30, F_GETFL) = 0x2 (flags O_RDWR) 2178 1209471176.430451 fcntl64(30, F_SETFL, O_RDWR|O_NONBLOCK) = 0 2178 1209471176.430489 gettimeofday({1209471176, 430499}, NULL) = 0 2178 1209471176.430531 poll([{fd=30, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 2178 1209471176.430580 send(30, "\226j\1\0\0\1\0\0\0\0\0\0\5linux\0\0\1\0\1", 23, MSG_NOSIGNAL) = 23 2178 1209471176.430670 poll([{fd=30, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 .. this string inserted to highlight the delay ... 2178 1209471180.469873 ioctl(30, FIONREAD, [23]) = 0 2178 1209471180.469927 recvfrom(30, "\226j\201\2\0\1\0\0\0\0\0\0\5linux\0\0\1\0\1", 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, [16]) = 23 2178 1209471180.470043 close(30) = 0 2178 1209471180.470103 time(NULL) = 1209471180 2178 1209471180.470151 write(29, "\1\2\0\1\6\0\0\0%\0\0\000100f4b44460001209471"..., 56) = 56 2178 1209471180.470233 write(29, "\1\3\0\1\1\0\0\0\1\0\0\000100f", 16) = 16 2178 1209471180.470289 gettimeofday({1209471180, 470300}, NULL) = 0 2178 1209471180.470360 read(3, 0x807be1c, 4096) = -1 EAGAIN (Resource temporarily unavailable) 2178 1209471180.470419 gettimeofday({1209471180, 470430}, NULL) = 0 2178 1209471180.470470 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=10, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=21, events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}, {fd=24, events=POLLIN|POLLPRI}, {fd=22, events=POLLIN|POLLPRI}, {fd=27, events=POLLIN|POLLPRI}, {fd=26, events=POLLIN|POLLPRI}, {fd=17, events=POLLIN}, {fd=28, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=29, events=POLLIN|POLLPRI}], 18, 0) = 0
What's in /etc/resolv.conf
one line: nameserver 192.168.0.1 this nameserver is my cheap netgear DSL router, configured via DHCP - with the normal 'configured by dhcpd' type blurb in it.
and /etc/nsswitch.conf ?
Will attach.
Is your domain name .local?
Not sure what you mean really; my hostname is 'linux' there is no domain name associated with that that I can see, there is no 'search' in resolv.conf.
Do you have any interfaces up ?
sure eth0 - it's configured nicely, accepts both incoming & outgoing traffic, and I can browse the web just fine.
Does 'getent ahosts `hostname`' hang
No - it returns instantly with: 127.0.0.1 STREAM localhost 127.0.0.1 DGRAM 127.0.0.1 RAW HTH. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c22
--- Comment #22 from Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c23
Ludwig Nussel
Ludwig - sure; pulling the plug makes the cable-sense shut down the interface (typically) ;-)
Yes, that simulates the case where no name server is defined at all.
However - it is easy to reproduce the effect here: now, this is not what I do - my nameserver does in fact look up ~all internet addresses correctly [ but not my localhost name for which it times out ]:
Sounds like a problem with your name server. It should pretty fast determine that it cannot resolve the host and return with an error.
Anyhow edit:
/etc/resolv.conf to contain (only):
# www.ibm.com - ie. no DNS server there nameserver 129.42.56.216
That would simulate the case where your dhcp server hands out invalid name servers. Of course that will cause timeouts. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c24
--- Comment #24 from Ludwig Nussel
What's in /etc/resolv.conf
one line:
nameserver 192.168.0.1
do the timeout go away if you add a search line, e.g. "search foo" (local would be something special, triggers mdns lookups)?
Is your domain name .local?
Not sure what you mean really; my hostname is 'linux' there is no domain name associated with that that I can see, there is no 'search' in resolv.conf.
yast does set some domain by default, IIRC 'site. You can see it in /etc/HOSTNAME or /etc/defaultdomain
Does 'getent ahosts `hostname`' hang
No - it returns instantly with:
127.0.0.1 STREAM localhost 127.0.0.1 DGRAM 127.0.0.1 RAW
That's with your hostname added to /etc/hosts. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c25
--- Comment #25 from Michael Meeks
Sounds like a problem with your name server. It should pretty fast determine that it cannot resolve the host and return with an error.
Well - it seems to me if the hostname is looked up; it is not at all clear that 'linux' is not a root domain name, or some magic thingit - and the name server does it's best. FWIW - you can point at the DNS server being mis-configured as much as you like - but it's a fairly default Netgear DSL router / hub thing - and (unfortunately) it appears to expose next-to-no DNS settings - ie. it's not just me [ and the thing runs Linux - so the manufacturers must be at least slightly clueful ;-].
That would simulate the case where your dhcp server hands out invalid name servers. Of course that will cause timeouts.
sure - but it appears to be the same timeout - and you see the issue I hope: we do a -ton- of IP lookups in common applications; sudo eg.
yast does set some domain by default, IIRC 'site. You can see it in /etc/HOSTNAME or /etc/defaultdomain
my /etc/HOSTNAME says "linux.site" my /etc/defaultdomain is empty however.
That's with your hostname added to /etc/hosts.
oh - quite right [ at least now I try again ] getent gives me no output, and it takes 21.5 seconds to timeout & get back to me. Adding a 'search foo' to my /etc/resolv.conf (or a 'site' instead of foo or whatever) has ~0 effect on the problem. But then - ping 'linux.site' or ping 'linux.foo' is also just as slow - so, not sure what we can achieve there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c26
Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User llunak@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c27
--- Comment #27 from Lubos Lunak
https://bugzilla.novell.com/show_bug.cgi?id=383336
User coolo@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c28
Stephan Kulow
https://bugzilla.novell.com/show_bug.cgi?id=383336
User pbaudis@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c29
Petr Baudis
https://bugzilla.novell.com/show_bug.cgi?id=383336
User coolo@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c30
Stephan Kulow
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c31
--- Comment #31 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c32
--- Comment #32 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=383336
User kmachalkova@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c33
--- Comment #33 from Katarina Machalkova
that 127.0.0.2 is still just a hack to hide the problems caused by broken applications or misconfiguration.
So are we going to apply this hack (yes, it is really only a hack/workaround) for 11.0, too? Its only purpose is to hide other problems caused by broken/misconfigured applications, but back then (in 10.3 RC) it was applied because it was too late for any other solution. Is it again Yast that must save the world, or is there any other reason why is this bug assigned to me ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c34
--- Comment #34 from Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User locilka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c35
--- Comment #35 from Lukas Ocilka
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c36
--- Comment #36 from Ludwig Nussel
Why should we assign a host-name/domain that is known to be invalid & then not resolve it ourselves quickly locally & expect other people to be able to do that ?
The host name is not really invalid. It's just not resolvable in the global DNS. The solution is not trying to resolve it. If an applications wants to find out about the system's IP addresses (plural) it should use getifaddrs() instead of gethostbyname(). Note that gethostbyname() always returns the wrong IP for unassigned names, either it times out or returns 127.0.0.2, both doesn't have the desired effect. Having said that we shouldn't use linux.site as host name indeed IMO. $RANDOM.local would be better as .local is catched by nss_mdns and shouldn't be looked up globally and can be resolved in the LAN for ad-hoc networks (provided the firewall is configured properly of course :-). I fear that there are other timeouts involved in that case though. avahi could probably take the shortcut and resolve the local hostname instantly to all ip addresses. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lmuelle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c37
--- Comment #37 from Lars Müller
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lmuelle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c38
--- Comment #38 from Lars Müller
https://bugzilla.novell.com/show_bug.cgi?id=383336
User locilka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c39
--- Comment #39 from Lukas Ocilka
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c40
--- Comment #40 from Ludwig Nussel
To summarize a solution that should not conflict with anything:
* For automatic configuration, YaST should create a random hostname domain should be 'local'. We might use some dictionary for random hostname :) (+ some additional chars)
That .local needs testing though. As I said it may introduce delays as well. Esp since the firewall of course blocks mdns by default.
* $hostname and $hostname.local should be written to /etc/hosts with address 127.0.0.1 (.2 conflicts with AD). * AD should be fixed to use the external hostname, not the internal one.
I'm not sure I understand what you mean but if the problems with AD stuff are due to usage of gethostbyname() to learn about external IP addresses your suggestion won't change anything. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c41
--- Comment #41 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lmuelle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c42
--- Comment #42 from Lars Müller
https://bugzilla.novell.com/show_bug.cgi?id=383336
User captain.magnus@opensuse.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c43
--- Comment #43 from Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=383336
User kmachalkova@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c44
Katarina Machalkova
Both OpenOffice.org and Firefox are extremely slow to start when the hostname can't be resolved!
Then please open a new bug(s) and assign it to OpenOffice and Firefox maintainers I thoroughly disagree with re-implementing this 127.0.0.2 hack (there have been several good reasons mentioned above why not to do it), but that's about all I can do with it. I believe this 127.0.0.2 workaround will be strike back again and again but neverethless, let's have it to hide all the brokenness of the other applications. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User mmeeks@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c45
Michael Meeks
https://bugzilla.novell.com/show_bug.cgi?id=383336
User coolo@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c46
--- Comment #46 from Stephan Kulow
https://bugzilla.novell.com/show_bug.cgi?id=383336
User locilka@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c47
--- Comment #47 from Lukas Ocilka
https://bugzilla.novell.com/show_bug.cgi?id=383336
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c48
--- Comment #48 from Ludwig Nussel
So - here is ignorant me again; the code in OpenOffice.org implements a method: _osl_getFullQualifiedDomainName - which it calls at start, to get a string to mangle into it's "someone else is using your settings" type functionality:
Does it really need to do a DNS lookup at startup for that? Is plain gethostname() not sufficient? This should be filed as openoffice bug indeed.
but feasibly in future will also be used for it's various network pieces: spreadsheet sharing eg.
In that case it would be even worse if every system claimed to be 'linux.site' with ip 127.0.0.2 :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383336
User kmachalkova@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383336#c49
Katarina Machalkova
participants (1)
-
bugzilla_noreply@novell.com