[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

nscd weird Problem



Hello,

i use debian etch with nscd to cache dns lookups:

- libc6          2.3.6.ds1-13et 
- nscd 	     2.3.6.ds1-13et


Nameserver:
	10.204.1.9                   <- this one is not available
	10.204.1.10


1. if all dns servers in resolv.conf are available the entries got
cached to hosts cache but statistics show cache rate 0%

---------------- /var/log/nscd.log ------------------------
1690: handle_request: request received (Version = 2) from PID 1700
1690:   GETHOSTBYADDR (10.204.1.45)
1690: Haven't found "10.204.1.45" in hosts cache!
1690: add new entry "10.204.1.45" of type GETHOSTBYADDR for hosts to
cache (firs
t)
1690: handle_request: request received (Version = 2) from PID 1701
1690:   GETSTAT
1690: handle_request: request received (Version = 2) from PID 1702
1690:   GETFDHST
1690: provide access to FD 9, for hosts
1690: handle_request: request received (Version = 2) from PID 1704
1690:   GETFDHST
1690: provide access to FD 9, for hosts
1690: handle_request: request received (Version = 2) from PID 1705
1690:   GETFDHST
1690: provide access to FD 9, for hosts
1690: handle_request: request received (Version = 2) from PID 1706
1690:   GETSTAT
1690: Reloading "101" in password cache!
1690: Reloading "102" in password cache!
1690: handle_request: request received (Version = 2) from PID 1708
1690:   GETFDPW
1690: provide access to FD 5, for passwd
---------------- /var/log/nscd.log ------------------------




hosts cache:

            yes  cache is enabled
            yes  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
            496  used data pool size
           3600  seconds time to live for positive entries
             20  seconds time to live for negative entries
              0  cache hits on positive entries
              0  cache hits on negative entries
             26  cache misses on positive entries
              4  cache misses on negative entries
              0% cache hit rate
              4  current number of cached values
             10  maximum number of cached values
              0  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
              0  memory allocations failed
            yes  check /etc/hosts for changes



So Cache seams to work but statistics no.






2. if the first namesever is unavaiable, the cache doesnt wort anymore.

1690: handle_request: request received (Version = 2) from PID 1714
1690:   GETFDHST
1690: provide access to FD 9, for hosts
1690: handle_request: request received (Version = 2) from PID 1714
1690:   GETHOSTBYNAME (bi1bea3)
1690: Haven't found "bi1bea3" in hosts cache!
1690: add new entry "bi1bea3" of type GETHOSTBYNAME for hosts to cache
(first)
1690: short write in cache_addhst: Broken pipe


tcpdump shows, that every dns request is made to all dns servers in
/etc/resolv.conf. Cache says, that the entry is there. but on every
request a new dns lookup is made.

---------- tcpdump -------------------
21:24:11.252449 IP 10.204.1.10.53 > 10.204.4.187.1366:  32413* 2/0/0
PTR[|domain]
21:24:11.254883 IP 10.204.4.187.1366 > 10.204.1.9.53:  15589+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:16.260741 IP 10.204.4.187.1367 > 10.204.1.10.53:  15589+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:16.262204 IP 10.204.1.10.53 > 10.204.4.187.1367:  15589* 2/0/0
PTR[|domain]
21:24:16.264647 IP 10.204.4.187.1367 > 10.204.1.9.53:  40656+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:21.261134 IP 10.204.4.187.1368 > 10.204.1.10.53:  40656+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:21.262520 IP 10.204.1.10.53 > 10.204.4.187.1368:  40656* 2/0/0
PTR[|domain]
21:24:21.265076 IP 10.204.4.187.1368 > 10.204.1.9.53:  54744+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:26.261597 IP 10.204.4.187.1369 > 10.204.1.10.53:  54744+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:26.262959 IP 10.204.1.10.53 > 10.204.4.187.1369:  54744* 2/0/0
PTR[|domain]
21:24:26.265426 IP 10.204.4.187.1369 > 10.204.1.9.53:  60253+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:31.262476 IP 10.204.4.187.1370 > 10.204.1.10.53:  60253+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:31.263880 IP 10.204.1.10.53 > 10.204.4.187.1370:  60253* 2/0/0
PTR[|domain]
21:24:31.266332 IP 10.204.4.187.1370 > 10.204.1.9.53:  40227+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:36.262759 IP 10.204.4.187.1371 > 10.204.1.10.53:  40227+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:36.264184 IP 10.204.1.10.53 > 10.204.4.187.1371:  40227* 2/0/0
PTR[|domain]
21:24:36.266653 IP 10.204.4.187.1371 > 10.204.1.9.53:  28197+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:41.263469 IP 10.204.4.187.1372 > 10.204.1.10.53:  28197+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:41.264876 IP 10.204.1.10.53 > 10.204.4.187.1372:  28197* 2/0/0
PTR[|domain]
21:24:41.267343 IP 10.204.4.187.1372 > 10.204.1.9.53:  30758+ PTR?
46.1.204.10.in-addr.arpa. (42)
21:24:46.263550 IP 10.204.4.187.1373 > 10.204.1.10.53:  30758+ PTR?
46.1.204.10.in-addr.arpa. (42)
---------- tcpdump -------------------




---------- ngrep dump of port 53 shows reverse lookup -----------------
U 10.204.4.187:1381 -> 10.204.1.9:53
  .p...........bi1bea2.gt.e-7.local.....

#
U 10.204.4.187:1382 -> 10.204.1.9:53
  9<...........bi1bea2.gt.e-7.local.....

#
U 10.204.4.187:1383 -> 10.204.1.10:53
  .p...........bi1bea2.gt.e-7.local.....

#
U 10.204.1.10:53 -> 10.204.4.187:1383
  .p...........bi1bea2.gt.e-7.local....................-

#
U 10.204.4.187:1383 -> 10.204.1.10:53
  9<...........bi1bea2.gt.e-7.local.....

#
U 10.204.1.10:53 -> 10.204.4.187:1383
  9<...........bi1bea2.gt.e-7.local....................-

#
U 10.204.4.187:1383 -> 10.204.1.9:53
  .............45.1.204.10.in-addr.arpa.....

#
U 10.204.4.187:1384 -> 10.204.1.10:53
  .............45.1.204.10.in-addr.arpa.....

#
U 10.204.1.10:53 -> 10.204.4.187:1384
 
.............45.1.204.10.in-addr.arpa..................bi1bea2.gt.e-7.lo
cal..............bi1bea2.bi.A

#
U 10.204.4.187:1384 -> 10.204.1.9:53
  .............45.1.204.10.in-addr.arpa.....

#
U 10.204.4.187:1385 -> 10.204.1.10:53
  .............45.1.204.10.in-addr.arpa.....

#
U 10.204.1.10:53 -> 10.204.4.187:1385
 
.............45.1.204.10.in-addr.arpa..................bi1bea2.bi.e-7.lo
cal..............bi1bea2.gt.A

#
U 10.204.4.187:1385 -> 10.204.1.9:53
  .............45.1.204.10.in-addr.arpa.....

---------- ngrep dump of port 53 shows reverse lookup -----------------




hosts cache:

            yes  cache is enabled
            yes  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
            128  used data pool size
           3600  seconds time to live for positive entries
             20  seconds time to live for negative entries
              0  cache hits on positive entries
              0  cache hits on negative entries
             31  cache misses on positive entries
              4  cache misses on negative entries
              0% cache hit rate
              1  current number of cached values
             10  maximum number of cached values
              0  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
              0  memory allocations failed
            yes  check /etc/hosts for changes










--
Best Regards 
Stephan Helas




Reply to: