[opensuse] localhost unknown host
Anybody know what's going on here? It's creating a huge amount of diagnostic output into /var/log/{messages,warn} root@linux-c4zg:/> tail -10 /var/log/warn Feb 26 21:24:02 linux-c4zg postfix/sendmail[13762]: fatal: config variable inet_interfaces: host not found: localhost Feb 26 21:25:03 linux-c4zg postfix/sendmail[13936]: fatal: config variable inet_interfaces: host not found: localhost Feb 26 21:25:03 linux-c4zg postfix/sendmail[13948]: fatal: config variable inet_interfaces: host not found: localhost Feb 26 21:25:03 linux-c4zg postfix/sendmail[13947]: fatal: config variable inet_interfaces: host not found: localhost Feb 26 21:26:02 linux-c4zg postfix/sendmail[14575]: fatal: config variable inet_interfaces: host not found: localhost Feb 26 21:26:17 linux-c4zg XtreemOS[14671]: libnss_xos.c:_nss_xos_loadconf:163: NSS:_nss_xos_loadconf: Error opening config file /etc/xos/nss_pam/nss_xos.conf: Permission denied Feb 26 21:26:17 linux-c4zg XtreemOS[14671]: passwd.c:_nss_xos_getpwuid_r:178: NSS:_nss_xos_getpwuid_r: Couldn't load configuration Feb 26 21:27:03 linux-c4zg postfix/sendmail[14678]: fatal: config variable inet_interfaces: host not found: localhost Feb 26 21:28:02 linux-c4zg postfix/sendmail[14715]: fatal: config variable inet_interfaces: host not found: localhost Feb 26 21:29:02 linux-c4zg postfix/sendmail[14735]: fatal: config variable inet_interfaces: host not found: localhost root@linux-c4zg:/> root@linux-c4zg:/> ping localhost ping: unknown host localhost root@linux-c4zg:/> root@linux-c4zg:/> more /etc/hosts ####################################################################### # this file is /etc/hosts # # hosts This file describes a number of hostname-to-address # mappings for the TCP/IP subsystem. It is mostly # used at boot time, when no name servers are running. # On small systems, this file can be used instead of a # "named" name server. # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname # 127.0.0.1 localhost # special IPv6 addresses # ::1 localhost ipv6-localhost ipv6-loopback fe00::0 ipv6-localnet ff00::0 ipv6-mcastprefix ff02::1 ipv6-allnodes ff02::2 ipv6-allrouters ff02::3 ipv6-allhosts root@linux-c4zg:/> root@linux-c4zg:/> more /etc/host.conf # # /etc/host.conf - resolver configuration file # # Please read the manual page host.conf(5) for more information. # # # The following option is only used by binaries linked against # libc4 or libc5. This line should be in sync with the "hosts" # option in /etc/nsswitch.conf. # order hosts, bind # # The following options are used by the resolver library: # multi on root@linux-c4zg:/> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sunday 26 February 2012 21:37:22 Dirk Gently wrote:
Anybody know what's going on here? It's creating a huge amount of diagnostic output into /var/log/{messages,warn}
root@linux-c4zg:/> tail -10 /var/log/warn Feb 26 21:24:02 linux-c4zg postfix/sendmail[13762]: fatal: config variable inet_interfaces: host not found: localhost
Did you perhaps remove "files" from the line hosts: files dns in /etc/nsswitch,conf? Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anders Johansson wrote:
On Sunday 26 February 2012 21:37:22 Dirk Gently wrote:
Anybody know what's going on here? It's creating a huge amount of diagnostic output into /var/log/{messages,warn}
root@linux-c4zg:/> tail -10 /var/log/warn Feb 26 21:24:02 linux-c4zg postfix/sendmail[13762]: fatal: config variable inet_interfaces: host not found: localhost
Did you perhaps remove "files" from the line
hosts: files dns
in /etc/nsswitch,conf?
Anders
Thanks for your prompts reply, Anders. It looks like that is proper. hosts: files mdns4_minimal [NOTFOUND=return] dns note that despite the [NOTFOUN[NOTFOUND=return] before dns, that dns look-ups work properly. linux-c4zg:~ # grep hosts /etc/nsswitch.conf hosts: files mdns4_minimal [NOTFOUND=return] dns linux-c4zg:~ # linux-c4zg:~ # more /etc/nsswitch.conf # # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # compat Use compatibility setup # nisplus Use NIS+ (NIS version 3) # nis Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # [NOTFOUND=return] Stop searching if not found so far # # For more information, please read the nsswitch.conf.5 manual page. # # passwd: files nis # shadow: files nis # group: files nis passwd: compat files xos group: compat files xos hosts: files mdns4_minimal [NOTFOUND=return] dns networks: files dns services: files protocols: files rpc: files ethers: files netmasks: files netgroup: files nis publickey: files bootparams: files automount: files nis aliases: files linux-c4zg:~ # -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sunday 26 February 2012 22:44:54 Dirk Gently wrote:
It looks like that is proper.
hosts: files mdns4_minimal [NOTFOUND=return] dns
Hm weird. Is nscd running? If it is, try shutting it down Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anders Johansson wrote:
On Sunday 26 February 2012 22:44:54 Dirk Gently wrote:
It looks like that is proper.
hosts: files mdns4_minimal [NOTFOUND=return] dns
Hm weird.
Is nscd running? If it is, try shutting it down
not running. Why in the world would networking NOT check /etc/hosts? I've never seen this sort of behavior before installing 12.1
Anders
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 01 Mar 2012 00:09:28 -0500, Dirk Gently
Why in the world would networking NOT check /etc/hosts?
Because of NSS. /etc/nsswitch.conf decides which resources are used to resolve names and in which order. If the system is configured to not consult /etc/hosts it won't. I will by default use it. See "info '(libc.info.gz)NSS Basics' " for a description of NSS. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Philipp Thomas wrote:
On Thu, 01 Mar 2012 00:09:28 -0500, Dirk Gently
wrote: Why in the world would networking NOT check /etc/hosts?
Because of NSS. /etc/nsswitch.conf decides which resources are used to resolve names and in which order. If the system is configured to not consult /etc/hosts it won't. I will by default use it.
See "info '(libc.info.gz)NSS Basics' " for a description of NSS.
Philipp
This was already checked in an earlier post. root@linux-c4zg:/etc> more nsswitch.conf # # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # compat Use compatibility setup # nisplus Use NIS+ (NIS version 3) # nis Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # [NOTFOUND=return] Stop searching if not found so far # # For more information, please read the nsswitch.conf.5 manual page. # # passwd: files nis # shadow: files nis # group: files nis passwd: compat files xos group: compat files xos # hosts: files mdns4_minimal [NOTFOUND=return] dns hosts: files dns networks: files dns services: files protocols: files rpc: files ethers: files netmasks: files netgroup: files nis publickey: files bootparams: files automount: files nis aliases: files -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 02 Mar 2012 13:35:01 -0500, Dirk Gently
This was already checked in an earlier post.
I know, but you asked why something wouldn't look at /etc/hosts and I supplied the explanation for that. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Philipp Thomas wrote:
On Fri, 02 Mar 2012 13:35:01 -0500, Dirk Gently
wrote: This was already checked in an earlier post.
I know, but you asked why something wouldn't look at /etc/hosts and I supplied the explanation for that.
Is there ANY other possible explanation? ping localhost still returns unknown host :-( Anything DNS related is working perfectly, but things in /etc/hosts don't.
Philipp
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 13 Mar 2012 04:27:20 -0400, Dirk Gently
Is there ANY other possible explanation? ping localhost still returns unknown host :-(
A 'strace -f -e trace=file ping localhost' should at least show you that /etc/hosts is really ignored. If you haven't already tried, stop nscd and try then. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Philipp Thomas wrote:
On Tue, 13 Mar 2012 04:27:20 -0400, Dirk Gently
wrote: Is there ANY other possible explanation? ping localhost still returns unknown host :-(
A 'strace -f -e trace=file ping localhost' should at least show you that /etc/hosts is really ignored. If you haven't already tried, stop nscd and try then.
Philipp
root@linux-c4zg:~> ps -ef | grep nscd root 18787 18076 0 05:10 pts/15 00:00:00 grep --color=auto nscd root@linux-c4zg:~> strace -f -e trace=file ping localhost execve("/bin/ping", ["ping", "localhost"], [/* 123 vars */]) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 open("/lib/libcap.so.2", O_RDONLY) = 3 open("/lib/libc.so.6", O_RDONLY) = 3 open("/etc/resolv.conf", O_RDONLY) = 4 stat64("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=908, ...}) = 0 open("/etc/resolv.conf", O_RDONLY) = 4 open("/etc/nsswitch.conf", O_RDONLY) = 4 open("/etc/ld.so.cache", O_RDONLY) = 4 open("/lib/libnss_files.so.2", O_RDONLY) = 4 open("/etc/host.conf", O_RDONLY) = 4 open("/etc/hosts", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) open("/etc/ld.so.cache", O_RDONLY) = 4 open("/lib/libnss_dns.so.2", O_RDONLY) = 4 open("/lib/libresolv.so.2", O_RDONLY) = 4 stat64("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=908, ...}) = 0 ping: unknown host localhost root@linux-c4zg:~> cd /etc root@linux-c4zg:/etc> grep localhost /etc/hosts 127.0.0.1 localhost ::1 localhost ipv6-localhost ipv6-loopback root@linux-c4zg:/etc> more nsswitch.conf # # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # compat Use compatibility setup # nisplus Use NIS+ (NIS version 3) # nis Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # [NOTFOUND=return] Stop searching if not found so far # # For more information, please read the nsswitch.conf.5 manual page. # # passwd: files nis # shadow: files nis # group: files nis passwd: compat files xos group: compat files xos # hosts: files mdns4_minimal [NOTFOUND=return] dns hosts: files dns networks: files dns services: files protocols: files rpc: files ethers: files netmasks: files netgroup: files nis publickey: files bootparams: files automount: files nis aliases: files root@linux-c4zg:/etc> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2012-03-14 at 11:01 +0100, Hans-Joachim Ehlers wrote:
Could you check why you get on /etc/hosts a permission denied ?
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
Apparmour would be my guess... - -- Cheers, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk9gpQMACgkQtTMYHG2NR9W7BACdEuREtkCE2XX+PmS9GnlLM9Hn dqQAni4aCuwad8QSHd5NdsK+q92/uJtW =Enoj -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hans-Joachim Ehlers wrote:
Could you check why you get on /etc/hosts a permission denied ?
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
Strange... /etc/hosts was a symbolic link to another file in /etc/hosts format. I removed the link (rm /etc//hosts) and then copied the file to which it was linked to /etc/hosts and everything works now. Thanks Hans. root@linux-c4zg:/etc> ls -al hosts lrwxrwxrwx 1 root root 7 Jan 14 13:28 hosts -> hosts.2 # that's peculiar root@linux-c4zg:/etc> ls -al hosts.2 -rw-r--r-- 1 root root 1910 Feb 26 00:00 hosts.2 # readable by everyone and writable only by root, as it should be # remove link and replace it with an actual file. root@linux-c4zg:/etc> rm hosts ; cp hosts.2 hosts root@linux-c4zg:/etc> ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.064 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.068 ms 64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.079 ms ^C --- localhost ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.064/0.070/0.079/0.009 ms # SUCCESS!!! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Anders Johansson
-
Carlos E. R.
-
Dirk Gently
-
Hans-Joachim Ehlers
-
Philipp Thomas