Bug 169699
Summary: | ping localhost does not work | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeff Hoffman <jeff> | ||||
Component: | iputils | Assignee: | Radek Vokál <rvokal> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Mike McLean <mikem> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 4 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-10-17 08:11:14 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jeff Hoffman
2005-10-01 13:59:11 UTC
Created attachment 119506 [details]
tar archive
It works for me. So maybe you have to follow your own advice and check /etc/hosts - can you post it here? Sure.. # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 24.14.165.89 rca 192.168.69.1 linksys 192.168.69.104 one4 207.241.78.5 as400 Ok, and also just for a record, `ping localhost` doesn't also work or is it just this script which reports localhost as unreachable? Here you go.. [jeff@one4 ~]$ traceroute localhost traceroute to localhost.localdomain (127.0.0.1), 30 hops max, 46 byte packets 1 localhost.localdomain (127.0.0.1) 0.049 ms 0.017 ms 0.015 ms [jeff@one4 ~]$ traceroute 127.0.0.1 traceroute to 127.0.0.1 (127.0.0.1), 30 hops max, 46 byte packets 1 localhost.localdomain (127.0.0.1) 0.056 ms 0.018 ms 0.015 ms [jeff@one4 ~]$ ping 127.0.0.1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.044 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.031 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.027 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.031 ms [jeff@one4 ~]$ ping localhost PING localhost.biz (194.106.118.9) 56(84) bytes of data. oh oh, what's that dot.biz thing? Are you sure that your /etc/resolv.conf and all DNS settings are correct? Also check /etc/host.conf for search order. hosts should be first. /etc/host.conf seems ok order hosts,bind /etc/resolv.conf is nameserver 192.168.69.1 which is the linksys router connected to an RCA cable modem. DNS and DHCP are not running on the box, never has been as this did work. My domain name on the web is one4.biz and the HOSTNAME is the same. I searched a couple of days to see why the .biz was being appended to the ping before I gave up and reported the bug. I also compare it to other system at work and I seem to be configure the same. Hmm, so you don't use search in /etc/resolv.conf .. So than what does cat /etc/nsswitch.conf | grep hosts says? Because it really looks like the search order is broken in some way .. Here you go.. [jeff@one4 ~]$ cat /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: # # nisplus or nis+ Use NIS+ (NIS version 3) # nis or yp Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # db Use the local database (.db) files # compat Use NIS on compat mode # hesiod Use Hesiod for user lookups # [NOTFOUND=return] Stop searching if not found so far # # To use db, put the "db" in front of "files" for entries you want to be # looked up first in the databases # # Example: #passwd: db files nisplus nis #shadow: db files nisplus nis #group: db files nisplus nis passwd: files winbind shadow: files winbind group: files winbind #hosts: db files nisplus nis dns hosts: files dns # Example - obey only what nisplus tells us... #services: nisplus [NOTFOUND=return] files #networks: nisplus [NOTFOUND=return] files #protocols: nisplus [NOTFOUND=return] files #rpc: nisplus [NOTFOUND=return] files #ethers: nisplus [NOTFOUND=return] files #netmasks: nisplus [NOTFOUND=return] files bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files winbind rpc: files services: files winbind netgroup: files winbind publickey: nisplus automount: files winbind aliases: files nisplus Ok, I'm lost. There has to be sth what changes the order. But in your case local files has to be checked first, so hosts is in use (I hope permissions on all files are correct) and then your nameserver and according to your /etc/hosts localhost should be resolved as localhost.localdomain .. Anyway I haven't seen same issue on any of my test machines and I'm convinced that this is configuration problem. Yeah, that is what I thought but everything seems to line up. Ownership is root and permissions are 644 just like my other boxes.... Does ping have a debug option? Definetly a bug in ping for the Anthlon 64 bit version... I FTP'd the ping off a 32 bit machine and it runs fine and I did not change the config files..... 32 bit [root@one4 Desktop]# ./ping as400 PING as400 (207.241.78.5) 56(84) bytes of data. 64 bytes from as400 (207.241.78.5): icmp_seq=0 ttl=47 time=28.0 ms 64 bytes from as400 (207.241.78.5): icmp_seq=1 ttl=47 time=34.2 ms 64 bytes from as400 (207.241.78.5): icmp_seq=2 ttl=47 time=31.9 ms 64 bytes from as400 (207.241.78.5): icmp_seq=3 ttl=47 time=21.5 ms --- as400 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3012ms rtt min/avg/max/mdev = 21.546/28.962/34.258/4.821 ms, pipe 2 64 bit [root@one4 Desktop]# cd /bin [root@one4 bin]# ./ping as400 PING as400.biz (216.168.224.63) 56(84) bytes of data. Than can you attach `strace ping -c 1` to see what ping opens? You didn't mention that it happens on 64bit only! I did not think that there would have been a diffrence.. Both straces' below 64 bit strace [root@one4 Desktop]# strace ping -c 1 execve("/bin/ping", ["ping", "-c", "1"], [/* 39 vars */]) = 0 brk(0) = 0x555555670000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac5000 uname({sys="Linux", node="one4.biz", ...}) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=185978, ...}) = 0 mmap(NULL, 185978, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aaaaaac6000 close(3) = 0 open("/lib64/libresolv.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3606 >>"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=92600, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaaf4000 mmap(NULL, 1133224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaabc6000 mprotect(0x2aaaaabd7000, 1063592, PROT_NONE) = 0 mmap(0x2aaaaacd7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x2aaaaacd7000 mmap(0x2aaaaacd9000, 6824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aaaaacd9000 close(3) = 0 open("/lib64/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\304"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1549384, ...}) = 0 mmap(NULL, 2317448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaacdb000 mprotect(0x2aaaaae08000, 1084552, PROT_NONE) = 0 mmap(0x2aaaaaf07000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c000) = 0x2aaaaaf07000 mmap(0x2aaaaaf0d000, 15496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaf0d000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaf11000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaf12000 arch_prctl(ARCH_SET_FS, 0x2aaaaaf11d00) = 0 mprotect(0x2aaaaaf07000, 16384, PROT_READ) = 0 mprotect(0x2aaaaacd7000, 4096, PROT_READ) = 0 mprotect(0x2aaaaabc4000, 4096, PROT_READ) = 0 munmap(0x2aaaaaac6000, 185978) = 0 socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3 getuid() = 0 setuid(0) = 0 write(2, "Usage: ping [-LRUbdfnqrvVaA] [-c"..., 262Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline] [-p pattern] [-s packetsize] [-t ttl] [-I interface or address] [-M mtu discovery hint] [-S sndbuf] [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination ) = 262 exit_group(2) = ? 32 bit strace [root@one4 Desktop]# strace ./ping -c 1 execve("./ping", ["./ping", "-c", "1"], [/* 39 vars */]) = 0 [ Process PID=16693 runs in 32 bit mode. ] brk(0) = 0x56572000 old_mmap(0x100000000000, 146028888067, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULATE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_LOCKED|0xf7fe0680, -134218664, 0x8f7ff81e0) = 0xfffffffff7fe3000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(0x3, 0xffffc080) = 0 old_mmap(0x2d67a00000000, 8589934593, PROT_READ|PROT_WRITE, MAP_SHARED, 835, 0x87478800000000) = 0xfffffffff7fb5000 close(3) = 0 open("/lib/libresolv.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\203"..., 512) = 512fstat64(0x3, 0xffffc0fc) = 0 old_mmap(0x1286800000000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7fa2000 old_mmap(0x2000f7fb1000, 8873402433539, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7fb1000 old_mmap(0x1868f7fb3000, 214748364803, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, MAP_FILE, 0, 0) = 0xfffffffff7fb3000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\212\256"..., 512) = 512fstat64(0x3, 0xffffc0e0) = 0 old_mmap(0x128bdc00000000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7e79000 old_mmap(0x4000f7f9c000, 8873402433539, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7f9c000 old_mmap(0x1bdcf7fa0000, 214748364803, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, MAP_FILE, 0, 0) = 0xfffffffff7fa0000 close(3) = 0 old_mmap(0x100000000000, 146028888067, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULATE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_LOCKED|0xf7fe0680, 2832, 0x20f7ff43df) = 0xfffffffff7e78000 set_thread_area(0xffffc5e0) = 0 mprotect(0xf7f9c000, 8192, PROT_READ) = 0 mprotect(0xf7fb1000, 4096, PROT_READ) = 0 mprotect(0xf7ffe000, 4096, PROT_READ) = 0 munmap(0xf7fb5000, 185978) = 0 socketcall(0x1, 0xffffc8c0) = 3 getuid32() = 0 setuid32(0) = 0 write(2, "Usage: ping [-LRUbdfnqrvVaA] [-c"..., 262Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline] [-p pattern] [-s packetsize] [-t ttl] [-I interface or address] [-M mtu discovery hint] [-S sndbuf] [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination ) = 262 exit_group(2) = ? Sorry, this is useless. I forget to add localhost at that line, so one more time please `strace ping -c 1 localhost` No problem gald I can help. 64 bit [root@one4 jeff]# strace /bin/ping -c 1 localhost execve("/bin/ping", ["/bin/ping", "-c", "1", "localhost"], [/* 33 vars */]) = 0 brk(0) = 0x555555670000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac5000 uname({sys="Linux", node="one4.biz", ...}) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=186081, ...}) = 0 mmap(NULL, 186081, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aaaaaac6000 close(3) = 0 open("/lib64/libresolv.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3606 >>"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=92600, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaaf4000 mmap(NULL, 1133224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaabc6000 mprotect(0x2aaaaabd7000, 1063592, PROT_NONE) = 0 mmap(0x2aaaaacd7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x2aaaaacd7000 mmap(0x2aaaaacd9000, 6824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aaaaacd9000 close(3) = 0 open("/lib64/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\304"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1549384, ...}) = 0 mmap(NULL, 2317448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaacdb000 mprotect(0x2aaaaae08000, 1084552, PROT_NONE) = 0 mmap(0x2aaaaaf07000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c000) = 0x2aaaaaf07000 mmap(0x2aaaaaf0d000, 15496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaf0d000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaf11000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaf12000 arch_prctl(ARCH_SET_FS, 0x2aaaaaf11d00) = 0 mprotect(0x2aaaaaf07000, 16384, PROT_READ) = 0 mprotect(0x2aaaaacd7000, 4096, PROT_READ) = 0 mprotect(0x2aaaaabc4000, 4096, PROT_READ) = 0 munmap(0x2aaaaaac6000, 186081) = 0 socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3 getuid() = 0 setuid(0) = 0 brk(0) = 0x555555670000 brk(0x555555691000) = 0x555555691000 getpid() = 22392 open("/etc/resolv.conf", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=54, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac6000 read(4, "#search localhost.localdomain\nna"..., 4096) = 54 read(4, "", 4096) = 0 close(4) = 0 munmap(0x2aaaaaac6000, 4096) = 0 uname({sys="Linux", node="one4.biz", ...}) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 4 fcntl(4, F_GETFL) = 0x2 (flags O_RDWR) fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 EACCES (Permission denied) close(4) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 4 fcntl(4, F_GETFL) = 0x2 (flags O_RDWR) fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 EACCES (Permission denied) close(4) = 0 open("/etc/nsswitch.conf", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=1742, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac6000 read(4, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1742 read(4, "", 4096) = 0 close(4) = 0 munmap(0x2aaaaaac6000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=186081, ...}) = 0 mmap(NULL, 186081, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2aaaaaac6000 close(4) = 0 open("/lib64/libnss_files.so.2", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\"\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=57776, ...}) = 0 mmap(NULL, 1095272, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2aaaaaf13000 mprotect(0x2aaaaaf1d000, 1054312, PROT_NONE) = 0 mmap(0x2aaaab01d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa000) = 0x2aaaab01d000 close(4) = 0 mprotect(0x2aaaab01d000, 4096, PROT_READ) = 0 munmap(0x2aaaaaac6000, 186081) = 0 open("/etc/host.conf", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac6000 read(4, "order hosts,bind\n", 4096) = 17 read(4, "", 4096) = 0 close(4) = 0 munmap(0x2aaaaaac6000, 4096) = 0 open("/etc/hosts", O_RDONLY) = -1 EACCES (Permission denied) open("/etc/ld.so.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=186081, ...}) = 0 mmap(NULL, 186081, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2aaaaaac6000 close(4) = 0 open("/lib64/libnss_dns.so.2", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\22\0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=23568, ...}) = 0 mmap(NULL, 1065224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2aaaab01f000 mprotect(0x2aaaab023000, 1048840, PROT_NONE) = 0 mmap(0x2aaaab122000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x3000) = 0x2aaaab122000 close(4) = 0 mprotect(0x2aaaab122000, 4096, PROT_READ) = 0 munmap(0x2aaaaaac6000, 186081) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.69.1")}, 28) = 0 fcntl(4, F_GETFL) = 0x2 (flags O_RDWR) fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 sendto(4, "\251\235\1\0\0\1\0\0\0\0\0\0\tlocalhost\3biz\0\0\1\0\1"..., 31, 0, NULL, 0) = 31 poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 ioctl(4, FIONREAD, [47]) = 0 recvfrom(4, "\251\235\201\200\0\1\0\1\0\0\0\0\tlocalhost\3biz\0\0\1"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.69.1")}, [16]) = 47 close(4) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 connect(4, {sa_family=AF_INET, sin_port=htons(1025), sin_addr=inet_addr("194.106.118.9")}, 16) = 0 getsockname(4, {sa_family=AF_INET, sin_port=htons(46380), sin_addr=inet_addr("192.168.69.104")}, [16]) = 0 close(4) = 0 setsockopt(3, SOL_RAW, ICMP_FILTER, ~(ICMP_ECHOREPLY|ICMP_DEST_UNREACH|ICMP_SOURCE_QUENCH|ICMP_REDIRECT|ICMP_TIME_EXCEEDED|ICMP_PARAMETERPROB), 4) = 0 setsockopt(3, SOL_IP, IP_RECVERR, [6149010669439025153], 4) = 0 setsockopt(3, SOL_SOCKET, SO_SNDBUF, [324], 4) = 0 setsockopt(3, SOL_SOCKET, SO_RCVBUF, [6153848314442874880], 4) = 0 getsockopt(3, SOL_SOCKET, SO_RCVBUF, [6153848314442940416], [4]) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 6), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac6000 write(1, "PING localhost.biz (194.106.118."..., 57PING localhost.biz (194.106.118.9) 56(84) bytes of data. ) = 57 setsockopt(3, SOL_SOCKET, SO_TIMESTAMP, [4294967297], 4) = 0 setsockopt(3, SOL_SOCKET, SO_SNDTIMEO, "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0 setsockopt(3, SOL_SOCKET, SO_RCVTIMEO, "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0 rt_sigaction(SIGINT, {0x555555558980, [], SA_RESTORER|SA_INTERRUPT, 0x2aaaaad0a330}, NULL, 8) = 0 rt_sigaction(SIGALRM, {0x555555558980, [], SA_RESTORER|SA_INTERRUPT, 0x2aaaaad0a330}, NULL, 8) = 0 rt_sigaction(SIGQUIT, {0x55555555898e, [], SA_RESTORER|SA_INTERRUPT, 0x2aaaaad0a330}, NULL, 8) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0ioctl(1, TIOCGWINSZ, {ws_row=24, ws_col=80, ws_xpixel=0, ws_ypixel=0}) = 0 sendmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("194.106.118.9")}, msg_iov(1)=[{"\10\0\371\370xW\0\0\314?DC\0\0\0\0\254Y\n\0\0\0\0\0\20"..., 64}], msg_controllen=0, msg_flags=0}, 0) = 64 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={10, 0}}, NULL) = 0 recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(3, 0x7fffffc85360, 0) = -1 EINTR (Interrupted system call) --- SIGALRM (Alarm clock) @ 0 (0) --- rt_sigreturn(0xe) = -1 EINTR (Interrupted system call) write(1, "\n", 1 ) = 1 write(1, "--- localhost.biz ping statistic"..., 38--- localhost.biz ping statistics --- ) = 38 write(1, "1 packets transmitted, 0 receive"..., 621 packets transmitted, 0 received, 100% packet loss, time 0ms ) = 62 write(1, "\n", 1 ) = 1 munmap(0x2aaaaaac6000, 4096) = 0 exit_group(1) = ? 32 bit [root@one4 Desktop]# strace ./ping -c 1 localhost execve("./ping", ["./ping", "-c", "1", "localhost"], [/* 34 vars */]) = 0 [ Process PID=22430 runs in 32 bit mode. ] brk(0) = 0x56572000 old_mmap(0x100000000000, 146028888067, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULATE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_LOCKED|0xf7fe0680, -134218664, 0x8f7ff81e0) = 0xfffffffff7fe3000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(0x3, 0xffffc0a0) = 0 old_mmap(0x2d6e100000000, 8589934593, PROT_READ|PROT_WRITE, MAP_SHARED, 835, 0x87440700000000) = 0xfffffffff7fb5000 close(3) = 0 open("/lib/libresolv.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\203"..., 512) = 512fstat64(0x3, 0xffffc11c) = 0 old_mmap(0x1286800000000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7fa2000 old_mmap(0x2000f7fb1000, 8873402433539, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7fb1000 old_mmap(0x1868f7fb3000, 214748364803, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, MAP_FILE, 0, 0) = 0xfffffffff7fb3000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\212\256"..., 512) = 512fstat64(0x3, 0xffffc100) = 0 old_mmap(0x128bdc00000000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7e79000 old_mmap(0x4000f7f9c000, 8873402433539, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0xfffffffff7f9c000 old_mmap(0x1bdcf7fa0000, 214748364803, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, MAP_FILE, 0, 0) = 0xfffffffff7fa0000 close(3) = 0 old_mmap(0x100000000000, 146028888067, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff8, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULATE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_LOCKED|0xf7fe0680, 2832, 0x20f7ff43df) = 0xfffffffff7e78000 set_thread_area(0xffffc600) = 0 mprotect(0xf7f9c000, 8192, PROT_READ) = 0 mprotect(0xf7fb1000, 4096, PROT_READ) = 0 mprotect(0xf7ffe000, 4096, PROT_READ) = 0 munmap(0xf7fb5000, 186081) = 0 socketcall(0x1, 0xffffc8e0) = 3 getuid32() = 0 setuid32(0) = 0 brk(0) = 0x56572000 brk(0x56593000) = 0x56593000 gettimeofday({1370379163812009, 4160354488}, NULL) = 0 getpid() = 22430 open("/etc/resolv.conf", O_RDONLY) = 4 fstat64(0x4, 0xffffa62c) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xfffffffff7fe2000 read(4, "#search localhost.localdomain\nna"..., 4096) = 54 read(4, "", 4096) = 0 close(4) = 0 munmap(0xf7fe2000, 4096) = 0 uname({sys="Linux", node="one4.biz", ...}) = 0 socketcall(0x1, 0xffffc518) = 4 fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 socketcall(0x3, 0xffffc518) = -1 ENOENT (No such file or directory) close(4) = 0 socketcall(0x1, 0xffffc67c) = 4 fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 socketcall(0x3, 0xffffc67c) = -1 ENOENT (No such file or directory) close(4) = 0 open("/etc/nsswitch.conf", O_RDONLY) = 4 fstat64(0x4, 0xffffc6b8) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xfffffffff7fe2000 read(4, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1742 read(4, "", 4096) = 0 close(4) = 0 munmap(0xf7fe2000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 4 fstat64(0x4, 0xffffc124) = 0 old_mmap(0x2d6e100000000, 8589934593, PROT_EXEC, MAP_SHARED, 835, 0x874407f7fa369c) = 0xfffffffff7fb5000 close(4) = 0 open("/lib/libnss_files.so.2", O_RDONLY) = 4 read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \33\0\000"..., 512) = 512 fstat64(0x4, 0xffffc1a0) = 0 old_mmap(0xa29000000000, 8804682956805, PROT_EXEC, 0x8 /* MAP_??? */|MAP_FIXED|MAP_GROWSDOWN|MAP_EXECUTABLE|MAP_LOCKED|0xfe02c0, 23216193, 0x41f7f9f8b8) = 0xfffffffff7e6d000 old_mmap(0x2000f7e76000, 8873402433539, PROT_EXEC, 0x8 /* MAP_??? */|MAP_FIXED|MAP_GROWSDOWN|MAP_EXECUTABLE|MAP_LOCKED|0xfe02c0, 23216193, 0x41f7f9f8b8) = 0xfffffffff7e76000 close(4) = 0 mprotect(0xf7e76000, 4096, PROT_READ) = 0 munmap(0xf7fb5000, 186081) = 0 open("/etc/host.conf", O_RDONLY) = 4 fstat64(0x4, 0xffffc57c) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xfffffffff7fe2000 read(4, "order hosts,bind\n", 4096) = 17 read(4, "", 4096) = 0 close(4) = 0 munmap(0xf7fe2000, 4096) = 0 open("/etc/hosts", O_RDONLY) = 4 fcntl64(4, F_GETFD) = 0 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0 fstat64(0x4, 0xffffc630) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xfffffffff7fe2000 read(4, "# Do not remove the following li"..., 4096) = 534 close(4) = 0 munmap(0xf7fe2000, 4096) = 0 socketcall(0x1, 0xffffc8e0) = 4 socketcall(0x3, 0xffffc8e0) = 0 socketcall(0x6, 0xffffc8e0) = 0 close(4) = 0 socketcall(0xe, 0xffffc8e0) = 0 socketcall(0xe, 0xffffc8e0) = 0 socketcall(0xe, 0xffffc8a0) = 0 socketcall(0xe, 0xffffc8a0) = 0 socketcall(0xf, 0xffffc8a0) = 0 fstat64(0x1, 0xffffc22c) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xfffffffff7fe2000 write(1, "PING localhost.localdomain (127."..., 61PING localhost.localdomain (127.0.0.1) 56(84) bytes of data. ) = 61 socketcall(0xe, 0xffffc7e0) = 0 socketcall(0xe, 0xffffc7e0) = 0 socketcall(0xe, 0xffffc7e0) = 0 rt_sigaction(SIGINT, {0x20000000565591f0, [], 0}, NULL, 8) = 0 rt_sigaction(SIGALRM, {0x20000000565591f0, [], 0}, NULL, 8) = 0 rt_sigaction(SIGQUIT, {0x200000005655920c, [], 0}, NULL, 8) = 0 gettimeofday({1927268918378665, 0}, NULL) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0ioctl(1, TIOCGWINSZ, {ws_row=24, ws_col=80, ws_xpixel=0, ws_ypixel=0}) = 0 gettimeofday({1927698415108265, 96336116449280}, NULL) = 0 gettimeofday({1927792904388777, 6221431705058010020}, NULL) = 0 socketcall(0x10, 0xffffb750) = 64 setitimer(ITIMER_REAL, {it_interval={0, 10}, it_value={4296415765412, 18446683430219872004}}, NULL) = 0 socketcall(0x11, 0xffffb7d0) = 84 open("/etc/hosts", O_RDONLY) = 4 fcntl64(4, F_GETFD) = 0 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0 fstat64(0x4, 0xffffb4e8) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xfffffffff7fe1000 read(4, "# Do not remove the following li"..., 4096) = 534 close(4) = 0 munmap(0xf7fe1000, 4096) = 0 write(1, "64 bytes from localhost.localdom"..., 8164 bytes from localhost.localdomain (127.0.0.1): icmp_seq=0 ttl=64 time=0.055 ms ) = 81 socketcall(0x11, 0xffffb7d0) = -1 EAGAIN (Resource temporarily unavailable) write(1, "\n", 1 ) = 1 write(1, "--- localhost.localdomain ping s"..., 46--- localhost.localdomain ping statistics --- ) = 46 write(1, "1 packets transmitted, 1 receive"..., 601 packets transmitted, 1 received, 0% packet loss, time 0ms ) = 60 write(1, "rtt min/avg/max/mdev = 0.055/0.0"..., 58rtt min/avg/max/mdev = 0.055/0.055/0.055/0.000 ms, pipe 2 ) = 58 munmap(0xf7fe2000, 4096) = 0 exit_group(0) = ? So this looks suspicios. On 64bit machine it seems that you don't have read permission for /etc/hosts open("/etc/hosts", O_RDONLY) = -1 EACCES (Permission denied) check the permissions on this file. I would say that made sense except for the fact that the 32 bit version could read it.. But anyhow here it tis.. [jeff@one4 ~]$ ls -l /etc/hosts -rw-r--r-- 2 root root 534 Oct 1 07:41 /etc/hosts ok, last chance :) Is SELinux turned on on both machines? Can you switch it to permissive mode with `setenforce 0` and also check /var/log/messages and audit.log for some related lines? Bingo... Selinux is turned off on thge 32 bit machine, turned on on the 64 bit machine. When I setenforce 0 it does work... So is this a feature, config issue I need to correct, of selinux or a bug? Is that why the 32 bit version of ping worked on the 64 bit machine? It seems that your SELinux context might be broken on 64bit box. You can restore the context Check the old context first $ ls -alZ /etc/hosts and restore the context $ restorecon -v /etc/hosts if this doesn't work, you can try updating SELinux policy and relabeling whole system with $ restorecon -v -R / or by $ touch /.autorelabel $ reboot if this still doesn't work, check /var/log/messages for avc: messages The "restorecon -v /etc/hosts" corrected it... What may it go off the deep end to begin with? I'm not sure how this corruption happened, you can always check current context with ls -lZ /etc/hosts. Probably while copying the hosts file relabel didn't work... |